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.

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.

setComfortNoiseLevel

setComfortNoiseLevel(comfortNoise: ComfortNoiseLevel, completion: ((Error?) -> Void)? = nil))

deprecated
Note: This method is deprecated in SDK 3.7 and replaced with the setComfortNoiseLevel method available in the LocalAudio model.

Configures the comfort noise level for output devices in Dolby Voice conferences.

Parameters

NameTypeDescription
comfortNoiseComfortNoiseLevelThe selected comfort noise level.
completion((Error?) -> Void)? = nil))The block to execute when the query completes.

getComfortNoiseLevel

getComfortNoiseLevel(completion: ((ComfortNoiseLevel, Error?) -> Void))

deprecated
Note: This method is deprecated in SDK 3.7 and replaced with the getComfortNoiseLevel method available in the LocalAudio model.

Retrieves comfort noise level setting for output devices in Dolby Voice conferences. If there is no connected output device, getComfortNoiseLevel returns the default level.

Parameters

NameTypeDescription
completion((ComfortNoiseLevel, Error?) -> Void))The block to execute when the query completes.

Did this page help you?