File tree 3 files changed +13
-1
lines changed
3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ validation-report.json
8
8
validation-status.json
9
9
npm-debug.log
10
10
* ~
11
+ .idea
Original file line number Diff line number Diff line change @@ -403,6 +403,9 @@ export function shimAddTrackRemoveTrackWithNative(window) {
403
403
}
404
404
405
405
export function shimAddTrackRemoveTrack ( window ) {
406
+ if ( ! window . RTCPeerConnection ) {
407
+ return ;
408
+ }
406
409
const browserDetails = utils . detectBrowser ( window ) ;
407
410
// shim addTrack and removeTrack.
408
411
if ( window . RTCPeerConnection . prototype . addTrack &&
@@ -625,6 +628,9 @@ export function shimPeerConnection(window) {
625
628
// very basic support for old versions.
626
629
window . RTCPeerConnection = window . webkitRTCPeerConnection ;
627
630
}
631
+ if ( ! window . RTCPeerConnection ) {
632
+ return ;
633
+ }
628
634
629
635
const origGetStats = window . RTCPeerConnection . prototype . getStats ;
630
636
window . RTCPeerConnection . prototype . getStats = function ( selector ,
Original file line number Diff line number Diff line change @@ -11,9 +11,14 @@ import * as utils from '../utils.js';
11
11
const logging = utils . log ;
12
12
13
13
export function shimGetUserMedia ( window ) {
14
- const browserDetails = utils . detectBrowser ( window ) ;
15
14
const navigator = window && window . navigator ;
16
15
16
+ if ( ! navigator . mediaDevices ) {
17
+ return ;
18
+ }
19
+
20
+ const browserDetails = utils . detectBrowser ( window ) ;
21
+
17
22
const constraintsToChrome_ = function ( c ) {
18
23
if ( typeof c !== 'object' || c . mandatory || c . optional ) {
19
24
return c ;
You can’t perform that action at this time.
0 commit comments