Rate this page:

CameraManager

Methods

getInstance

Copy URL
getInstance(): 

CameraManager

Gets a CameraManager instance to control camera hardware settings

Returns

off

Copy URL
Android
off(eventType: 

CameraEventTypes

,
event:

Function

):

void

Removes a handler for the specified camera event.

Parameters

  • event:

    Function

    Optional

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

Returns

  • type:

    void

on

Copy URL
Android
on(eventType: 

CameraEventTypes

,
event:

Function

):

void

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

Returns

  • type:

    void

setCameraResolution

Copy URL
setCameraResolution(width: 

number

,
height:

number

):

void

Sets 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

Selects a camera.

Parameters

Returns

  • type:

    void

useOrientationEventListener

Copy URL
Android
useOrientationEventListener(use: 

boolean

):

void

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:

  1. OrientationEventListener detects landscape orientation
  2. 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