Rate this page:

CameraManager

Methods

getInstance

Copy URL
getInstance(): 

CameraManager

Get CameraManager instance to control camera hardware settings

Returns

off

Copy URL
Android
off(eventType: 

CameraEventTypes

,
event:

Function

):

void

Remove a handler for the specified camera event.

Parameters

  • event:

    Function

    Optional

    Handler function. If not specified, all handlers for the event will be removed.

Returns

  • type:

    void

on

Copy URL
Android
on(eventType: 

CameraEventTypes

,
event:

Function

):

void

Register 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

Returns

  • type:

    void

setCameraResolution

Copy URL
setCameraResolution(width: 

number

,
height:

number

):

void

Set a local camera resolution

Parameters

  • width:

    number

    Camera resolution width

  • height:

    number

    Camera resolution height

Returns

  • type:

    void

switchCamera

Copy URL
switchCamera(cameraType: 

CameraType

):

void

Select camera

Parameters

Returns

  • type:

    void

useOrientationEventListener

Copy URL
Android
useOrientationEventListener(use: 

boolean

):

void

Use OrientationEventListener on Android to detect the device rotation and to rotate camera frames according to device orientation.By default, Display rotation is used to determine 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:

  1. OrientationEventListener will detect landscape orientation
  2. Display rotation will always report portrait orientation

The method should be called in idle camera state, i.e. video is currently not sending in a call.

Parameters

  • use:

    boolean

    True, if OrientationEventListener should be used to detect the device orientation, otherwise Display rotation is used.

Returns

  • type:

    void