Rate this page:

CameraManager

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

Methods

get

Copy URL
get(): 

CameraManager

Get the CameraManager instance

Returns

getCallVideoSettings

Copy URL
getCallVideoSettings(call: 

Call

):

CameraParams

Return video settings of the specified call as the CameraParams object.

Parameters

Returns

getDefaultVideoSettings

Copy URL
getDefaultVideoSettings(): 

CameraParams

Return default video settings as the CameraParams object.

Returns

getInputDevices

Copy URL
getInputDevices(): 

Promise<VideoSourceInfo[]>

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

Returns

loadResolutionTestResult

Copy URL
loadResolutionTestResult(data: 

any

):

boolean

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

Parameters

  • data:

    any

Returns

  • type:

    boolean

setCallVideoSettings

Copy URL
setCallVideoSettings(call: 

Call

,
params:

CameraParams

):

Promise<void>

Set video settings for the specified call.

Parameters

Returns

  • type:

    Promise<void>

setDefaultVideoSettings

Copy URL
setDefaultVideoSettings(params: 

CameraParams

):

Promise<void>

Set default video settings for calls.

Parameters

Returns

  • type:

    Promise<void>

testResolutions

Copy URL
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:

    string

    Optional

Returns

  • type:

    Promise<any>