SIGN UP

CameraManager

Interface that may be used to manage cameras on Android device.

Methods

get(): CameraManager

Get the StreamManager instance

Returns

getCallVideoSettings(call: Call): CameraParams

Return video settings of specified call as the CameraParams object.

Parameters

Returns

getDefaultVideoSettings(): CameraParams

Return default audio settings as the CameraParams object.

Returns

getInputDevices(): Promise<Array<VideoSourceInfo>>

Return available video input devices (web camera(s)).

Returns

loadResolutionTestResult(data: any): boolean

Restoring a camera resolution test result previously got by testResolutions function.

Parameters

  • data:

    any

Returns

  • Return:

    boolean
setCallVideoSettings(call: Call, params: CameraParams): Promise<void>

Set video settings for specified call.

Parameters

Returns

  • Return:

    Promise<void>
setDefaultVideoSettings(params: CameraParams): Promise<void>

Set default video settings for calls.

Parameters

Returns

  • Return:

    Promise<void>
testResolutions(cameraId: string): Promise<any>

Start camera resolution test for each video source in system.
Attention! This procedure may take a lot of time and will send multiple Camera requests for the Mozilla Firefox and Apple Safari browsers!
Please, don't run it without warning user's request and attention.
After running this function, please, save result to a browser storage (like LocalStorage or IndexedDB) and use it in future with the loadResolutionTestResult function to restore results.
This function mandatory only if you will use Hardware.VideoQuality.VIDEO_QUALITY_HIGH,Hardware.VideoQuality.VIDEO_QUALITY_MEDIUM or Hardware.VideoQuality.VIDEO_QUALITY_LOW enums as video settings and strongly not recommended to use in another case.

Parameters

  • cameraId:

    stringOptional

Returns

  • Return:

    Promise<any>