Interface MediaStreamSourceOptions

Media stream source options.

interface MediaStreamSourceOptions {
    cameraType: "user" | "environment";
    fpsLimit: number;
    transform: Transform2D;
    disableSourceAudio: boolean;
}

Hierarchy (View Summary, Expand)

Properties

cameraType: "user" | "environment"

Specifies the camera type for which certain features are enabled or disabled. For example, surface tracking features are only active when the camera is set to "environment" mode. The default value is "user", which accommodates the majority of Lenses. "user" refers to the front-facing camera, while "environment" refers to the rear-facing camera.

fpsLimit: number

Limits the frames per second (FPS) to optimize performance by reducing compute resources when high FPS is not critical. By default, no limit is set, allowing usage of the video's native FPS. Useful for controlling resource usage on varying device capabilities.

transform: Transform2D

Specifies the 2D transformation to apply to the Lens. By default, CameraKit applies no transformation.

disableSourceAudio: boolean

Indicates whether the audio from the source should be disabled. By default, CameraKit passes audio to the Lens.

MMNEPVFCICPMFPCPTTAAATR