1 line
57 KiB
JavaScript
1 line
57 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(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}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,shimSafari:!0},r=o.log,n=o.detectBrowser(e),i={browserDetails:n,commonShim:p,extractVersion:o.extractVersion,disableLog:o.disableLog,disableWarnings:o.disableWarnings,sdp:d};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),p.shimParameterlessSetLocalDescription(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.shimRTCIceCandidateRelayProtocol(e,n),p.shimConnectionState(e,n),p.shimMaxMessageSize(e,n),p.shimSendThrowTypeError(e,n),p.removeExtmapAllowMixed(e,n);break;case"firefox":if(!s||!s.shimPeerConnection||!t.shimFirefox)return r("Firefox shim is not included in this adapter release."),i;r("adapter.js shimming firefox."),i.browserShim=s,p.shimAddIceCandidateNullOrEmpty(e,n),p.shimParameterlessSetLocalDescription(e,n),s.shimGetUserMedia(e,n),s.shimPeerConnection(e,n),s.shimOnTrack(e,n),s.shimRemoveStream(e,n),s.shimSenderGetStats(e,n),s.shimReceiverGetStats(e,n),s.shimRTCDataChannel(e,n),s.shimAddTransceiver(e,n),s.shimGetParameters(e,n),s.shimCreateOffer(e,n),s.shimCreateAnswer(e,n),p.shimRTCIceCandidate(e,n),p.shimConnectionState(e,n),p.shimMaxMessageSize(e,n),p.shimSendThrowTypeError(e,n);break;case"safari":if(!c||!t.shimSafari)return r("Safari shim is not included in this adapter release."),i;r("adapter.js shimming safari."),i.browserShim=c,p.shimAddIceCandidateNullOrEmpty(e,n),p.shimParameterlessSetLocalDescription(e,n),c.shimRTCIceServerUrls(e,n),c.shimCreateOfferLegacy(e,n),c.shimCallbacksAPI(e,n),c.shimLocalStreamsAPI(e,n),c.shimRemoteStreamsAPI(e,n),c.shimTrackEventTransceiver(e,n),c.shimGetUserMedia(e,n),c.shimAudioContext(e,n),p.shimRTCIceCandidate(e,n),p.shimRTCIceCandidateRelayProtocol(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("./firefox/firefox_shim")),c=n(e("./safari/safari_shim")),p=n(e("./common_shim")),d=n(e("sdp"));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,"./firefox/firefox_shim":7,"./safari/safari_shim":10,"./utils":11,sdp:12}],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.constr
|