|
|
@@ -119,6 +119,12 @@ function getConstraints(um, options) {
|
|
119
|
119
|
constraints.video.optional.push({
|
|
120
|
120
|
sourceId: options.cameraDeviceId
|
|
121
|
121
|
});
|
|
|
122
|
+ } else {
|
|
|
123
|
+ // by default prefer the "user" camera if we have not specified the
|
|
|
124
|
+ // exact device id for mobile devices
|
|
|
125
|
+ if (RTCBrowserType.isReactNative() || RTCBrowserType.isAndroid()) {
|
|
|
126
|
+ constraints.video.facingMode = "user";
|
|
|
127
|
+ }
|
|
122
|
128
|
}
|
|
123
|
129
|
|
|
124
|
130
|
constraints.video.optional.push({ googLeakyBucket: true });
|
|
|
@@ -603,7 +609,7 @@ var RTCUtils = {
|
|
603
|
609
|
disableNS = options.disableNS;
|
|
604
|
610
|
logger.info("Disable NS: " + disableNS);
|
|
605
|
611
|
}
|
|
606
|
|
-
|
|
|
612
|
+
|
|
607
|
613
|
return new Promise(function(resolve, reject) {
|
|
608
|
614
|
if (RTCBrowserType.isFirefox()) {
|
|
609
|
615
|
var FFversion = RTCBrowserType.getFirefoxVersion();
|