I am studying webRTC application.
My reference is this software
apprtc https://code.google.com/p/webrtc/source/browse/trunk/samples/js/apprtc/
demo https://apprtc.appspot.com/
My computer has bult-in video device and apprtc uses this video device . However I want to use USB-video camera instead.
I am searching the way to change input video devices. But I couldn't find any clue in source files.
does anyone has information?
It turns out that Chrome does support MediaStreamTrack API which allows you to do this. In Firefox this API is still experimental. Here is the Chrome implementation:
On Chrome:
On Firefox: media.navigator.permission.disabled=false
Try this demo which is capturing all audio/video input devices:
https://www.webrtc-experiment.com/demos/MediaStreamTrack.getSources.html
You can capture any "specific" device using same API.
Edited at March 01, 2014:
Updated at Sep 05, 2015:
Now Microsoft Edge, Chrome 44+, Firefox 38+, all these browsers are supporting
navigator.mediaDevices.enumerateDevices
API.Here is a reusable script that provides cross-browser shim for all these media-sources APIs. It will work even in old-chrome (43 and older) (even on Android devices):
Here is how to use above reusable cross-browser shim:
It sounds to me you are looking for
facingMode
. You can check it out in this document: http://www.w3.org/TR/2013/WD-mediacapture-streams-20130516/#idl-def-AllVideoCapabilitiesNot sure how well it is supported yet though.