84 lines
244 KiB
JavaScript
84 lines
244 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d1e3ca3"],{2415:function(e,t,r){"use strict";r.r(t);var i=r("ba56"),a=r.n(i);function n(e){var t=e.src,r=e.autoplay,i=void 0!==r&&r,n=e.media,s=e.callback,o=void 0===s?function(){return{}}:s;if(a.a.isSupported()){var l=new a.a;l.loadSource(t),l.attachMedia(n),l.on(a.a.Events.ERROR,(function(e,t){if(t.fatal)switch(t.type){case a.a.ErrorTypes.NETWORK_ERROR:l.startLoad();break;default:l.destroy();break}})),i&&l.on(a.a.Events.MANIFEST_PARSED,(function(){n.play()})),o(l)}}t["default"]=n},ba56:function(e,t,r){"undefined"!==typeof window&&function(t,r){e.exports=r()}(0,(function(){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(i,a,function(t){return e[t]}.bind(null,a));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/dist/",r(r.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":
|
||
|
/*!*********************************************!*\
|
||
|
!*** ./node_modules/eventemitter3/index.js ***!
|
||
|
\*********************************************/
|
||
|
/*! no static exports found */
|
||
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){"use strict";var i=Object.prototype.hasOwnProperty,a="~";function n(){}function s(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,r,i,n){if("function"!==typeof r)throw new TypeError("The listener must be a function");var o=new s(r,i||e,n),l=a?a+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function l(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function u(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(a=!1)),u.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)i.call(e,t)&&r.push(a?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},u.prototype.listeners=function(e){var t=a?a+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,n=r.length,s=new Array(n);i<n;i++)s[i]=r[i].fn;return s},u.prototype.listenerCount=function(e){var t=a?a+e:e,r=this._events[t];return r?r.fn?1:r.length:0},u.prototype.emit=function(e,t,r,i,n,s){var o=a?a+e:e;if(!this._events[o])return!1;var l,u,d=this._events[o],c=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),c){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,i),!0;case 5:return d.fn.call(d.context,t,r,i,n),!0;case 6:return d.fn.call(d.context,t,r,i,n,s),!0}for(u=1,l=new Array(c-1);u<c;u++)l[u-1]=arguments[u];d.fn.apply(d.context,l)}else{var f,h=d.length;for(u=0;u<h;u++)switch(d[u].once&&this.removeListener(e,d[u].fn,void 0,!0),c){case 1:d[u].fn.call(d[u].context);break;case 2:d[u].fn.call(d[u].context,t);break;case 3:d[u].fn.call(d[u].context,t,r);break;case 4:d[u].fn.call(d[u].context,t,r,i);break;default:if(!l)for(f=1,l=new Array(c-1);f<c;f++)l[f-1]=arguments[f];d[u].fn.apply(d[u].context,l)}}return!0},u.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},u.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},u.prototype.removeListener=function(e,t,r,i){var n=a?a+e:e;if(!this._events[n])return this;if(!t)return l(this,n),this;var s=this._events[n];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||l(this,n);else{for(var o=0,u=[],d=s.length;o<d;o++)(s[o].fn!==t||i&&!s[o].once||r&&s[o].context!==r)&&u.push(s[o]);u.length?this._events[n]=1===u.length?u[0]:u:l(this,n)}return this},u.prototype.removeAllListeners=function(e){var t;return e?(t=a?a+e:e,this._events[t]&&l(this,t)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=a,u.EventEmitter=u,e.exports=u},"./node_modules/url-toolkit/src/url-toolkit.js":
|
||
|
/*!*****************************************************!*\
|
||
|
!*** ./node_modules/url-toolkit/src/url-toolkit.js ***!
|
||
|
\*****************************************************/
|
||
|
/*! no static exports found */
|
||
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){(function(t){var r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,i=/^([^\/?#]*)(.*)$/,a=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),t=t.trim(),!t){if(!r.alwaysNormalize)return e;var a=s.parseURL(e);if(!a)throw new Error("Error trying to parse base URL.");return a.path=s.normalizePath(a.path),s.buildURLFromParts(a)}var n=s.parseURL(t);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return r.alwaysNormalize?(n.path=s.normalizePath(n.path),s.buildURLFromParts(n)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(u.netLoc=o.netLoc,"/"!==n.path[0]))if(n.path){var d=o.path,c=d.substring(0,d.lastIndexOf("/")+1)+n.path;u.path=s.normalizePath(c)}else u.path=o.path,n.params||(u.params=o.params,n.query||(u.query=o.query));return null===u.path&&(u.path=r.alwaysNormalize?s.normalizePath(n.path):n.path),s.buildURLFromParts(u)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){e=e.split("").reverse().join("").replace(a,"");while(e.length!==(e=e.replace(n,"")).length);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=s})()},"./node_modules/webworkify-webpack/index.js":
|
||
|
/*!**************************************************!*\
|
||
|
!*** ./node_modules/webworkify-webpack/index.js ***!
|
||
|
\**************************************************/
|
||
|
/*! no static exports found */
|
||
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){function i(e){var t={};function r(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r.oe=function(e){throw console.error(e),e};var i=r(r.s=ENTRY_MODULE);return i.default||i}var a="[\\.|\\-|\\+|\\w|/|@]+",n="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+a+").*?\\)";function s(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(e){return!isNaN(1*e)}function l(e,t,i){var l={};l[i]=[];var u=t.toString(),d=u.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!d)return l;var c,f=d[1],h=new RegExp("(\\\\n|\\W)"+s(f)+n,"g");while(c=h.exec(u))"dll-reference"!==c[3]&&l[i].push(c[3]);h=new RegExp("\\("+s(f)+'\\("(dll-reference\\s('+a+'))"\\)\\)'+n,"g");while(c=h.exec(u))e[c[2]]||(l[i].push(c[1]),e[c[2]]=r(c[1]).m),l[c[2]]=l[c[2]]||[],l[c[2]].push(c[4]);for(var g=Object.keys(l),p=0;p<g.length;p++)for(var v=0;v<l[g[p]].length;v++)o(l[g[p]][v])&&(l[g[p]][v]=1*l[g[p]][v]);return l}function u(e){var t=Object.keys(e);return t.reduce((function(t,r){return t||e[r].length>0}),!1)}function d(e,t){var r={main:[t]},i={main:[]},a={main:{}};while(u(r))for(var n=Object.keys(r),s=0;s<n.length;s++){var o=n[s],d=r[o],c=d.pop();if(a[o]=a[o]||{},!a[o][c]&&e[o][c]){a[o][c]=!0,i[o]=i[o]||[],i[o].push(c);for(var f=l(e,e[o][c],o),h=Object.keys(f),g=0;g<h.length;g++)r[h[g]]=r[h[g]]||[],r[h[g]]=r[h[g]].concat(f[h[g]])}}return i}e.exports=function(e,t){t=t||{};var a={main:r.m},n=t.all?{main:Object.keys(a.main)}:d(a,e),s="";Object.keys(n).filter((function(e){return"main"!==e})).forEach((function(e){var t=0;while(n[e][t])t++;n[e].push(t),a[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",s=s+"var "+e+" = ("+i.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+n[e].map((function(t){return JSON.stringify(t)+": "+a[e][t].toString()})).join(",")+"});\n"})),s=s+"new (("+i.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+n.main.map((function(e){return JSON.stringify(e)+": "+a.main[e].toString()})).join(",")+"}))(self);";var o=new window.Blob([s],{type:"text/javascript"});if(t.bare)return o;var l=window.URL||window.webkitURL||window.mozURL||window.msURL,u=l.createObjectURL(o),c=new window.Worker(u);return c.objectURL=u,c}},"./src/crypt/decrypter.js":
|
||
|
/*!********************************************!*\
|
||
|
!*** ./src/crypt/decrypter.js + 3 modules ***!
|
||
|
\********************************************/
|
||
|
/*! exports provided: default */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/hls.ts */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/hls.ts */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/hls.ts */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/hls.ts */function(e,t,r){"use strict";r.r(t);var i=function(){function e(e,t){this.subtle=e,this.aesIV=t}var t=e.prototype;return t.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}(),a=function(){function e(e,t){this.subtle=e,this.key=t}var t=e.prototype;return t.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}(),n=a;function s(e){var t=e.byteLength,r=t&&new DataView(e).getUint8(t-1);return r?e.slice(0,t-r):e}var o=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),r=new Uint32Array(4),i=0;i<4;i++)r[i]=t.getUint32(4*i);return r},t.initTable=function(){var e=this.sBox,t=this.invSBox,r=this.subMix,i=r[0],a=r[1],n=r[2],s=r[3],o=this.invSubMix,l=o[0],u=o[1],d=o[2],c=o[3],f=new Uint32Array(256),h=0,g=0,p=0;for(p=0;p<256;p++)f[p]=p<128?p<<1:p<<1^283;for(p=0;p<256;p++){var v=g^g<<1^g<<2^g<<3^g<<4;v=v>>>8^255&v^99,e[h]=v,t[v]=h;var m=f[h],y=f[m],E=f[y],T=257*f[v]^16843008*v;i[h]=T<<24|T>>>8,a[h]=T<<16|T>>>16,n[h]=T<<8|T>>>24,s[h]=T,T=16843009*E^65537*y^257*m^16843008*h,l[v]=T<<24|T>>>8,u[v]=T<<16|T>>>16,d[v]=T<<8|T>>>24,c[v]=T,h?(h=m^f[f[f[E^m]]],g^=f[f[g]]):h=g=1}},t.expandKey=function(e){var t=this.uint8ArrayToUint32Array_(e),r=!0,i=0;while(i<t.length&&r)r=t[i]===this.key[i],i++;if(!r){this.key=t;var a=this.keySize=t.length;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size="+a);var n,s,o,l,u=this.ksRows=4*(a+6+1),d=this.keySchedule=new Uint32Array(u),c=this.invKeySchedule=new Uint32Array(u),f=this.sBox,h=this.rcon,g=this.invSubMix,p=g[0],v=g[1],m=g[2],y=g[3];for(n=0;n<u;n++)n<a?o=d[n]=t[n]:(l=o,n%a===0?(l=l<<8|l>>>24,l=f[l>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l],l^=h[n/a|0]<<24):a>6&&n%a===4&&(l=f[l>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l]),d[n]=o=(d[n-a]^l)>>>0);for(s=0;s<u;s++)n=u-s,l=3&s?d[n]:d[n-4],c[s]=s<4||n<=4?l:p[f[l>>>24]]^v[f[l>>>16&255]]^m[f[l>>>8&255]]^y[f[255&l]],c[s]=c[s]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,r,i){var a,n,o,l,u,d,c,f,h,g,p,v,m,y,E=this.keySize+6,T=this.invKeySchedule,S=this.invSBox,b=this.invSubMix,_=b[0],A=b[1],R=b[2],D=b[3],L=this.uint8ArrayToUint32Array_(r),w=L[0],k=L[1],I=L[2],O=L[3],C=new Int32Array(e),P=new Int32Array(C.length),x=this.networkToHostOrderSwap;while(t<C.length){for(h=x(C[t]),g=x(C[t+1]),p=x(C[t+2]),v=x(C[t+3]),u=h^T[0],d=v^T[1],c=p^T[2],f=g^T[3],m=4,y=1;y<E;y++)a=_[u>>>24]^A[d>>16&255]^R[c>>8&255]^D[255&f]^T[m],n=_[d>>>24]^A[c>>16&255]^R[f>>8&255]^D[255&u]^T[m+1],o=_[c>>>24]^A[f>>16&255]^R[u>>8&255]^D[255&d]^T[m+2],l=_[f>>>24]^A[u>>16&255]^R[d>>8&255]^D[255&c]^T[m+3],u=a,d=n,c=o,f=l,m+=4;a=S[u>>>24]<<24^S[d>>16&255]<<16^S[c>>8&255]<<8^S[255&f]^T[m],n=S[d>>>24]<<24^S[c>>16&255]<<16^S[f>>8&255]<<8^S[255&u]^T[m+1],o=S[c>>>24]<<24^S[f>>16&255]<<16^S[u>>8&255]<<8^S[255&d]^T[m+2],l=S[f>>>24]<<24^S[u>>16&255]<<16^S[d>>8&255]<<8^S[255&c]^T[m+3],m+=3,P[t]=x(a^w),P[t+1]=x(l^k),P[t+2]=x(o^I),P[t+3]=x(n^O),w=h,k=g,I=p,O=v,t+=4}return i?s(P.buffer):P.buffer},t.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},e}(),l=o,u=r("./src/errors.ts"),d=r("./src/utils/logger.js"),c=r("./src/events.js"),f=r("./src/utils/get-self-scope.js"),h=Object(f["getSelfScope"])(),g=function(){function e(e,t,r){var i=void 0===r?{}:r,a=i.removePKCS7Padding,n=void 0===a||a;if(this.logEnabled=!0,this.observer=e,this.config=t,this.removePKCS
|
||
|
/*!**************************************************!*\
|
||
|
!*** ./src/demux/demuxer-inline.js + 12 modules ***!
|
||
|
\**************************************************/
|
||
|
/*! exports provided: default */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/crypt/decrypter.js because of ./src/hls.ts */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/id3.js because of ./src/hls.ts */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/mp4demuxer.js because of ./src/hls.ts */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/hls.ts */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/hls.ts */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/polyfills/number-isFinite.js because of ./src/hls.ts */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/hls.ts */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/hls.ts */function(e,t,r){"use strict";r.r(t);var i=r("./src/events.js"),a=r("./src/errors.ts"),n=r("./src/crypt/decrypter.js"),s=r("./src/polyfills/number-isFinite.js"),o=r("./src/utils/logger.js"),l=r("./src/utils/get-self-scope.js");function u(e,t,r,n){var s,l,u,d,c,f=navigator.userAgent.toLowerCase(),h=n,g=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(s=1+((192&t[r+2])>>>6),l=(60&t[r+2])>>>2,!(l>g.length-1))return d=(1&t[r+2])<<2,d|=(192&t[r+3])>>>6,o["logger"].log("manifest codec:"+n+",ADTS data:type:"+s+",sampleingIndex:"+l+"["+g[l]+"Hz],channelConfig:"+d),/firefox/i.test(f)?l>=6?(s=5,c=new Array(4),u=l-3):(s=2,c=new Array(2),u=l):-1!==f.indexOf("android")?(s=2,c=new Array(2),u=l):(s=5,c=new Array(4),n&&(-1!==n.indexOf("mp4a.40.29")||-1!==n.indexOf("mp4a.40.5"))||!n&&l>=6?u=l-3:((n&&-1!==n.indexOf("mp4a.40.2")&&(l>=6&&1===d||/vivaldi/i.test(f))||!n&&1===d)&&(s=2,c=new Array(2)),u=l)),c[0]=s<<3,c[0]|=(14&l)>>1,c[1]|=(1&l)<<7,c[1]|=d<<3,5===s&&(c[1]|=(14&u)>>1,c[2]=(1&u)<<7,c[2]|=8,c[3]=0),{config:c,samplerate:g[l],channelCount:d,codec:"mp4a.40."+s,manifestCodec:h};e.trigger(i["default"].ERROR,{type:a["ErrorTypes"].MEDIA_ERROR,details:a["ErrorDetails"].FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+l})}function d(e,t){return 255===e[t]&&240===(246&e[t+1])}function c(e,t){return 1&e[t+1]?7:9}function f(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function h(e,t){return!!(t+1<e.length&&d(e,t))}function g(e,t){if(h(e,t)){var r=c(e,t),i=r;t+5<e.length&&(i=f(e,t));var a=t+i;if(a===e.length||a+1<e.length&&d(e,a))return!0}return!1}function p(e,t,r,i,a){if(!e.samplerate){var n=u(t,r,i,a);e.config=n.config,e.samplerate=n.samplerate,e.channelCount=n.channelCount,e.codec=n.codec,e.manifestCodec=n.manifestCodec,o["logger"].log("parsed codec:"+e.codec+",rate:"+n.samplerate+",nb channel:"+n.channelCount)}}function v(e){return 9216e4/e}function m(e,t,r,i,a){var n,s,o,l=e.length;if(n=c(e,t),s=f(e,t),s-=n,s>0&&t+n+s<=l)return o=r+i*a,{headerLength:n,frameLength:s,stamp:o}}function y(e,t,r,i,a){var n=v(e.samplerate),s=m(t,r,i,a,n);if(s){var o=s.stamp,l=s.headerLength,u=s.frameLength,d={unit:t.subarray(r+l,r+l+u),pts:o,dts:o};return e.samples.push(d),{sample:d,length:u+l}}}var E=r("./src/demux/id3.js"),T=function(){function e(e,t,r){this.observer=e,this.config=r,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,r,i){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:t,duration:i,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){if(!e)return!1;for(var t=E["default"].getID3Data(e,0)||[],r=t.length,i=e.length;r<i;r++)if(g(e,r))return o["logger"].log("ADTS sync word found !"),!0;return!1},t.append=function(e,t,r,i){var a=this._audioTrack,n=E["default"].getID3Data(e,0)||[],l=E["default"].getTimeStamp(n),u=Object(s["isFiniteNumber"])(l)?90*l:9e4*t,d=0,c=u,f=e.length,g=n.length,v=[{pts:c,dts:c,data:n}];while(g<f-1)if(h(e,g)&&g+5<f){p(a,this.observer,e,g,a.manifestCodec);var m=y(a,e,g,u,d);if(!m){o["logger"].log("Unable to parse AAC frame");break}g+=m.length,c=m.sample.pts,d++}else E["default"].isHeader(e,g)?(n=E["default"].getID3Data(e,g),v.push({pts:c,dts:c,data:n}),g+=n.length):g++;this.remuxer.remux(a,{samples:[]},{samples:v,inputTimeScale:9e4},{samples:[]},t,r,i)},t.destroy=function(){},e}(),S=T,b=r("./src/demux/mp4demuxer.js"),_={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(e,t,r,i,a){if(!(r+24>t.length)){var n=this.parseHeader(t,r);if(n&&r+n.frameLength<=t.length){var s=9e4*n.samplesPerFrame/n.sam
|
||
|
/*!*************************************!*\
|
||
|
!*** ./src/demux/demuxer-worker.js ***!
|
||
|
\*************************************/
|
||
|
/*! exports provided: default */
|
||
|
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/demux/demuxer.js (referenced with require.resolve) */function(e,t,r){"use strict";r.r(t);var i=r(/*! ../demux/demuxer-inline */"./src/demux/demuxer-inline.js"),a=r(/*! ../events */"./src/events.js"),n=r(/*! ../utils/logger */"./src/utils/logger.js"),s=r(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),o=function(e){var t=new s["EventEmitter"];t.trigger=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];t.emit.apply(t,[e,e].concat(i))},t.off=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];t.removeListener.apply(t,[e].concat(i))};var r=function(t,r){e.postMessage({event:t,data:r})};e.addEventListener("message",(function(a){var s=a.data;switch(s.cmd){case"init":var o=JSON.parse(s.config);e.demuxer=new i["default"](t,s.typeSupported,o,s.vendor),Object(n["enableLogs"])(o.debug),r("init",null);break;case"demux":e.demuxer.push(s.data,s.decryptdata,s.initSegment,s.audioCodec,s.videoCodec,s.timeOffset,s.discontinuity,s.trackSwitch,s.contiguous,s.duration,s.accurateTimeOffset,s.defaultInitPTS);break;default:break}})),t.on(a["default"].FRAG_DECRYPTED,r),t.on(a["default"].FRAG_PARSING_INIT_SEGMENT,r),t.on(a["default"].FRAG_PARSED,r),t.on(a["default"].ERROR,r),t.on(a["default"].FRAG_PARSING_METADATA,r),t.on(a["default"].FRAG_PARSING_USERDATA,r),t.on(a["default"].INIT_PTS_FOUND,r),t.on(a["default"].FRAG_PARSING_DATA,(function(t,r){var i=[],a={event:t,data:r};r.data1&&(a.data1=r.data1.buffer,i.push(r.data1.buffer),delete r.data1),r.data2&&(a.data2=r.data2.buffer,i.push(r.data2.buffer),delete r.data2),e.postMessage(a,i)}))};t["default"]=o},"./src/demux/id3.js":
|
||
|
/*!**************************!*\
|
||
|
!*** ./src/demux/id3.js ***!
|
||
|
\**************************/
|
||
|
/*! exports provided: default, utf8ArrayToStr */function(e,t,r){"use strict";r.r(t),r.d(t,"utf8ArrayToStr",(function(){return o}));var i,a=r(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js"),n=function(){function e(){}return e.isHeader=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.isFooter=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.getID3Data=function(t,r){var i=r,a=0;while(e.isHeader(t,r)){a+=10;var n=e._readSize(t,r+6);a+=n,e.isFooter(t,r+10)&&(a+=10),r+=a}if(a>0)return t.subarray(i,i+a)},e._readSize=function(e,t){var r=0;return r=(127&e[t])<<21,r|=(127&e[t+1])<<14,r|=(127&e[t+2])<<7,r|=127&e[t+3],r},e.getTimeStamp=function(t){for(var r=e.getID3Frames(t),i=0;i<r.length;i++){var a=r[i];if(e.isTimeStampFrame(a))return e._readTimeStamp(a)}},e.isTimeStampFrame=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},e._getFrameData=function(t){var r=String.fromCharCode(t[0],t[1],t[2],t[3]),i=e._readSize(t,4),a=10;return{type:r,size:i,data:t.subarray(a,a+i)}},e.getID3Frames=function(t){var r=0,i=[];while(e.isHeader(t,r)){var a=e._readSize(t,r+6);r+=10;var n=r+a;while(r+8<n){var s=e._getFrameData(t.subarray(r)),o=e._decodeFrame(s);o&&i.push(o),r+=s.size+10}e.isFooter(t,r)&&(r+=10)}return i},e._decodeFrame=function(t){return"PRIV"===t.type?e._decodePrivFrame(t):"T"===t.type[0]?e._decodeTextFrame(t):"W"===t.type[0]?e._decodeURLFrame(t):void 0},e._readTimeStamp=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),r=1&t[3],i=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return i/=45,r&&(i+=47721858.84),Math.round(i)}},e._decodePrivFrame=function(t){if(!(t.size<2)){var r=e._utf8ArrayToStr(t.data,!0),i=new Uint8Array(t.data.subarray(r.length+1));return{key:t.type,info:r,data:i.buffer}}},e._decodeTextFrame=function(t){if(!(t.size<2)){if("TXXX"===t.type){var r=1,i=e._utf8ArrayToStr(t.data.subarray(r),!0);r+=i.length+1;var a=e._utf8ArrayToStr(t.data.subarray(r));return{key:t.type,info:i,data:a}}var n=e._utf8ArrayToStr(t.data.subarray(1));return{key:t.type,data:n}}},e._decodeURLFrame=function(t){if("WXXX"===t.type){if(t.size<2)return;var r=1,i=e._utf8ArrayToStr(t.data.subarray(r));r+=i.length+1;var a=e._utf8ArrayToStr(t.data.subarray(r));return{key:t.type,info:i,data:a}}var n=e._utf8ArrayToStr(t.data);return{key:t.type,data:n}},e._utf8ArrayToStr=function(e,t){void 0===t&&(t=!1);var r=s();if(r){var i=r.decode(e);if(t){var a=i.indexOf("\0");return-1!==a?i.substring(0,a):i}return i.replace(/\0/g,"")}var n,o,l,u=e.length,d="",c=0;while(c<u){if(n=e[c++],0===n&&t)return d;if(0!==n&&3!==n)switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:d+=String.fromCharCode(n);break;case 12:case 13:o=e[c++],d+=String.fromCharCode((31&n)<<6|63&o);break;case 14:o=e[c++],l=e[c++],d+=String.fromCharCode((15&n)<<12|(63&o)<<6|(63&l)<<0);break;default:}}return d},e}();function s(){var e=Object(a["getSelfScope"])();return i||"undefined"===typeof e.TextDecoder||(i=new e.TextDecoder("utf-8")),i}var o=n._utf8ArrayToStr;t["default"]=n},"./src/demux/mp4demuxer.js":
|
||
|
/*!*********************************!*\
|
||
|
!*** ./src/demux/mp4demuxer.js ***!
|
||
|
\*********************************/
|
||
|
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var i=r(/*! ../utils/logger */"./src/utils/logger.js"),a=r(/*! ../events */"./src/events.js"),n=Math.pow(2,32)-1,s=function(){function e(e,t){this.observer=e,this.remuxer=t}var t=e.prototype;return t.resetTimeStamp=function(e){this.initPTS=e},t.resetInitSegment=function(t,r,i,n){if(t&&t.byteLength){var s=this.initData=e.parseInitSegment(t);null==r&&(r="mp4a.40.5"),null==i&&(i="avc1.42e01e");var o={};s.audio&&s.video?o.audiovideo={container:"video/mp4",codec:r+","+i,initSegment:n?t:null}:(s.audio&&(o.audio={container:"audio/mp4",codec:r,initSegment:n?t:null}),s.video&&(o.video={container:"video/mp4",codec:i,initSegment:n?t:null})),this.observer.trigger(a["default"].FRAG_PARSING_INIT_SEGMENT,{tracks:o})}else r&&(this.audioCodec=r),i&&(this.videoCodec=i)},e.probe=function(t){return e.findBox({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.bin2str=function(e){return String.fromCharCode.apply(null,e)},e.readUint16=function(e,t){e.data&&(t+=e.start,e=e.data);var r=e[t]<<8|e[t+1];return r<0?65536+r:r},e.readUint32=function(e,t){e.data&&(t+=e.start,e=e.data);var r=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return r<0?4294967296+r:r},e.writeUint32=function(e,t,r){e.data&&(t+=e.start,e=e.data),e[t]=r>>24,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},e.findBox=function(t,r){var i,a,n,s,o,l,u,d=[];if(t.data?(l=t.start,s=t.end,t=t.data):(l=0,s=t.byteLength),!r.length)return null;for(i=l;i<s;)a=e.readUint32(t,i),n=e.bin2str(t.subarray(i+4,i+8)),u=a>1?i+a:s,n===r[0]&&(1===r.length?d.push({data:t,start:i+8,end:u}):(o=e.findBox({data:t,start:i+8,end:u},r.slice(1)),o.length&&(d=d.concat(o)))),i=u;return d},e.parseSegmentIndex=function(t){var r,i=e.findBox(t,["moov"])[0],a=i?i.end:null,n=0,s=e.findBox(t,["sidx"]);if(!s||!s[0])return null;r=[],s=s[0];var o=s.data[0];n=0===o?8:16;var l=e.readUint32(s,n);n+=4;var u=0,d=0;n+=0===o?8:16,n+=2;var c=s.end+d,f=e.readUint16(s,n);n+=2;for(var h=0;h<f;h++){var g=n,p=e.readUint32(s,g);g+=4;var v=2147483647&p,m=(2147483648&p)>>>31;if(1===m)return void console.warn("SIDX has hierarchical references (not supported)");var y=e.readUint32(s,g);g+=4,r.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/l,start:c,end:c+v-1}}),c+=v,g+=4,n=g}return{earliestPresentationTime:u,timescale:l,version:o,referencesCount:f,references:r,moovEndOffset:a}},e.parseInitSegment=function(t){var r=[],a=e.findBox(t,["moov","trak"]);return a.forEach((function(t){var a=e.findBox(t,["tkhd"])[0];if(a){var n=a.data[a.start],s=0===n?12:20,o=e.readUint32(a,s),l=e.findBox(t,["mdia","mdhd"])[0];if(l){n=l.data[l.start],s=0===n?12:20;var u=e.readUint32(l,s),d=e.findBox(t,["mdia","hdlr"])[0];if(d){var c=e.bin2str(d.data.subarray(d.start+8,d.start+12)),f={soun:"audio",vide:"video"}[c];if(f){var h=e.findBox(t,["mdia","minf","stbl","stsd"]);if(h.length){h=h[0];var g=e.bin2str(h.data.subarray(h.start+12,h.start+16));i["logger"].log("MP4Demuxer:"+f+":"+g+" found")}r[o]={timescale:u,type:f},r[f]={timescale:u,id:o}}}}}})),r},e.getStartDTS=function(t,r){var i,a,n;return i=e.findBox(r,["moof","traf"]),a=[].concat.apply([],i.map((function(r){return e.findBox(r,["tfhd"]).map((function(i){var a,n,s;return a=e.readUint32(i,4),n=t[a].timescale||9e4,s=e.findBox(r,["tfdt"]).map((function(t){var r,i;return r=t.data[t.start],i=e.readUint32(t,4),1===r&&(i*=Math.pow(2,32),i+=e.readUint32(t,8)),i}))[0],s/n}))}))),n=Math.min.apply(null,a),isFinite(n)?n:0},e.offsetStartDTS=function(t,r,i){e.findBox(r,["moof","traf"]).map((function(r){return e.findBox(r,["tfhd"]).map((function(a){var s=e.readUint32(a,4),o=t[s].timescale||9e4;e.findBox(r,["tfdt"]).map((function(t){var r=t.data[t.start],a=e.readUint32(t,4);if(0===r)e.writeUint32(t,4,a-i*o);else{a*=Math.pow(2,32),a+=e.readUint32(t,8),a-=i*o,a=Math.max(a,0);var s=Math.floor(a/(n+1)),l=Math.floor(a%(n+1));e.writeUint32(t,4,s),e.writeUint32(t,8,l)}}))}))}))},t.append=function(t,r,i,n){var s=this.initData;s||(this.resetInitSegment(t,this.audioCodec,this.videoCodec,!1),s=this.initData);var o,l=this.initPTS;if(void 0===l){var u=e.ge
|
||
|
/*!***********************!*\
|
||
|
!*** ./src/errors.ts ***!
|
||
|
\***********************/
|
||
|
/*! exports provided: ErrorTypes, ErrorDetails */function(e,t,r){"use strict";var i,a;r.r(t),r.d(t,"ErrorTypes",(function(){return i})),r.d(t,"ErrorDetails",(function(){return a})),function(e){e["NETWORK_ERROR"]="networkError",e["MEDIA_ERROR"]="mediaError",e["KEY_SYSTEM_ERROR"]="keySystemError",e["MUX_ERROR"]="muxError",e["OTHER_ERROR"]="otherError"}(i||(i={})),function(e){e["KEY_SYSTEM_NO_KEYS"]="keySystemNoKeys",e["KEY_SYSTEM_NO_ACCESS"]="keySystemNoAccess",e["KEY_SYSTEM_NO_SESSION"]="keySystemNoSession",e["KEY_SYSTEM_LICENSE_REQUEST_FAILED"]="keySystemLicenseRequestFailed",e["KEY_SYSTEM_NO_INIT_DATA"]="keySystemNoInitData",e["MANIFEST_LOAD_ERROR"]="manifestLoadError",e["MANIFEST_LOAD_TIMEOUT"]="manifestLoadTimeOut",e["MANIFEST_PARSING_ERROR"]="manifestParsingError",e["MANIFEST_INCOMPATIBLE_CODECS_ERROR"]="manifestIncompatibleCodecsError",e["LEVEL_LOAD_ERROR"]="levelLoadError",e["LEVEL_LOAD_TIMEOUT"]="levelLoadTimeOut",e["LEVEL_SWITCH_ERROR"]="levelSwitchError",e["AUDIO_TRACK_LOAD_ERROR"]="audioTrackLoadError",e["AUDIO_TRACK_LOAD_TIMEOUT"]="audioTrackLoadTimeOut",e["FRAG_LOAD_ERROR"]="fragLoadError",e["FRAG_LOAD_TIMEOUT"]="fragLoadTimeOut",e["FRAG_DECRYPT_ERROR"]="fragDecryptError",e["FRAG_PARSING_ERROR"]="fragParsingError",e["REMUX_ALLOC_ERROR"]="remuxAllocError",e["KEY_LOAD_ERROR"]="keyLoadError",e["KEY_LOAD_TIMEOUT"]="keyLoadTimeOut",e["BUFFER_ADD_CODEC_ERROR"]="bufferAddCodecError",e["BUFFER_APPEND_ERROR"]="bufferAppendError",e["BUFFER_APPENDING_ERROR"]="bufferAppendingError",e["BUFFER_STALLED_ERROR"]="bufferStalledError",e["BUFFER_FULL_ERROR"]="bufferFullError",e["BUFFER_SEEK_OVER_HOLE"]="bufferSeekOverHole",e["BUFFER_NUDGE_ON_STALL"]="bufferNudgeOnStall",e["INTERNAL_EXCEPTION"]="internalException"}(a||(a={}))},"./src/events.js":
|
||
|
/*!***********************!*\
|
||
|
!*** ./src/events.js ***!
|
||
|
\***********************/
|
||
|
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var i={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"};t["default"]=i},"./src/hls.ts":
|
||
|
/*!*********************************!*\
|
||
|
!*** ./src/hls.ts + 50 modules ***!
|
||
|
\*********************************/
|
||
|
/*! exports provided: default */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/crypt/decrypter.js because of ./src/demux/demuxer-worker.js */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/demuxer-inline.js because of ./src/demux/demuxer-worker.js */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/id3.js because of ./src/demux/demuxer-worker.js */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/mp4demuxer.js because of ./src/demux/demuxer-worker.js */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/demux/demuxer-worker.js */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/demux/demuxer-worker.js */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/polyfills/number-isFinite.js because of ./src/demux/demuxer-worker.js */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/demux/demuxer-worker.js */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/demux/demuxer-worker.js */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/eventemitter3/index.js (<- Module is not an ECMAScript module) */
|
||
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/url-toolkit/src/url-toolkit.js (<- Module is not an ECMAScript module) */function(e,t,r){"use strict";r.r(t);var i={};r.r(i),r.d(i,"newCue",(function(){return gr}));var a,n,s=r("./node_modules/url-toolkit/src/url-toolkit.js"),o=r("./src/errors.ts"),l=r("./src/polyfills/number-isFinite.js"),u=r("./src/events.js"),d=r("./src/utils/logger.js"),c={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},f=function(){function e(e){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=e,this.onEvent=this.onEvent.bind(this);for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];this.handledEvents=r,this.useGenericHandler=!0,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){},t.onHandlerDestroyed=function(){},t.isEventHandler=function(){return"object"===typeof this.handledEvents&&this.handledEvents.length&&"function"===typeof this.onEvent},t.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){if(c[e])throw new Error("Forbidden event-name: "+e);this.hls.on(e,this.onEvent)}),this)},t.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){this.hls.off(e,this.onEvent)}),this)},t.onEvent=function(e,t){this.onEventGeneric(e,t)},t.onEventGeneric=function(e,t){var r=function(e,t){var r="on"+e.replace("hls","");if("function"!==typeof this[r])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+r+")");return this[r].bind(this,t)};try{r.call(this,e,t).call()}catch(i){d["logger"].error("An internal error happened while handling event "+e+'. Error message: "'+i.message+'". Here is a stacktrace:',i),this.hls.trigger(u["default"].ERROR,{type:o["ErrorTypes"].OTHER_ERROR,details:o["ErrorDetails"].INTERNAL_EXCEPTION,fatal:!1,event:e,err:i})}},e}(),h=f;(function(e){e["MANIFEST"]="manifest",e["LEVEL"]="level",e["AUDIO_TRACK"]="audioTrack",e["SUBTITLE_TRACK"]="subtitleTrack"})(a||(a={})),function(e){e["MAIN"]="main",e["AUDIO"]="audio",e["SUBTITLE"]="subtitle"}(n||(n={}));var g=r("./src/demux/mp4demuxer.js");function p(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),e}var m,y=function(){function e(e,t){this._uri=null,this.baseuri=void 0,this.reluri=void 0,this.method=null,this.key=null,this.iv=null,this.baseuri=e,this.reluri=t}return v(e,[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=Object(s["buildAbsoluteURL"])(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}]),e}();function E(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function T(e,t,r){return t&&E(e.prototype,t),r&&E(e,r),e}(function(e){e["AUDIO"]="audio",e["VIDEO"]="video"})(m||(m={}));var S=function(){function e(){var e;this._url=null,this._byteRange=null,this._decryptdata=null,this._elementaryStreams=(e={},e[m.AUDIO]=!1,e[m.VIDEO]=!1,e),this.deltaPTS=0,this.rawProgramDateTime=null,this.programDateTime=null,this.title=null,this.tagList=[],this.cc=void 0,this.type=void 0,this.relurl=void 0,this.baseurl=void 0,this.duration=void 0,this.start=void 0,this.sn=0,this.urlId=0,this.level=0,this.levelkey=void 0,this.loader=void 0}var t=e.prototype;return t.setByteRange=function(e,t){var r=e.split("@",2),i=[];1===r.length?i[0]=t?t.byteRangeEndOffset:0:i[0]=parseInt(r[1]),i[1]=parseInt(r[0])+i[0],this._byteRange=i},t.addElementaryStream=function(e){this._elementaryStreams[e]=!0},t.hasElementaryStream=function(e){return!0===this._elementaryStreams[e]},t.createInitializationVector=function(e){for(var t=new Uint8Array(16),r=12;r<16;r++)t[r]=e>>8*(15-r)&255;return t},t.setDecryptDataFromLevelKey=function(e,t){var r=e;retur
|
||
|
/*!******************************************!*\
|
||
|
!*** ./src/polyfills/number-isFinite.js ***!
|
||
|
\******************************************/
|
||
|
/*! exports provided: isFiniteNumber */function(e,t,r){"use strict";r.r(t),r.d(t,"isFiniteNumber",(function(){return i}));var i=Number.isFinite||function(e){return"number"===typeof e&&isFinite(e)}},"./src/utils/get-self-scope.js":
|
||
|
/*!*************************************!*\
|
||
|
!*** ./src/utils/get-self-scope.js ***!
|
||
|
\*************************************/
|
||
|
/*! exports provided: getSelfScope */function(e,t,r){"use strict";function i(){return"undefined"===typeof window?self:window}r.r(t),r.d(t,"getSelfScope",(function(){return i}))},"./src/utils/logger.js":
|
||
|
/*!*****************************!*\
|
||
|
!*** ./src/utils/logger.js ***!
|
||
|
\*****************************/
|
||
|
/*! exports provided: enableLogs, logger */function(e,t,r){"use strict";r.r(t),r.d(t,"enableLogs",(function(){return c})),r.d(t,"logger",(function(){return f}));var i=r(/*! ./get-self-scope */"./src/utils/get-self-scope.js");function a(){}var n={trace:a,debug:a,log:a,warn:a,info:a,error:a},s=n;function o(e,t){return t="["+e+"] > "+t,t}var l=Object(i["getSelfScope"])();function u(e){var t=l.console[e];return t?function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];i[0]&&(i[0]=o(e,i[0])),t.apply(l.console,i)}:a}function d(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];r.forEach((function(t){s[t]=e[t]?e[t].bind(e):u(t)}))}var c=function(e){if(l.console&&!0===e||"object"===typeof e){d(e,"debug","log","info","warn","error");try{s.log()}catch(t){s=n}}else s=n},f=s}})["default"]}))}}]);
|