wrtc.changeMedia() changes local media sources (camera and microphone to be used). Used eg in mobile phones to switch between back and front camera. Identical duplicate of wrtc.setCaptureDevice().
wrtc.changeMedia() is also used to get access to camera and microphone outside of calls.
To change microphone set wrtc.audioSource to the unique ID of the microphone to use before calling wrtc.changeMedia().
To change camera either set wrtc.videoSource to the unique ID of the camera to use before calling wrtc.changeMedia() or supply the unique camera ID as argument to wrtc.changeMedia().
To get list of available microphones and cameras use wrtc.get("audioSources") and wrtc.get("videoSources"), respectively.
To start screen sharing use wrtc.getScreen() instead.
videoSource - (optional):
If argument is missing value of wrtc.videoSource will be used.
If argument was supplied value of wrtc.videoSource will be set to that value.
Nothing.