MediaDeviceService

The MediaDeviceService allows the application to manage the devices used during a conference. The service allows checking which camera is used and if the front-facing camera is used by default, switching between the built-in speaker and the built-in receiver and between front and back camera, checking the selected comfort noise level for output devices in Dolby Voice conferences, and changing the comfort noise level.

Accessors

isDefaultFrontFacing

isDefaultFrontFacing: Bool

Checks if the front-facing camera is used by default.

Returns: Bool


isFrontCamera

isFrontCamera: Bool

Checks if the application uses the front-facing (true) or back-facing camera (false).

Returns: Bool

Methods

switchDeviceSpeaker

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

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

Default: defaultBuiltInSpeaker: true
The built-in receiver refers to the internal iPhone earpiece.
Setting switchDeviceSpeaker(forceBuiltInSpeaker: true) ensures that audio is always routed to the speaker rather than the receiver if no other accessories, such as headphones, are in use.

Parameters:

NameTypeDefaultDescription
forceBuiltInSpeakerBool-A boolean that indicates to either use the built-in speaker (true) or the built-in receiver (false).
completion(() -> Void)?nilThe block to execute when the query completes.

switchCamera

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

Switches between front and back camera.

Parameters:

NameTypeDefaultDescription
completion(() -> Void)?nilThe block to execute when the query completes.