|
|
|
|
|
|
114
|
constraints.video = { mandatory: {}, optional: [] };
|
114
|
constraints.video = { mandatory: {}, optional: [] };
|
|
115
|
|
115
|
|
|
116
|
if (options.cameraDeviceId) {
|
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
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=614716
|
119
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=614716
|
|
120
|
- if (!RTCBrowserType.isChrome()) {
|
|
|
|
|
|
120
|
+ if (!RTCBrowserType.isChrome() && !RTCBrowserType.isOpera()) {
|
|
121
|
// New style of setting device id.
|
121
|
// New style of setting device id.
|
|
122
|
constraints.video.deviceId = options.cameraDeviceId;
|
122
|
constraints.video.deviceId = options.cameraDeviceId;
|
|
123
|
}
|
123
|
}
|
|
|
|
|
|
|
132
|
// but this probably needs to be decided when updating other
|
132
|
// but this probably needs to be decided when updating other
|
|
133
|
// constraints, as we currently don't use "exact" syntax anywhere.
|
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
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=614716
|
137
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=614716
|
|
138
|
- if (!RTCBrowserType.isChrome()) {
|
|
|
|
|
|
138
|
+ if (!RTCBrowserType.isChrome() && !RTCBrowserType.isOpera()) {
|
|
139
|
constraints.video.facingMode = options.facingMode || 'user';
|
139
|
constraints.video.facingMode = options.facingMode || 'user';
|
|
140
|
}
|
140
|
}
|
|
141
|
|
141
|
|
|
|
|
|
|
|
157
|
// same behaviour as true
|
157
|
// same behaviour as true
|
|
158
|
constraints.audio = { mandatory: {}, optional: []};
|
158
|
constraints.audio = { mandatory: {}, optional: []};
|
|
159
|
if (options.micDeviceId) {
|
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
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=614716
|
162
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=614716
|
|
163
|
- if (!RTCBrowserType.isChrome()) {
|
|
|
|
|
|
163
|
+ if (!RTCBrowserType.isChrome() && !RTCBrowserType.isOpera()) {
|
|
164
|
// New style of setting device id.
|
164
|
// New style of setting device id.
|
|
165
|
constraints.audio.deviceId = options.micDeviceId;
|
165
|
constraints.audio.deviceId = options.micDeviceId;
|
|
166
|
}
|
166
|
}
|