Просмотр исходного кода

Don't mix old and new-style for gUM constraints for Opera also

dev1
tsareg 9 лет назад
Родитель
Сommit
78cf3eabed
1 измененных файлов: 9 добавлений и 9 удалений
  1. 9
    9
      modules/RTC/RTCUtils.js

+ 9
- 9
modules/RTC/RTCUtils.js Просмотреть файл

@@ -114,10 +114,10 @@ function getConstraints(um, options) {
114 114
         constraints.video = { mandatory: {}, optional: [] };
115 115
 
116 116
         if (options.cameraDeviceId) {
117
-            // Don't mix new and old style settings for Chrome as this leads to
118
-            // TypeError in new Chrome versions. @see
117
+            // Don't mix new and old style settings for Chromium as this leads
118
+            // to TypeError in new Chromium versions. @see
119 119
             // https://bugs.chromium.org/p/chromium/issues/detail?id=614716
120
-            if (!RTCBrowserType.isChrome()) {
120
+            if (!RTCBrowserType.isChrome() && !RTCBrowserType.isOpera()) {
121 121
                 // New style of setting device id.
122 122
                 constraints.video.deviceId = options.cameraDeviceId;
123 123
             }
@@ -132,10 +132,10 @@ function getConstraints(um, options) {
132 132
             // but this probably needs to be decided when updating other
133 133
             // constraints, as we currently don't use "exact" syntax anywhere.
134 134
 
135
-            // Don't mix new and old style settings for Chrome as this leads to
136
-            // TypeError in new Chrome versions. @see
135
+            // Don't mix new and old style settings for Chromium as this leads
136
+            // to TypeError in new Chromium versions. @see
137 137
             // https://bugs.chromium.org/p/chromium/issues/detail?id=614716
138
-            if (!RTCBrowserType.isChrome()) {
138
+            if (!RTCBrowserType.isChrome() && !RTCBrowserType.isOpera()) {
139 139
                 constraints.video.facingMode = options.facingMode || 'user';
140 140
             }
141 141
 
@@ -157,10 +157,10 @@ function getConstraints(um, options) {
157 157
             // same behaviour as true
158 158
             constraints.audio = { mandatory: {}, optional: []};
159 159
             if (options.micDeviceId) {
160
-                // Don't mix new and old style settings for Chrome as this leads to
161
-                // TypeError in new Chrome versions. @see
160
+                // Don't mix new and old style settings for Chromium as this
161
+                // leads to TypeError in new Chromium versions. @see
162 162
                 // https://bugs.chromium.org/p/chromium/issues/detail?id=614716
163
-                if (!RTCBrowserType.isChrome()) {
163
+                if (!RTCBrowserType.isChrome() && !RTCBrowserType.isOpera()) {
164 164
                     // New style of setting device id.
165 165
                     constraints.audio.deviceId = options.micDeviceId;
166 166
                 }

Загрузка…
Отмена
Сохранить