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:
Name | Type | Default | Description |
---|---|---|---|
forceBuiltInSpeaker | Bool | - | A boolean that indicates to either use the built-in speaker (true) or the built-in receiver (false). |
completion | (() -> Void)? | nil | The block to execute when the query completes. |
switchCamera
▸ switchCamera(completion
: (() -> Void)?)
Switches between front and back camera.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
completion | (() -> Void)? | nil | The 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
Name | Type | Description |
---|---|---|
comfortNoise | ComfortNoiseLevel | The 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
Name | Type | Description |
---|---|---|
completion | ((ComfortNoiseLevel, Error?) -> Void)) | The block to execute when the query completes. |
Updated about 1 month ago