Skip to main content
setOutputDeviceAsync({ outputDeviceId }) Prebuilt Custom

Parameters

outputDeviceId
string
required
The ID of the audio output device to use, as returned by enumerateDevices().

Return value

Returns a Promise that resolves to a DailyDeviceInfos object:
{
  "camera": { "deviceId": "video-device-id" },
  "mic": { "deviceId": "audio-device-id" },
  "speaker": { "deviceId": "output-device-id" }
}

Browser support

Firefox <116 and Safari <18.4 do not support setSinkId or listing audio output devices in enumerateDevices(). On these browsers, setOutputDeviceAsync() logs a warning and returns the device list with speaker set to {} — it does not throw.
Safari 18.4 is the first version to introduce speaker selection support, but our experience is that it does not work reliably. Current Safari Technology Preview versions appear to resolve these issues. If a user encounters audio problems after switching speaker devices, recommend trying another browser or refreshing the page.
For browsers that don’t report output devices, we recommend listing the speaker as “Default” and hiding any speaker-selection UI.

Example

const devices = await call.enumerateDevices();
const speakers = devices.devices.filter((d) => d.kind === 'audiooutput');

await call.setOutputDeviceAsync({ outputDeviceId: speakers[0].deviceId });

See also