Table of Contents

adv.setAudioDestination()

call.adv.setAudioDestination() changes which local audio destination (speaker) this call should use.

By default the audio destination is picked by the browser. While most of the times browsers do succeed in picking the right audio destination sometimes they select another one than the user prefers. On devices with multiple audio destinations you can select which one to use for this call by calling call.adv.setAudioDestination() with the desired destination's unique ID as argument.

On Chrome you can get a list of available audio destinations using wrtc.get("audioDestinations").

The difference between wrtc.setAudioDestination() and call.adv.setAudioDestination() is that while wrtc.setAudioDestination() affects all current and future calls call.adv.setAudioDestination() affects only this particular call.

Most of the time you should use wrtc.setAudioDestination() except in very special scenarios there different calls should send their audio output to different speakers.

Arguments

call.adv.setAudioDestination(destinationID)

If no destinationID is supplied wrtc.audioDestination will be used.

If no destinationID and wrtc.audioDestination is undefined call.adv.setAudioDestination() does nothing (fails silently).

Returns

Nothing.

Example

call.adv.setAudioDestination("communications")

See also

wrtc.setAudioDestination()

wrtc.audioDestination

wrtc.get("audioDestinations")

audio destinations