Suggestions

close search

Add Messaging, Voice, and Authentication to your apps with Vonage Communications APIs

Visit the Vonage API Developer Portal

VideoExpress.getAudioOutputDevices

This method is a wrapper around the OT.getAudioOutputDevices method.

The following code gets the available audio output devices:

const devices = await VideoExpress.getAudioOutputDevices();

Methods

Name Description
(Promise<AudioOutputDevice[]>) VideoExpress.getAudioOutputDevices ()

Enumerates the audio output devices (such as speakers) available to the browser.

The method returns a Promise which resolves an array of objects corresponding to available audio output devices. Each object has two properties: deviceId and label, each of which are strings.

The deviceId property is a unique ID for the device. You can pass the deviceId as the parameter of the VideoExpress.setAudioOutputDevice() method. The deviceId property is set to undefined if the user has not previously granted access to a camera and microphone. In the case there are no audio output devices available, the property is set to `null`.

The label property identifies the device. The label property is set to an empty string if the user has not previously granted access to a camera and microphone.

Note: The browser may limit the number of returned audio output devices to one before the user has granted access to a camera or microphone.