CameraManager
Methods
getInstance
Gets a CameraManager instance to control camera hardware settings
Returns
type:
off
Removes a handler for the specified camera event.
Parameters
eventType:
event:
Function
OptionalHandler function. If not specified, all handlers for the event are removed.
Returns
type:
void
on
Registers a handler for the specified camera event. One event can have more than one handler. Use the CameraManager.off method to delete a handler.
Parameters
eventType:
event:
Function
Returns
type:
void
setCameraResolution
Sets a local camera resolution.
Parameters
width:
number
Camera resolution width
height:
number
Camera resolution height
Returns
type:
void
useOrientationEventListener
Uses the OrientationEventListener on Android to detect the device rotation and to rotate camera frames according to device orientation.By default, display rotation determines the device rotation.
The way how the device orientation is detected, affects camera frames rotation on local and remote side if auto-rotate is disabled on a mobile device:
- OrientationEventListener detects landscape orientation
- Display rotation always reports portrait orientation
The method should be called in idle camera state, i.e. video is currently not sending in a call.
Parameters
use:
boolean
Whether OrientationEventListener should be used to detect the device orientation, otherwise Display rotation is used.
Returns
type:
void