mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2024-12-08 09:21:14 +01:00
1 line
88 KiB
JavaScript
1 line
88 KiB
JavaScript
|
!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 n(i,o,a){function s(t,e){if(!o[t]){if(!i[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(c)return c(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},i[t][0].call(r.exports,function(e){return s(i[t][1][e]||e)},r,r.exports,n,i,o,a)}return o[t].exports}for(var c="function"==typeof require&&require,e=0;e<a.length;e++)s(a[e]);return s}({1:[function(e,t,r){"use strict";e=(0,e("./adapter_factory.js").adapterFactory)({window:"undefined"==typeof window?void 0:window});t.exports=e},{"./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=o.log,n=o.detectBrowser(e),i={browserDetails:n,commonShim:p,extractVersion:o.extractVersion,disableLog:o.disableLog,disableWarnings:o.disableWarnings};switch(n.browser){case"chrome":if(!a||!a.shimPeerConnection||!t.shimChrome)return r("Chrome shim is not included in this adapter release."),i;if(null===n.version)return r("Chrome shim can not determine version, not shimming."),i;r("adapter.js shimming chrome."),i.browserShim=a,p.shimAddIceCandidateNullOrEmpty(e,n),a.shimGetUserMedia(e,n),a.shimMediaStream(e,n),a.shimPeerConnection(e,n),a.shimOnTrack(e,n),a.shimAddTrackRemoveTrack(e,n),a.shimGetSendersWithDtmf(e,n),a.shimGetStats(e,n),a.shimSenderReceiverGetStats(e,n),a.fixNegotiationNeeded(e,n),p.shimRTCIceCandidate(e,n),p.shimConnectionState(e,n),p.shimMaxMessageSize(e,n),p.shimSendThrowTypeError(e,n),p.removeExtmapAllowMixed(e,n);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,p.shimAddIceCandidateNullOrEmpty(e,n),c.shimGetUserMedia(e,n),c.shimPeerConnection(e,n),c.shimOnTrack(e,n),c.shimRemoveStream(e,n),c.shimSenderGetStats(e,n),c.shimReceiverGetStats(e,n),c.shimRTCDataChannel(e,n),c.shimAddTransceiver(e,n),c.shimGetParameters(e,n),c.shimCreateOffer(e,n),c.shimCreateAnswer(e,n),p.shimRTCIceCandidate(e,n),p.shimConnectionState(e,n),p.shimMaxMessageSize(e,n),p.shimSendThrowTypeError(e,n);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,n),s.shimGetDisplayMedia(e,n),s.shimPeerConnection(e,n),s.shimReplaceTrack(e,n),p.shimMaxMessageSize(e,n),p.shimSendThrowTypeError(e,n);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,p.shimAddIceCandidateNullOrEmpty(e,n),d.shimRTCIceServerUrls(e,n),d.shimCreateOfferLegacy(e,n),d.shimCallbacksAPI(e,n),d.shimLocalStreamsAPI(e,n),d.shimRemoteStreamsAPI(e,n),d.shimTrackEventTransceiver(e,n),d.shimGetUserMedia(e,n),d.shimAudioContext(e,n),p.shimRTCIceCandidate(e,n),p.shimMaxMessageSize(e,n),p.shimSendThrowTypeError(e,n),p.removeExtmapAllowMixed(e,n);break;default:r("Unsupported browser!")}return i};var o=n(e("./utils")),a=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
|