Table of Contents

audioSource

wrtc.audioSource is a number property selecting which local audio source (microphone) to use.

If wrtc.audioSource is 0 the wrtc object will use the system default audio source (the one picked by the browser). While most of the times the browsers succeed in picking the right audio source sometimes they select another one than the user prefers. On devices with multiple audio sources you can select which one to use by entering the desired source's unique ID into wrtc.audioSource

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

Value

Number containing unique ID of audio source. If 0 select system's default audio source.

Default value

0

Usage

After change of wrtc.audioSource you need to call wrtc.changeMedia().

Example

Select first audio source (on Chrome):
wrtc.audioSource = wrtc.get("audioSources")[0].id;
wrtc.changeMedia();