CameraMediaSourceConfig interface
Configuration for creating a camera media source.
Signature:
export interface CameraMediaSourceConfig
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
cameraType? | readonly | Enum<typeof CameraType> | (Optional) The position of the camera on the device that should be captured by the media source. |
fallbackEnabled? | readonly | boolean | (Optional) If this is true then a fallback image is shown when the camera is not running. |
fallbackMicrophoneEnabled? | readonly | boolean | (Optional) Enables or disables microphone audio visualization for the fallback display when CameraMediaSourceConfig.fallbackEnabled is also true. |
requestedResolutionScale? | readonly | Enum<typeof CameraResolutionScale> | (Optional) Requests to capture the camera feed at a specific resolution scale. |
CameraMediaSourceConfig.cameraType property
The position of the camera on the device that should be captured by the media source.
Signature:
readonly cameraType?: Enum<typeof CameraType>;
Remarks
This defaults to CameraType.FrontFacing if not specified.
You can also use CameraMediaSource.setCameraType() to change the camera position after the media source has been created.
CameraMediaSourceConfig.fallbackMicrophoneEnabled property
Enables or disables microphone audio visualization for the fallback display when CameraMediaSourceConfig.fallbackEnabled is also true.
Signature:
readonly fallbackMicrophoneEnabled?: boolean;
Remarks
This is true by default.
This does not affect microphone audio capture by video recorders created using O3hMediaSource.createVideoRecorder() as microphone capture is configured separately for the recorder.
You can also use CameraMediaSource.setFallbackMicrophoneEnabled() to change this setting after the media source has been created.
CameraMediaSourceConfig.fallbackEnabled property
If this is true then a fallback image is shown when the camera is not running.
Signature:
readonly fallbackEnabled?: boolean;
Remarks
This is true by default.
The fallback used is a visualization of the microphone audio if CameraMediaSourceConfig.fallbackMicrophoneEnabled is also true and the module has permission to use the microphone, otherwise it is a static user avatar image.
If this is false nothing is displayed when the camera is not running.
You can also use CameraMediaSource.setFallbackEnabled() to change this setting after the media source has been created.
CameraMediaSourceConfig.requestedResolutionScale property
Requests to capture the camera feed at a specific resolution scale.
Signature:
readonly requestedResolutionScale?: Enum<typeof CameraResolutionScale>;
Remarks
The actual resolution used may be different from the requested one, depending on the resolution requested by other media sources that capture from the same camera position as only one resolution scale can be used by a particular camera at a time.
This defaults to CameraResolutionScale.Full if not specified.
You can also use CameraMediaSource.requestResolutionScale() to change the resolution after the media source has been created.
Updated 7 months ago