MediaDeviceService

The MediaDeviceService allows the application to manage devices that are used during conferences. The service allows the application to:

Events

deviceChanged

deviceChanged(result: DeviceChangeResult): void

🚀

SDK Beta

This API is a part of the Beta program.

Emitted whenever the local participant adds, updates, or removes an audio or video device during a conference. The event is available only in SDK 3.5 and later.

example

VoxeetSDK.conference.on('deviceChanged', (result) => {

});

Parameters:

NameTypeDescription
resultDeviceChangeResultInformation about the device.

Returns: void

Accessors

selectedAudioInputDevice

• get selectedAudioInputDevice(): MediaDeviceInfo

🚀

SDK Beta

This API is a part of the Beta program.

Returns the audio input device that is currently used by the local participant. This API is available only in SDK 3.5 and later.

Returns: MediaDeviceInfo


selectedAudioOutputDevice

• get selectedAudioOutputDevice(): MediaDeviceInfo

🚀

SDK Beta

This API is a part of the Beta program.

Returns the audio output device that is currently used by the local participant. This API is available only in SDK 3.5 and later.

Returns: MediaDeviceInfo


selectedVideoInputDevice

• get selectedVideoInputDevice(): MediaDeviceInfo

🚀

SDK Beta

This API is a part of the Beta program.

Returns the video input device that is currently used by the local participant. This API is available only in SDK 3.5 and later.

Returns: MediaDeviceInfo

Methods

enumerateAudioDevices

enumerateAudioDevices(type?: string): Promise<MediaDeviceInfo[]>

deprecated
Enumerates all audio devices.

Parameters:

NameTypeDefault valueDescription
typestring"input"The device type, either input or output.

Returns: Promise<MediaDeviceInfo[]>


enumerateAudioInputDevices

enumerateAudioInputDevices(): Promise<MediaDeviceInfo[]>

🚀

SDK Beta

This API is a part of the Beta program.

Enumerates all audio input devices that are available for the local participant. This method is available only in SDK 3.5 and later.

Returns: Promise<MediaDeviceInfo[]>


enumerateAudioOutputDevices

enumerateAudioOutputDevices(): Promise<MediaDeviceInfo[]>

🚀

SDK Beta

This API is a part of the Beta program.

Enumerates all audio output devices that are available for the local participant. This method is available only in SDK 3.5 and later.

Returns: Promise<MediaDeviceInfo[]>


enumerateDevices

enumerateDevices(): Promise<MediaDeviceInfo[]>

🚀

SDK Beta

This API is a part of the Beta program.

Enumerates all connected audio and video devices that are available for the local participant. This method is available only in SDK 3.5 and later.

Returns: Promise<MediaDeviceInfo[]>


enumerateVideoDevices

enumerateVideoDevices(type?: string): Promise<MediaDeviceInfo[]>

deprecated
Enumerates all video devices.

Parameters:

NameTypeDefault valueDescription
typestring"input"The device type, either input or output.

Returns: Promise<MediaDeviceInfo[]>


enumerateVideoInputDevices

enumerateVideoInputDevices(): Promise<MediaDeviceInfo[]>

🚀

SDK Beta

This API is a part of the Beta program.

Enumerates video input devices that are available for the local participant. This method is available only in SDK 3.5 and later.

Returns: Promise<MediaDeviceInfo[]>


getComfortNoiseLevel

getComfortNoiseLevel(): Promise<any>

Retrieves the comfort noise level setting for output devices in Dolby Voice conferences. This API is only available for the Desktop SDK users.

Returns: Promise<any>

The comfort noise level.


selectAudioInput

selectAudioInput(device: MediaDeviceInfo | string): Promise<string>

Selects a specific local participant's audio input device for capturing audio during a conference. A joining participant can either use the default audio device or select a different device. All operating systems recognize one default device, however on Windows there is an additional device called the default communication device. Selecting an audio device by providing the communications (only on Windows) or default deviceId causes that the SDK uses the selected device as long as the device is recognized by the operating system as the default device. After changing the default device in the system settings or disconnecting the current default device, the SDK switches to the new default device. When the participant selects the audio device by providing the actual deviceId, the SDK uses the selected device as long as it is available. After disconnecting the selected device, the SDK switches to the default device.

Parameters:

NameTypeDescription
deviceMediaDeviceInfo | stringThe MediaDeviceInfo interface that contains information about the device.

Returns: Promise<string>


selectAudioOutput

selectAudioOutput(device: MediaDeviceInfo | string): Promise<string>

Selects a specific local participant's audio output device for playing audio during a conference. A joining participant can either use the default audio device or select a different device. All operating systems recognize one default device, however on Windows there is an additional device called the default communication device. Selecting an audio device by providing the communications (only on Windows) or default deviceId causes that the SDK uses the selected device as long as the device is recognized by the operating system as the default device. After changing the default device in the system settings or disconnecting the current default device, the SDK switches to the new default device. When the participant selects the audio device by providing the actual deviceId, the SDK uses the selected device as long as it is available. After disconnecting the selected device, the SDK switches to the default device.

Parameters:

NameTypeDescription
deviceMediaDeviceInfo | stringThe MediaDeviceInfo interface that contains information about the device.

Returns: Promise<string>


selectVideoInput

selectVideoInput(device: MediaDeviceInfo | string): Promise<string>

Selects a specific local participant's video input device for capturing video during a conference.

Parameters:

NameTypeDescription
deviceMediaDeviceInfo | stringThe MediaDeviceInfo interface that contains information about the device.

Returns: Promise<string>


setComfortNoiseLevel

setComfortNoiseLevel(level: ComfortNoiseLevel): Promise<any>

Configures the comfort noise level for output devices in Dolby Voice conferences. This API is only available for the Desktop SDK users.

Parameters:

NameTypeDescription
levelComfortNoiseLevelThe selected comfort noise level.

Returns: Promise<any>


Did this page help you?