Rate this page:

CameraVideoSource

Camera video source for managing camera devices and preferred resolution.

Methods

addEventListener
Copy URL

Registers a handler for the specified event.

One event can have more than one handler; handlers are executed in order of their registration.

Parameters

Returns

  • type:

    void

getInstance
Static
Copy URL

Returns the instance of the camera video source.

Returns

removeEventListener
Copy URL

Removes a previously registered handler for the specified event.

Parameters

Returns

  • type:

    void

selectDevice
Copy URL

Changes the CameraVideoSource.selectedDevice to the provided one.

Parameters

Returns

  • type:

    Promise<void>

setPreferredResolution
Copy URL

Sets the preferred camera resolution.

Supported values:

The closest resolution supported by the selected camera device is chosen. Updates CameraVideoSource.preferredResolution.

Parameters

Returns

  • type:

    void

Props

devices
Copy URL

List of camera devices available on the device.

preferredResolution
Copy URL

Watchable property that allows getting the preferred camera resolution and observing its changes.

The value can be:

For QualityPreset, the SDK selects the closest resolution supported by the selected camera device. See CameraDevice.supportedResolutions for available resolutions.

selectedDevice
Copy URL

Watchable property that allows getting the selected CameraDevice and observing its changes.

Rate this page: