muaz-khan/WebRTC-Scalable-Broadcast

Select camera in android chrome

maxlinux2000 opened this issue · 2 comments

Hi

In chrome (android ) I can't select the camera of my phone.

Could you please add a button in order to switch front/rear camera?

regards
MaX

demym commented

Hi, i am using scalable broadcast on android; but i want the initiator to use back camera; i have put mediaconstraints facingmode to 'application'... but when initiating broadcast, i always get front camera..... this is my code:

connection.session = {
      audio: true,
      video: true,
      oneway: true
    };
    
  connection.mediaConstraints = {
      audio: true,
      video: {
        mandatory: {},
        optional: [{
          facingMode: 'application' // or "application" for back camera
        }]
      }
    };