> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# applySelectedAudioOutputDevice

> Apply the currently selected audio output device to an HTMLMediaElement (e.g.

```ts
applySelectedAudioOutputDevice(element): Promise<boolean>
```

Apply the currently selected audio output device to an HTMLMediaElement
(e.g. the `<audio>` or `<video>` element the consumer attached the
remote stream to). Uses `HTMLMediaElement.setSinkId` under the hood.
Returns a `Promise<boolean>`: `true` if the sink was applied,
`false` if the browser doesn't support `setSinkId` or no device is
selected.

## **Parameters**

HTML media element to route audio output to.

## **Returns**

`Promise<boolean>`

## **Examples**

```ts
audioEl.srcObject = call.remoteStream;
await client.applySelectedAudioOutputDevice(audioEl);
```