File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ if (typeof window === 'undefined' || !window.navigator) {
219
219
var orgEnumerateDevices =
220
220
navigator . mediaDevices . enumerateDevices . bind ( navigator . mediaDevices ) ;
221
221
navigator . mediaDevices . enumerateDevices = function ( ) {
222
- return orgEnumerateDevices ( ) . catch ( function ( e ) {
222
+ return orgEnumerateDevices ( ) . then ( undefined , function ( e ) {
223
223
if ( e . name === 'NotFoundError' ) {
224
224
return [ ] ;
225
225
}
@@ -498,11 +498,13 @@ function requestUserMedia(constraints) {
498
498
}
499
499
500
500
var webrtcTesting = { } ;
501
- Object . defineProperty ( webrtcTesting , 'version' , {
502
- set : function ( version ) {
503
- webrtcDetectedVersion = version ;
504
- }
505
- } ) ;
501
+ try {
502
+ Object . defineProperty ( webrtcTesting , 'version' , {
503
+ set : function ( version ) {
504
+ webrtcDetectedVersion = version ;
505
+ }
506
+ } ) ;
507
+ } catch ( e ) { }
506
508
507
509
if ( typeof module !== 'undefined' ) {
508
510
var RTCPeerConnection ;
You can’t perform that action at this time.
0 commit comments