Skip to main content

interpretCurrentFacingMode

function interpretCurrentFacingMode(currentTrack): undefined | "user" | "environment" | "left" | "right";

Interpret the current facing mode from the provided track, and try to get the mode from settings, or use the label to guess the facing mode when facingMode is not supported from settings

Parameters

ParameterTypeDescription
currentTrackundefined | MediaStreamTrackThe current video input track

Returns

undefined | "user" | "environment" | "left" | "right"