LocalCDN-Firefox-Chrome-Brave/resources/webrtc-adapter/7.4.0/adapter.min.jsm

2 lines
87 KiB
JavaScript
Raw Normal View History

2020-11-14 09:52:21 +01:00
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).adapter=e()}(function(){return function a(o,s,c){function d(t,e){if(!s[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(p)return p(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var i=s[t]={exports:{}};o[t][0].call(i.exports,function(e){return d(o[t][1][e]||e)},i,i.exports,a,o,s,c)}return s[t].exports}for(var p="function"==typeof require&&require,e=0;e<c.length;e++)d(c[e]);return d}({1:[function(e,t,r){"use strict";var n=(0,e("./adapter_factory.js").adapterFactory)({window:window});t.exports=n},{"./adapter_factory.js":2}],2:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.adapterFactory=function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).window,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0},r=a.log,n=a.detectBrowser(e),i={browserDetails:n,commonShim:p,extractVersion:a.extractVersion,disableLog:a.disableLog,disableWarnings:a.disableWarnings};switch(n.browser){case"chrome":if(!o||!o.shimPeerConnection||!t.shimChrome)return r("Chrome shim is not included in this adapter release."),i;r("adapter.js shimming chrome."),(i.browserShim=o).shimGetUserMedia(e),o.shimMediaStream(e),o.shimPeerConnection(e),o.shimOnTrack(e),o.shimAddTrackRemoveTrack(e),o.shimGetSendersWithDtmf(e),o.shimGetStats(e),o.shimSenderReceiverGetStats(e),o.fixNegotiationNeeded(e),p.shimRTCIceCandidate(e),p.shimConnectionState(e),p.shimMaxMessageSize(e),p.shimSendThrowTypeError(e),p.removeAllowExtmapMixed(e);break;case"firefox":if(!c||!c.shimPeerConnection||!t.shimFirefox)return r("Firefox shim is not included in this adapter release."),i;r("adapter.js shimming firefox."),(i.browserShim=c).shimGetUserMedia(e),c.shimPeerConnection(e),c.shimOnTrack(e),c.shimRemoveStream(e),c.shimSenderGetStats(e),c.shimReceiverGetStats(e),c.shimRTCDataChannel(e),c.shimAddTransceiver(e),c.shimCreateOffer(e),c.shimCreateAnswer(e),p.shimRTCIceCandidate(e),p.shimConnectionState(e),p.shimMaxMessageSize(e),p.shimSendThrowTypeError(e);break;case"edge":if(!s||!s.shimPeerConnection||!t.shimEdge)return r("MS edge shim is not included in this adapter release."),i;r("adapter.js shimming edge."),(i.browserShim=s).shimGetUserMedia(e),s.shimGetDisplayMedia(e),s.shimPeerConnection(e),s.shimReplaceTrack(e),p.shimMaxMessageSize(e),p.shimSendThrowTypeError(e);break;case"safari":if(!d||!t.shimSafari)return r("Safari shim is not included in this adapter release."),i;r("adapter.js shimming safari."),(i.browserShim=d).shimRTCIceServerUrls(e),d.shimCreateOfferLegacy(e),d.shimCallbacksAPI(e),d.shimLocalStreamsAPI(e),d.shimRemoteStreamsAPI(e),d.shimTrackEventTransceiver(e),d.shimGetUserMedia(e),p.shimRTCIceCandidate(e),p.shimMaxMessageSize(e),p.shimSendThrowTypeError(e),p.removeAllowExtmapMixed(e);break;default:r("Unsupported browser!")}return i};var a=n(e("./utils")),o=n(e("./chrome/chrome_shim")),s=n(e("./edge/edge_shim")),c=n(e("./firefox/firefox_shim")),d=n(e("./safari/safari_shim")),p=n(e("./common_shim"));function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}},{"./chrome/chrome_shim":3,"./common_shim":6,"./edge/edge_shim":7,"./firefox/firefox_shim":11,"./safari/safari_shim":14,"./utils":15}],3:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.shimGetDisplayMedia=r.shimGetUserMedia=void 0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=e("./getusermedia");Object.defineProperty(r,"shimGetUserMedia",{enumerable:!0,get:function(){return n.shimGetUserMedia}});var i=e("./getdisplaymedia")