@@ -190,7 +190,7 @@ var utils = _interopRequireWildcard(require("../utils.js"));
190
190
var _getusermedia = require ( "./getusermedia" ) ;
191
191
function _getRequireWildcardCache ( e ) { if ( "function" != typeof WeakMap ) return null ; var r = new WeakMap ( ) , t = new WeakMap ( ) ; return ( _getRequireWildcardCache = function _getRequireWildcardCache ( e ) { return e ? t : r ; } ) ( e ) ; }
192
192
function _interopRequireWildcard ( e , r ) { if ( ! r && e && e . __esModule ) return e ; if ( null === e || "object" != _typeof ( e ) && "function" != typeof e ) return { "default" : e } ; var t = _getRequireWildcardCache ( r ) ; if ( t && t . has ( e ) ) return t . get ( e ) ; var n = { __proto__ : null } , a = Object . defineProperty && Object . getOwnPropertyDescriptor ; for ( var u in e ) if ( "default" !== u && { } . hasOwnProperty . call ( e , u ) ) { var i = a ? Object . getOwnPropertyDescriptor ( e , u ) : null ; i && ( i . get || i . set ) ? Object . defineProperty ( n , u , i ) : n [ u ] = e [ u ] ; } return n [ "default" ] = e , t && t . set ( e , n ) , n ; }
193
- function _defineProperty ( obj , key , value ) { key = _toPropertyKey ( key ) ; if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
193
+ function _defineProperty ( e , r , t ) { return ( r = _toPropertyKey ( r ) ) in e ? Object . defineProperty ( e , r , { value : t , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ r ] = t , e ; }
194
194
function _toPropertyKey ( t ) { var i = _toPrimitive ( t , "string" ) ; return "symbol" == _typeof ( i ) ? i : i + "" ; }
195
195
function _toPrimitive ( t , r ) { if ( "object" != _typeof ( t ) || ! t ) return t ; var e = t [ Symbol . toPrimitive ] ; if ( void 0 !== e ) { var i = e . call ( t , r || "default" ) ; if ( "object" != _typeof ( i ) ) return i ; throw new TypeError ( "@@toPrimitive must return a primitive value." ) ; } return ( "string" === r ? String : Number ) ( t ) ; }
196
196
function _typeof ( o ) { "@babel/helpers - typeof" ; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( o ) { return typeof o ; } : function ( o ) { return o && "function" == typeof Symbol && o . constructor === Symbol && o !== Symbol . prototype ? "symbol" : typeof o ; } , _typeof ( o ) ; }
@@ -1011,7 +1011,7 @@ var _sdp = _interopRequireDefault(require("sdp"));
1011
1011
var utils = _interopRequireWildcard ( require ( "./utils" ) ) ;
1012
1012
function _getRequireWildcardCache ( e ) { if ( "function" != typeof WeakMap ) return null ; var r = new WeakMap ( ) , t = new WeakMap ( ) ; return ( _getRequireWildcardCache = function _getRequireWildcardCache ( e ) { return e ? t : r ; } ) ( e ) ; }
1013
1013
function _interopRequireWildcard ( e , r ) { if ( ! r && e && e . __esModule ) return e ; if ( null === e || "object" != _typeof ( e ) && "function" != typeof e ) return { "default" : e } ; var t = _getRequireWildcardCache ( r ) ; if ( t && t . has ( e ) ) return t . get ( e ) ; var n = { __proto__ : null } , a = Object . defineProperty && Object . getOwnPropertyDescriptor ; for ( var u in e ) if ( "default" !== u && { } . hasOwnProperty . call ( e , u ) ) { var i = a ? Object . getOwnPropertyDescriptor ( e , u ) : null ; i && ( i . get || i . set ) ? Object . defineProperty ( n , u , i ) : n [ u ] = e [ u ] ; } return n [ "default" ] = e , t && t . set ( e , n ) , n ; }
1014
- function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { "default" : obj } ; }
1014
+ function _interopRequireDefault ( e ) { return e && e . __esModule ? e : { "default" : e } ; }
1015
1015
function _typeof ( o ) { "@babel/helpers - typeof" ; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( o ) { return typeof o ; } : function ( o ) { return o && "function" == typeof Symbol && o . constructor === Symbol && o !== Symbol . prototype ? "symbol" : typeof o ; } , _typeof ( o ) ; }
1016
1016
function shimRTCIceCandidate ( window ) {
1017
1017
// foundation is arbitrarily chosen as an indicator for full support for
@@ -1321,7 +1321,7 @@ function removeExtmapAllowMixed(window, browserDetails) {
1321
1321
if ( browserDetails . browser === 'chrome' && browserDetails . version >= 71 ) {
1322
1322
return ;
1323
1323
}
1324
- if ( browserDetails . browser === 'safari' && browserDetails . version >= 605 ) {
1324
+ if ( browserDetails . browser === 'safari' && browserDetails . _safariVersion >= 13.1 ) {
1325
1325
return ;
1326
1326
}
1327
1327
var nativeSRD = window . RTCPeerConnection . prototype . setRemoteDescription ;
@@ -1464,13 +1464,13 @@ var _getusermedia = require("./getusermedia");
1464
1464
var _getdisplaymedia = require ( "./getdisplaymedia" ) ;
1465
1465
function _getRequireWildcardCache ( e ) { if ( "function" != typeof WeakMap ) return null ; var r = new WeakMap ( ) , t = new WeakMap ( ) ; return ( _getRequireWildcardCache = function _getRequireWildcardCache ( e ) { return e ? t : r ; } ) ( e ) ; }
1466
1466
function _interopRequireWildcard ( e , r ) { if ( ! r && e && e . __esModule ) return e ; if ( null === e || "object" != _typeof ( e ) && "function" != typeof e ) return { "default" : e } ; var t = _getRequireWildcardCache ( r ) ; if ( t && t . has ( e ) ) return t . get ( e ) ; var n = { __proto__ : null } , a = Object . defineProperty && Object . getOwnPropertyDescriptor ; for ( var u in e ) if ( "default" !== u && { } . hasOwnProperty . call ( e , u ) ) { var i = a ? Object . getOwnPropertyDescriptor ( e , u ) : null ; i && ( i . get || i . set ) ? Object . defineProperty ( n , u , i ) : n [ u ] = e [ u ] ; } return n [ "default" ] = e , t && t . set ( e , n ) , n ; }
1467
- function _toConsumableArray ( arr ) { return _arrayWithoutHoles ( arr ) || _iterableToArray ( arr ) || _unsupportedIterableToArray ( arr ) || _nonIterableSpread ( ) ; }
1467
+ function _toConsumableArray ( r ) { return _arrayWithoutHoles ( r ) || _iterableToArray ( r ) || _unsupportedIterableToArray ( r ) || _nonIterableSpread ( ) ; }
1468
1468
function _nonIterableSpread ( ) { throw new TypeError ( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ; }
1469
- function _unsupportedIterableToArray ( o , minLen ) { if ( ! o ) return ; if ( typeof o === "string" ) return _arrayLikeToArray ( o , minLen ) ; var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ; if ( n === "Object" && o . constructor ) n = o . constructor . name ; if ( n === "Map" || n === "Set" ) return Array . from ( o ) ; if ( n === "Arguments" || / ^ (?: U i | I ) n t (?: 8 | 1 6 | 3 2 ) (?: C l a m p e d ) ? A r r a y $ / . test ( n ) ) return _arrayLikeToArray ( o , minLen ) ; }
1470
- function _iterableToArray ( iter ) { if ( typeof Symbol !== "undefined" && iter [ Symbol . iterator ] != null || iter [ "@@iterator" ] != null ) return Array . from ( iter ) ; }
1471
- function _arrayWithoutHoles ( arr ) { if ( Array . isArray ( arr ) ) return _arrayLikeToArray ( arr ) ; }
1472
- function _arrayLikeToArray ( arr , len ) { if ( len == null || len > arr . length ) len = arr . length ; for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) arr2 [ i ] = arr [ i ] ; return arr2 ; }
1473
- function _defineProperty ( obj , key , value ) { key = _toPropertyKey ( key ) ; if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
1469
+ function _unsupportedIterableToArray ( r , a ) { if ( r ) { if ( "string" == typeof r ) return _arrayLikeToArray ( r , a ) ; var t = { } . toString . call ( r ) . slice ( 8 , - 1 ) ; return "Object" === t && r . constructor && ( t = r . constructor . name ) , "Map" === t || "Set" === t ? Array . from ( r ) : "Arguments" === t || / ^ (?: U i | I ) n t (?: 8 | 1 6 | 3 2 ) (?: C l a m p e d ) ? A r r a y $ / . test ( t ) ? _arrayLikeToArray ( r , a ) : void 0 ; } }
1470
+ function _iterableToArray ( r ) { if ( "undefined" != typeof Symbol && null != r [ Symbol . iterator ] || null != r [ "@@iterator" ] ) return Array . from ( r ) ; }
1471
+ function _arrayWithoutHoles ( r ) { if ( Array . isArray ( r ) ) return _arrayLikeToArray ( r ) ; }
1472
+ function _arrayLikeToArray ( r , a ) { ( null == a || a > r . length ) && ( a = r . length ) ; for ( var e = 0 , n = Array ( a ) ; e < a ; e ++ ) n [ e ] = r [ e ] ; return n ; }
1473
+ function _defineProperty ( e , r , t ) { return ( r = _toPropertyKey ( r ) ) in e ? Object . defineProperty ( e , r , { value : t , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ r ] = t , e ; }
1474
1474
function _toPropertyKey ( t ) { var i = _toPrimitive ( t , "string" ) ; return "symbol" == _typeof ( i ) ? i : i + "" ; }
1475
1475
function _toPrimitive ( t , r ) { if ( "object" != _typeof ( t ) || ! t ) return t ; var e = t [ Symbol . toPrimitive ] ; if ( void 0 !== e ) { var i = e . call ( t , r || "default" ) ; if ( "object" != _typeof ( i ) ) return i ; throw new TypeError ( "@@toPrimitive must return a primitive value." ) ; } return ( "string" === r ? String : Number ) ( t ) ; }
1476
1476
function _typeof ( o ) { "@babel/helpers - typeof" ; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( o ) { return typeof o ; } : function ( o ) { return o && "function" == typeof Symbol && o . constructor === Symbol && o !== Symbol . prototype ? "symbol" : typeof o ; } , _typeof ( o ) ; }
@@ -2221,7 +2221,7 @@ exports.filterStats = filterStats;
2221
2221
exports . log = log ;
2222
2222
exports . walkStats = walkStats ;
2223
2223
exports . wrapPeerConnectionEvent = wrapPeerConnectionEvent ;
2224
- function _defineProperty ( obj , key , value ) { key = _toPropertyKey ( key ) ; if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2224
+ function _defineProperty ( e , r , t ) { return ( r = _toPropertyKey ( r ) ) in e ? Object . defineProperty ( e , r , { value : t , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ r ] = t , e ; }
2225
2225
function _toPropertyKey ( t ) { var i = _toPrimitive ( t , "string" ) ; return "symbol" == _typeof ( i ) ? i : i + "" ; }
2226
2226
function _toPrimitive ( t , r ) { if ( "object" != _typeof ( t ) || ! t ) return t ; var e = t [ Symbol . toPrimitive ] ; if ( void 0 !== e ) { var i = e . call ( t , r || "default" ) ; if ( "object" != _typeof ( i ) ) return i ; throw new TypeError ( "@@toPrimitive must return a primitive value." ) ; } return ( "string" === r ? String : Number ) ( t ) ; }
2227
2227
function _typeof ( o ) { "@babel/helpers - typeof" ; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( o ) { return typeof o ; } : function ( o ) { return o && "function" == typeof Symbol && o . constructor === Symbol && o !== Symbol . prototype ? "symbol" : typeof o ; } , _typeof ( o ) ; }
@@ -2238,7 +2238,7 @@ var deprecationWarnings_ = true;
2238
2238
*/
2239
2239
function extractVersion ( uastring , expr , pos ) {
2240
2240
var match = uastring . match ( expr ) ;
2241
- return match && match . length >= pos && parseInt ( match [ pos ] , 10 ) ;
2241
+ return match && match . length >= pos && parseFloat ( match [ pos ] , 10 ) ;
2242
2242
}
2243
2243
2244
2244
// Wraps the peerconnection event eventNameToWrap in a function
@@ -2381,19 +2381,21 @@ function detectBrowser(window) {
2381
2381
if ( navigator . mozGetUserMedia ) {
2382
2382
// Firefox.
2383
2383
result . browser = 'firefox' ;
2384
- result . version = extractVersion ( navigator . userAgent , / F i r e f o x \/ ( \d + ) \. / , 1 ) ;
2384
+ result . version = parseInt ( extractVersion ( navigator . userAgent , / F i r e f o x \/ ( \d + ) \. / , 1 ) ) ;
2385
2385
} else if ( navigator . webkitGetUserMedia || window . isSecureContext === false && window . webkitRTCPeerConnection ) {
2386
2386
// Chrome, Chromium, Webview, Opera.
2387
2387
// Version matches Chrome/WebRTC version.
2388
2388
// Chrome 74 removed webkitGetUserMedia on http as well so we need the
2389
2389
// more complicated fallback to webkitRTCPeerConnection.
2390
2390
result . browser = 'chrome' ;
2391
- result . version = extractVersion ( navigator . userAgent , / C h r o m ( e | i u m ) \/ ( \d + ) \. / , 2 ) ;
2391
+ result . version = parseInt ( extractVersion ( navigator . userAgent , / C h r o m ( e | i u m ) \/ ( \d + ) \. / , 2 ) ) ;
2392
2392
} else if ( window . RTCPeerConnection && navigator . userAgent . match ( / A p p l e W e b K i t \/ ( \d + ) \. / ) ) {
2393
2393
// Safari.
2394
2394
result . browser = 'safari' ;
2395
- result . version = extractVersion ( navigator . userAgent , / A p p l e W e b K i t \/ ( \d + ) \. / , 1 ) ;
2395
+ result . version = parseInt ( extractVersion ( navigator . userAgent , / A p p l e W e b K i t \/ ( \d + ) \. / , 1 ) ) ;
2396
2396
result . supportsUnifiedPlan = window . RTCRtpTransceiver && 'currentDirection' in window . RTCRtpTransceiver . prototype ;
2397
+ // Only for internal usage.
2398
+ result . _safariVersion = extractVersion ( navigator . userAgent , / V e r s i o n \/ ( \d + ( \. ? \d + ) ) / ) ;
2397
2399
} else {
2398
2400
// Default fallthrough: not supported.
2399
2401
result . browser = 'Not a supported browser.' ;
0 commit comments