2020 API AWARDS WINNER - BEST IN MEDIA APIs LEARN MORE

MediaDeviceService

The MediaDeviceService allows the application to manage the devices used during the conference. It can check which camera is used and set the default camera position. It can also switch between the built-in speaker and the built-in receiver and between front and back camera.

Accessors

isDefaultFrontFacing

isDefaultFrontFacing: Bool

Gets and sets the default position of a camera (front or back).

Returns: Bool

isFrontCamera

isFrontCamera: Bool

Checks if the participant uses the front or back camera.

Returns: Bool

Methods

switchDeviceSpeaker

switchDeviceSpeaker(forceBuiltInSpeaker: Bool, completion: (() -> Void)?)

Switches between built-in speaker and built-in receiver.

Parameters:

NameTypeDefault
forceBuiltInSpeakerBool-
completion(() -> Void)?nil

switchCamera

switchCamera(completion: (() -> Void)?)

Switches between front and back camera.

Parameters:

NameTypeDefault
completion(() -> Void)?nil