Back to Samples

WebRTC samplesSelect sources & outputs

src/content/devices/input-output/index.html

latest774 B
Original Source

WebRTC samplesSelect sources & outputs

Get available audio, video sources and audio output devices from mediaDevices.enumerateDevices() then set the source for getUserMedia() using a deviceId constraint.

Note: without permission, the browser will restrict the available devices to at most one per type.

Audio input source:

Audio output destination:

Video source:

Note: If you hear a reverb sound your microphone is picking up the output of your speakers/headset, lower the volume and/or move the microphone further away from your speakers/headset.

View source on GitHub