1

I use simplewebrtc.com's webrtc solution (see https://simplewebrtc.com/demo.html). When you join the room the front camera will be used. But i want to use back camera. There is info page (see "Selecting a microphone and camera" at https://simplewebrtc.com/notsosimple.html ) for that but i couldn't implement it. Could anybody help me please?

Cenk Ten
  • 283
  • 5
  • 20

1 Answers1

0

first: In webrtc i think this should be handled in constraints passed to getUserMedia.

 { audio: true, video: { facingMode: { exact: "environment" } } }

you can log the lable of the using video device in browser's console:

  var videoTracks = localStream.getVideoTracks();
  if (videoTracks.length > 0) {
    trace('Using video device: ' + videoTracks[0].label);
  }

second: In browser's setting you can set default camera, e.g. in chrome go to Settings>Advanced>Content Settings>Camera

Ali Abdollahi
  • 143
  • 11