WebRTC samples Select audio & video sources

Get available audio and video sources from MediaStream.getSources() then set the source for getUserMedia() using a sourceId constraint.

View source on GitHub