filesbox/web/dist/design/designstatic/chatroom/video/videojs-contrib-hls.min.js

13 lines
210 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(function C(B,U,O){function A(S,b){if(!U[S]){if(!B[S]){var _=typeof require=="function"&&require;if(!b&&_)return _(S,!0);if(k)return k(S,!0);var l=new Error("Cannot find module '"+S+"'");throw l.code="MODULE_NOT_FOUND",l}var g=U[S]={exports:{}};B[S][0].call(g.exports,function(s){var u=B[S][1][s];return A(u||s)},g,g.exports,C,B,U,O)}return U[S].exports}for(var k=typeof require=="function"&&require,w=0;w<O.length;w++)A(O[w]);return A})({1:[function(C,B,U){"use strict";Object.defineProperty(U,"__esModule",{value:!0});var O=function(){function b(_,l){var g=[],s=!0,u=!1,i=void 0;try{for(var c,t=_[Symbol.iterator]();!(s=(c=t.next()).done)&&(g.push(c.value),!l||g.length!==l);s=!0);}catch(e){u=!0,i=e}finally{try{!s&&t.return&&t.return()}finally{if(u)throw i}}return g}return function(_,l){if(Array.isArray(_))return _;if(Symbol.iterator in Object(_))return b(_,l);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),A=C(30),k=function(b){return b&&b.__esModule?b:{default:b}}(A),w=function(b,_){for(var l=b.cues,g=0;g<l.length;g++){var s=l[g];if(_>=s.adStartTime&&_<=s.adEndTime)return s}return null},S=function(b,_){var l=arguments.length<=2||arguments[2]===void 0?0:arguments[2];if(b.segments)for(var g=l,s=void 0,u=0;u<b.segments.length;u++){var i=b.segments[u];if(s||(s=w(_,g+i.duration/2)),s){if("cueIn"in i){s.endTime=g,s.adEndTime=g,g+=i.duration,s=null;continue}if(g<s.endTime){g+=i.duration;continue}s.endTime+=i.duration}else if("cueOut"in i&&(s=new k.default.VTTCue(g,g+i.duration,i.cueOut),s.adStartTime=g,s.adEndTime=g+parseFloat(i.cueOut),_.addCue(s)),"cueOutCont"in i){var c=void 0,t=void 0,e=i.cueOutCont.split("/").map(parseFloat),r=O(e,2);c=r[0],t=r[1],s=new k.default.VTTCue(g,g+i.duration,""),s.adStartTime=g-c,s.adEndTime=s.adStartTime+t,_.addCue(s)}g+=i.duration}};U.default={updateAdCues:S,findAdCue:w},B.exports=U.default},{}],2:[function(C,B,U){"use strict";Object.defineProperty(U,"__esModule",{value:!0});var O=function(_,l){return _.start(l)+"-"+_.end(l)},A=function(_,l){var g=_.toString(16);return"00".substring(0,2-g.length)+g+(l%2?" ":"")},k=function(_){return _>=32&&_<126?String.fromCharCode(_):"."},w=function(_){var l={};return Object.keys(_).forEach(function(g){var s=_[g];ArrayBuffer.isView(s)?l[g]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:l[g]=s}),l},S=function(_){var l=_.byterange||{length:Infinity,offset:0};return[l.length,l.offset,_.resolvedUri].join(",")},b={hexDump:function(_){for(var l=Array.prototype.slice.call(_),g="",s=void 0,u=void 0,i=0;i<l.length/16;i++)s=l.slice(16*i,16*i+16).map(A).join(""),u=l.slice(16*i,16*i+16).map(k).join(""),g+=s+" "+u+`
`;return g},tagDump:function(_){return b.hexDump(_.bytes)},textRanges:function(_){var l="",g=void 0;for(g=0;g<_.length;g++)l+=O(_,g)+" ";return l},createTransferableMessage:w,initSegmentId:S};U.default=b,B.exports=U.default},{}],3:[function(C,B,U){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.default={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},B.exports=U.default},{}],4:[function(C,B,U){"use strict";Object.defineProperty(U,"__esModule",{value:!0});var O=C(30),A=function(b){return b&&b.__esModule?b:{default:b}}(O),k=C(23),w=C(2),S=function(b){b.onmessage=function(_){var l=_.data,g=new Uint8Array(l.encrypted.bytes,l.encrypted.byteOffset,l.encrypted.byteLength),s=new Uint32Array(l.key.bytes,l.key.byteOffset,l.key.byteLength/4),u=new Uint32Array(l.iv.bytes,l.iv.byteOffset,l.iv.byteLength/4);new k.Decrypter(g,s,u,function(i,c){A.default.postMessage((0,w.createTransferableMessage)({source:l.source,decrypted:c}),[c.buffer])})}};U.default=function(b){return new S(b)},B.exports=U.default},{}],5:[function(C,B,U){(function(O){"use strict";function A(G){return G&&G.__esModule?G:{default:G}}function k(G,F){if(!(G instanceof F))throw new TypeError("Cannot call a class as a function")}function w(G,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof F);G.prototype=Object.create(F&&F.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),F&&(Object.setPrototypeOf?Object.setPrototypeOf(G,F):G.__proto__=F)}Object.defineProperty(U,"__esModule",{value:!0});var S=function(){function G(F,P){for(var x=0;x<P.length;x++){var D=P[x];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(F,D.key,D)}}return function(F,P,x){return P&&G(F.prototype,P),x&&G(F,x),F}}(),b=function(G,F,P){for(var x=!0;x;){var D=G,R=F,j=P;x=!1,D===null&&(D=Function.prototype);var H=Object.getOwnPropertyDescriptor(D,R);if(H!==void 0){if("value"in H)return H.value;var Y=H.get;return Y===void 0?void 0:Y.call(j)}var K=Object.getPrototypeOf(D);if(K===null)return;G=K,F=R,P=j,x=!0,H=K=void 0}},_=C(8),l=A(_),g=C(15),s=A(g),u=C(18),i=A(u),c=C(11),t=A(c),e=typeof window!="undefined"?window.videojs:O!==void 0?O.videojs:null,r=A(e),n=C(1),p=A(n),a=C(17),m=A(a),h=C(64),f=C(75),o=A(f),v=C(4),T=A(v),E=C(3),y=A(E),d=void 0,L={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},I=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],M=function(G){return this.audioSegmentLoader_[G]+this.mainSegmentLoader_[G]},q=function(G,F){if(typeof G!=typeof F||Object.keys(G).length!==Object.keys(F).length)return!0;for(var P in G)if(G[P]!==F[P])return!0;return!1},V=function(G){var F={codecCount:0},P=void 0;return F.codecCount=G.split(",").length,F.codecCount=F.codecCount||2,P=/(^|\s|,)+(avc1)([^ ,]*)/i.exec(G),P&&(F.videoCodec=P[2],F.videoObjectTypeIndicator=P[3]),F.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(G),F.audioProfile=F.audioProfile&&F.audioProfile[2],F},W=function(G){return G.replace(/avc1\.(\d+)\.(\d+)/i,function(F){return(0,h.translateLegacyCodecs)([F])[0]})};U.mapLegacyAvcCodecs_=W;var X=function(G,F,P){return G+"/"+F+'; codecs="'+P.filter(function(x){return!!x}).join(", ")+'"'},$=function(G){return G.segments&&G.segments.length&&G.segments[0].map?"mp4":"mp2t"},Q=function(G){var F=G.attributes||{};return F.CODECS?V(F.CODECS):L},N=function(G,F){var P=$(F),x=Q(F),D=F.attributes||{},R=!0,j=!1;if(!F)return[];if(G.mediaGroups.AUDIO&&D.AUDIO){var H=G.mediaGroups.AUDIO[D.AUDIO];if(H){j=!0,R=!1;for(var Y in H)if(!H[Y].uri){R=!0;break}}}j&&!x.audioProfile&&(r.default.log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),x.audioProfile=L.audioProfile);var K={};x.videoCodec&&(K.video=""+x.videoCodec+x.videoObjectTyp
https://bugzilla.mozilla.org/show_bug.cgi?id=1247138
`,D=this.activeAudioGroup().map(function(H){return H.enabled}).indexOf(!0),R=this.activeAudioGroup()[D],j=this.activeAudioGroup().filter(function(H){return H.properties_&&H.properties_.default})[0];this.audioPlaylistLoader_?(x="The audio track '"+R.label+"' that we tried to switch to "+x+" Unfortunately this means we will have to return you to the main track '"+j.label+"'. Sorry!",j.enabled=!0,this.activeAudioGroup().splice(D,1),this.trigger("audioupdate")):(x="The rendition that we tried to switch to "+x+"Unfortunately that means we will have to blacklist the current playlist and switch to another. Sorry!",this.blacklistCurrentPlaylist()),r.default.log.warn(x),this.setupAudio()}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"fillAudioTracks_",value:function(){var P=this.master(),x=P.mediaGroups||{};x&&x.AUDIO&&Object.keys(x.AUDIO).length!==0&&this.mode_==="html5"||(x.AUDIO={main:{default:{default:!0}}});for(var D in x.AUDIO){this.audioGroups_[D]||(this.audioGroups_[D]=[]);for(var R in x.AUDIO[D]){var j=x.AUDIO[D][R],H=new r.default.AudioTrack({id:R,kind:this.audioTrackKind_(j),enabled:!1,language:j.language,label:R});H.properties_=j,this.audioGroups_[D].push(H)}}(this.activeAudioGroup().filter(function(Y){return Y.properties_.default})[0]||this.activeAudioGroup()[0]).enabled=!0}},{key:"audioTrackKind_",value:function(P){var x=P.default?"main":"alternative";return P.characteristics&&P.characteristics.indexOf("public.accessibility.describes-video")>=0&&(x="main-desc"),x}},{key:"fillSubtitleTracks_",value:function(){var P=this.master(),x=P.mediaGroups||{};for(var D in x.SUBTITLES){this.subtitleGroups_.groups[D]||(this.subtitleGroups_.groups[D]=[]);for(var R in x.SUBTITLES[D]){var j=x.SUBTITLES[D][R];if(!j.forced&&(this.subtitleGroups_.groups[D].push(r.default.mergeOptions({id:R},j)),typeof this.subtitleGroups_.tracks[R]=="undefined")){var H=this.tech_.addRemoteTextTrack({id:R,kind:"subtitles",enabled:!1,language:j.language,label:R},!0).track;this.subtitleGroups_.tracks[R]=H}}}}},{key:"load",value:function(){this.mainSegmentLoader_.load(),this.audioPlaylistLoader_&&this.audioSegmentLoader_.load(),this.subtitlePlaylistLoader_&&this.subtitleSegmentLoader_.load()}},{key:"activeAudioGroup",value:function(){var P=this.masterPlaylistLoader_.media(),x=void 0;return P.attributes.AUDIO&&(x=this.audioGroups_[P.attributes.AUDIO]),x||this.audioGroups_.main}},{key:"activeSubtitleGroup_",value:function(){var P=this.masterPlaylistLoader_.media(),x=void 0;return P?(P.attributes.SUBTITLES&&(x=this.subtitleGroups_.groups[P.attributes.SUBTITLES]),x||this.subtitleGroups_.groups.main):null}},{key:"activeSubtitleTrack_",value:function(){for(var P in this.subtitleGroups_.tracks)if(this.subtitleGroups_.tracks[P].mode==="showing")return this.subtitleGroups_.tracks[P];return null}},{key:"handleSubtitleError_",value:function(){r.default.log.warn("Problem encountered loading the subtitle track. Switching back to default."),this.subtitleSegmentLoader_.abort();var P=this.activeSubtitleTrack_();P&&(P.mode="disabled"),this.setupSubtitles()}},{key:"mediaGroupChanged",value:function(){var P=this.getActiveAudioTrack_();this.stopAudioLoaders_(),this.resyncAudioLoaders_(P)}},{key:"setupAudio",value:function(){var P=this.getActiveAudioTrack_();this.stopAudioLoaders_(),this.resetAudioLoaders_(P)}},{key:"getActiveAudioTrack_",value:function(){var P=this.activeAudioGroup(),x=P.filter(function(D){return D.enabled})[0];return x||(x=P.filter(function(D){return D.properties_.default})[0]||P[0],x.enabled=!0),x}},{key:"stopAudioLoaders_",value:function(){this.audioPlaylistLoader_&&(this.audioPlaylistLoader_.dispose(),this.audioPlaylistLoader_=null),this.audioSegmentLoader_.pause()}},{key:"resetAudioLoaders_",value:function(P){if(!P.properties_.resolvedUri)return void this.mainSegmentLoader_.resetEverything();this.audioSegmentLoader_.resetEverything(),this.setupAudioPlaylistLoader_(P)}},{key:"resyncAudioLoaders_",value:function(P){P.properties_.resolvedUri&&(thi
`.split("").map(function(a){return a.charCodeAt(0)})),n=function(a){return String.fromCharCode.apply(null,a)},p=function(a){function m(h){var f=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];k(this,m),b(Object.getPrototypeOf(m.prototype),"constructor",this).call(this,h,f),this.mediaSource_=null,this.subtitlesTrack_=null}return w(m,a),S(m,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return s.default.createTimeRanges();var h=this.subtitlesTrack_.cues,f=h[0].startTime,o=h[h.length-1].startTime;return s.default.createTimeRanges([[f,o]])}},{key:"initSegment",value:function(h){var f=!(arguments.length<=1||arguments[1]===void 0)&&arguments[1];if(!h)return null;var o=(0,e.initSegmentId)(h),v=this.initSegments_[o];if(f&&!v&&h.bytes){var T=r.byteLength+h.bytes.byteLength,E=new Uint8Array(T);E.set(h.bytes),E.set(r,h.bytes.byteLength),this.initSegments_[o]=v={resolvedUri:h.resolvedUri,byterange:h.byterange,bytes:E}}return v||h}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}},{key:"track",value:function(h){this.subtitlesTrack_=h,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_()}},{key:"remove",value:function(h,f){(0,t.default)(h,f,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var h=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var f=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(f=this.skipEmptySegments_(f)){if(this.syncController_.timestampOffsetForTimeline(f.timeline)===null){var o=function(){h.state="READY",h.paused()||h.monitorBuffer_()};return this.syncController_.one("timestampoffset",o),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(f)}}},{key:"skipEmptySegments_",value:function(h){for(;h&&h.segment.empty;)h=this.generateSegmentInfo_(h.playlist,h.mediaIndex+1,h.startOfSegment+h.duration,h.isSyncRequest);return h}},{key:"handleSegment_",value:function(){var h=this;if(!this.pendingSegment_)return void(this.state="READY");this.state="APPENDING";var f=this.pendingSegment_,o=f.segment;if(typeof i.default.WebVTT!="function"&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var v=function(){var T=function(){h.handleSegment_()};return h.state="WAITING_ON_VTTJS",h.subtitlesTrack_.tech_.one("vttjsloaded",T),h.subtitlesTrack_.tech_.one("vttjserror",function(){h.subtitlesTrack_.tech_.off("vttjsloaded",T),h.error({message:"Error loading vtt.js"}),h.state="READY",h.pause(),h.trigger("error")}),{v:void 0}}();if(typeof v=="object")return v.v}o.requested=!0;try{this.parseVTTCues_(f)}catch(T){return this.error({message:T.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(f,this.syncController_.timelines[f.timeline],this.playlist_),f.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");f.byteLength=f.bytes.byteLength,this.mediaSecondsLoaded+=o.duration,f.cues.length&&this.remove(f.cues[0].endTime,f.cues[f.cues.length-1].endTime),f.cues.forEach(function(T){h.subtitlesTrack_.addCue(T)}),this.handleUpdateEnd_()}},{key:"parseVTTCues_",value:function(h){var f=void 0,o=!1;typeof i.default.TextDecoder=="function"?f=new i.default.TextDecoder("utf8"):(f=i.default.WebVTT.StringDecoder(),o=!0);var v=new i.default.WebVTT.Parser(i.default,i.default.vttjs,f);if(h.cues=[],h.timestampmap={MPEGTS:0,LOCAL:0},v.oncue=h.cues.push.bind(h.cues),v.ontimestampmap=function(y){return h.timestampmap=y},v.onparsingerror=function(y){s.default.log.warn("Error encountered when parsing cues: "+y.message)},h.segment.map){var T=h.segment.map.bytes;o&&(T=n(T)),v.parse(T)}var E=h.bytes;o&&(E=n(E)),v.parse(E),v.flush()}},{key:"updateTimeMapping_",value:function(h,f,o){var v=h.segment;if(f){if(!h.cues.length)return void(v.empty=!0);var T=h.timestampmap,E=T.MPEGTS
`);u>-1;u=this.buffer.indexOf(`
`))this.trigger("data",this.buffer.substring(0,u)),this.buffer=this.buffer.substring(u+1)}}]),g}(b.default);U.default=_},{}],33:[function(C,B,U){"use strict";function O(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")}function A(u,i){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!i||typeof i!="object"&&typeof i!="function"?u:i}function k(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof i);u.prototype=Object.create(i&&i.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),i&&(Object.setPrototypeOf?Object.setPrototypeOf(u,i):u.__proto__=i)}Object.defineProperty(U,"__esModule",{value:!0});var w=function(){function u(i,c){var t=[],e=!0,r=!1,n=void 0;try{for(var p,a=i[Symbol.iterator]();!(e=(p=a.next()).done)&&(t.push(p.value),!c||t.length!==c);e=!0);}catch(m){r=!0,n=m}finally{try{!e&&a.return&&a.return()}finally{if(r)throw n}}return t}return function(i,c){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return u(i,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function(){function u(i,c){for(var t=0;t<c.length;t++){var e=c[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(i,e.key,e)}}return function(i,c,t){return c&&u(i.prototype,c),t&&u(i,t),i}}(),b=C(35),_=function(u){return u&&u.__esModule?u:{default:u}}(b),l=function(){return new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')},g=function(u){for(var i=u.split(l()),c={},t=i.length,e=void 0;t--;)i[t]!==""&&(e=/([^=]*)=(.*)/.exec(i[t]).slice(1),e[0]=e[0].replace(/^\s+|\s+$/g,""),e[1]=e[1].replace(/^\s+|\s+$/g,""),e[1]=e[1].replace(/^['"](.*)['"]$/g,"$1"),c[e[0]]=e[1]);return c},s=function(u){function i(){return O(this,i),A(this,(i.__proto__||Object.getPrototypeOf(i)).call(this))}return k(i,u),S(i,[{key:"push",value:function(c){var t=void 0,e=void 0;if(c=c.replace(/^[\u0000\s]+|[\u0000\s]+$/g,""),c.length!==0){if(c[0]!=="#")return void this.trigger("data",{type:"uri",uri:c});if(c.indexOf("#EXT")!==0)return void this.trigger("data",{type:"comment",text:c.slice(1)});if(c=c.replace("\r",""),t=/^#EXTM3U/.exec(c))return void this.trigger("data",{type:"tag",tagType:"m3u"});if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(c))return e={type:"tag",tagType:"inf"},t[1]&&(e.duration=parseFloat(t[1])),t[2]&&(e.title=t[2]),void this.trigger("data",e);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(c))return e={type:"tag",tagType:"targetduration"},t[1]&&(e.duration=parseInt(t[1],10)),void this.trigger("data",e);if(t=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(c))return e={type:"tag",tagType:"totalduration"},t[1]&&(e.duration=parseInt(t[1],10)),void this.trigger("data",e);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(c))return e={type:"tag",tagType:"version"},t[1]&&(e.version=parseInt(t[1],10)),void this.trigger("data",e);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(c))return e={type:"tag",tagType:"media-sequence"},t[1]&&(e.number=parseInt(t[1],10)),void this.trigger("data",e);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(c))return e={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(e.number=parseInt(t[1],10)),void this.trigger("data",e);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(c))return e={type:"tag",tagType:"playlist-type"},t[1]&&(e.playlistType=t[1]),void this.trigger("data",e);if(t=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(c))return e={type:"tag",tagType:"byterange"},t[1]&&(e.length=parseInt(t[1],10)),t[2]&&(e.offset=parseInt(t[2],10)),void this.trigger("data",e);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(c))return e={type:"tag",tagType:"allow-cache"},t[1]&&(e.allowed=!/NO/.test(t[1])),void this.trigger("data",e);if(t=/^#EXT-X-MAP:?(.*)$/.exec(c)){if(e={type:"tag",tagType:"map"},t[1]){var r=g(t[1]);if(r.URI&&(e.uri=r.URI),r.BYTERANGE){var n=r.BYTERANGE.split("@"),p=w(n,2),a=p[0],m=p[1];e.byterange={},a&&(e.byterange.length=parseInt(a,10)),m&&(e.byterange.offset=parseInt(m,10))}}return void this.
`)}}]),e}(l.default);U.default=c},{}],35:[function(C,B,U){"use strict";function O(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(U,"__esModule",{value:!0});var A=function(){function w(S,b){for(var _=0;_<b.length;_++){var l=b[_];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(S,l.key,l)}}return function(S,b,_){return b&&w(S.prototype,b),_&&w(S,_),S}}(),k=function(){function w(){O(this,w),this.listeners={}}return A(w,[{key:"on",value:function(S,b){this.listeners[S]||(this.listeners[S]=[]),this.listeners[S].push(b)}},{key:"off",value:function(S,b){if(!this.listeners[S])return!1;var _=this.listeners[S].indexOf(b);return this.listeners[S].splice(_,1),_>-1}},{key:"trigger",value:function(S){var b=this.listeners[S],_=void 0,l=void 0,g=void 0;if(b)if(arguments.length===2)for(l=b.length,_=0;_<l;++_)b[_].call(this,arguments[1]);else for(g=Array.prototype.slice.call(arguments,1),l=b.length,_=0;_<l;++_)b[_].apply(this,g)}},{key:"dispose",value:function(){this.listeners={}}},{key:"pipe",value:function(S){this.on("data",function(b){S.push(b)})}}]),w}();U.default=k},{}],36:[function(C,B,U){"use strict";var O,A=C(60);O=function(){var k=new Uint8Array,w=0;O.prototype.init.call(this),this.setTimestamp=function(S){w=S},this.parseId3TagSize=function(S,b){var _=S[b+6]<<21|S[b+7]<<14|S[b+8]<<7|S[b+9];return(16&S[b+5])>>4?_+20:_+10},this.parseAdtsSize=function(S,b){var _=(224&S[b+5])>>5,l=S[b+4]<<3;return 6144&S[b+3]|l|_},this.push=function(S){var b,_,l,g,s=0,u=0;for(k.length?(g=k.length,k=new Uint8Array(S.byteLength+g),k.set(k.subarray(0,g)),k.set(S,g)):k=S;k.length-u>=3;)if(k[u]!=="I".charCodeAt(0)||k[u+1]!=="D".charCodeAt(0)||k[u+2]!=="3".charCodeAt(0))if(!0&k[u]&&(240&k[u+1])==240){if(k.length-u<7||(s=this.parseAdtsSize(k,u))>k.length)break;l={type:"audio",data:k.subarray(u,u+s),pts:w,dts:w},this.trigger("data",l),u+=s}else u++;else{if(k.length-u<10||(s=this.parseId3TagSize(k,u))>k.length)break;_={type:"timed-metadata",data:k.subarray(u,u+s)},this.trigger("data",_),u+=s}b=k.length-u,k=b>0?k.subarray(u):new Uint8Array}},O.prototype=new A,B.exports=O},{}],37:[function(C,B,U){"use strict";var O=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],A=function(s){return s[0]<<21|s[1]<<14|s[2]<<7|s[3]},k=function(s,u,i){var c,t="";for(c=u;c<i;c++)t+="%"+("00"+s[c].toString(16)).slice(-2);return t},w=function(s,u,i){return unescape(k(s,u,i))},S=function(s,u){var i=s[u+6]<<21|s[u+7]<<14|s[u+8]<<7|s[u+9];return(16&s[u+5])>>4?i+20:i+10},b=function(s,u){var i=(224&s[u+5])>>5,c=s[u+4]<<3;return 6144&s[u+3]|c|i},_=function(s,u){return s[u]==="I".charCodeAt(0)&&s[u+1]==="D".charCodeAt(0)&&s[u+2]==="3".charCodeAt(0)?"timed-metadata":!0&s[u]&&(240&s[u+1])==240?"audio":null},l=function(s){for(var u=0;u+5<s.length;){if(s[u]===255&&(246&s[u+1])==240)return O[(60&s[u+2])>>>2];u++}return null},g=function(s){var u,i,c;u=10,64&s[5]&&(u+=4,u+=A(s.subarray(10,14)));do{if((i=A(s.subarray(u+4,u+8)))<1)return null;if(String.fromCharCode(s[u],s[u+1],s[u+2],s[u+3])==="PRIV"){c=s.subarray(u+10,u+i+10);for(var t=0;t<c.byteLength;t++)if(c[t]===0){var e=w(c,0,t);if(e==="com.apple.streaming.transportStreamTimestamp"){var r=c.subarray(t+1),n=(1&r[3])<<30|r[4]<<22|r[5]<<14|r[6]<<6|r[7]>>>2;return n*=4,n+=3&r[7]}break}}u+=10,u+=i}while(u<s.byteLength);return null};B.exports={parseId3TagSize:S,parseAdtsSize:b,parseType:_,parseSampleRate:l,parseAacTimestamp:g}},{}],38:[function(C,B,U){"use strict";var O,A=C(60),k=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];O=function(){var w;O.prototype.init.call(this),this.push=function(S){var b,_,l,g,s,u,i=0,c=0;if(S.type==="audio")for(w?(g=w,w=new Uint8Array(g.byteLength+S.data.byteLength),w.set(g),w.set(S.data,g.byteLength)):w=S.data;i+5<w.length;)if(w[i]===255&&(246&w[i+1])==240){if(_=2*(1&~w[i+1]),b=(3&w[i+3])<<11|w[i+4]<<3|(224&w[i+5])>>5,s=1024*(1+(3&w[i+6])),u=9e4*s/k[(60&w[i+2])>>>2],l=i+b,w.byteLength<l)return;if(this.trigger("data",{pts:S.pts+c*u,dts:S.dts+c*u,sampleCount:s,audioobjec
`);u.length&&this.trigger("data",{startPts:this.startPts_,endPts:s,text:u})},g.prototype.popOn=function(s,u,i){var c=this.nonDisplayed_[14];c+=_(u),c+=_(i),this.nonDisplayed_[14]=c},g.prototype.rollUp=function(s,u,i){var c=this.displayed_[14];c===""&&(this.flushDisplayed(s),this.startPts_=s),c+=_(u),c+=_(i),this.displayed_[14]=c},g.prototype.shiftRowsUp_=function(){var s;for(s=0;s<this.topRow_;s++)this.displayed_[s]="";for(s=this.topRow_;s<14;s++)this.displayed_[s]=this.displayed_[s+1];this.displayed_[14]=""},B.exports={CaptionStream:S,Cea608Stream:g}},{}],48:[function(C,B,U){"use strict";var O,A,k,w=C(60),S=C(47),b=C(51),_=C(52).TimestampRolloverStream,l=C(51);O=function(){var u=new Uint8Array(188),i=0;O.prototype.init.call(this),this.push=function(c){var t,e=0,r=188;for(i?(t=new Uint8Array(c.byteLength+i),t.set(u.subarray(0,i)),t.set(c,i),i=0):t=c;r<t.byteLength;)t[e]!==71||t[r]!==71?(e++,r++):(this.trigger("data",t.subarray(e,r)),e+=188,r+=188);e<t.byteLength&&(u.set(t.subarray(e),0),i=t.byteLength-e)},this.flush=function(){i===188&&u[0]===71&&(this.trigger("data",u),i=0),this.trigger("done")}},O.prototype=new w,A=function(){var u,i,c,t;A.prototype.init.call(this),t=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,u=function(e,r){var n=0;r.payloadUnitStartIndicator&&(n+=e[n]+1),r.type==="pat"?i(e.subarray(n),r):c(e.subarray(n),r)},i=function(e,r){r.section_number=e[7],r.last_section_number=e[8],t.pmtPid=(31&e[10])<<8|e[11],r.pmtPid=t.pmtPid},c=function(e,r){var n,p,a,m;if(1&e[5]){for(t.programMapTable={},n=(15&e[1])<<8|e[2],p=3+n-4,a=(15&e[10])<<8|e[11],m=12+a;m<p;)t.programMapTable[(31&e[m+1])<<8|e[m+2]]=e[m],m+=5+((15&e[m+3])<<8|e[m+4]);for(r.programMapTable=t.programMapTable;t.packetsWaitingForPmt.length;)t.processPes_.apply(t,t.packetsWaitingForPmt.shift())}},this.push=function(e){var r={},n=4;r.payloadUnitStartIndicator=!!(64&e[1]),r.pid=31&e[1],r.pid<<=8,r.pid|=e[2],(48&e[3])>>>4>1&&(n+=e[n]+1),r.pid===0?(r.type="pat",u(e.subarray(n),r),this.trigger("data",r)):r.pid===this.pmtPid?(r.type="pmt",u(e.subarray(n),r),this.trigger("data",r)):this.programMapTable===void 0?this.packetsWaitingForPmt.push([e,n,r]):this.processPes_(e,n,r)},this.processPes_=function(e,r,n){n.streamType=this.programMapTable[n.pid],n.type="pes",n.data=e.subarray(r),this.trigger("data",n)}},A.prototype=new w,A.STREAM_TYPES={h264:27,adts:15},k=function(){var u=this,i={data:[],size:0},c={data:[],size:0},t={data:[],size:0},e=function(n,p){var a;p.packetLength=6+(n[4]<<8|n[5]),p.dataAlignmentIndicator=(4&n[6])!=0,a=n[7],192&a&&(p.pts=(14&n[9])<<27|(255&n[10])<<20|(254&n[11])<<12|(255&n[12])<<5|(254&n[13])>>>3,p.pts*=4,p.pts+=(6&n[13])>>>1,p.dts=p.pts,64&a&&(p.dts=(14&n[14])<<27|(255&n[15])<<20|(254&n[16])<<12|(255&n[17])<<5|(254&n[18])>>>3,p.dts*=4,p.dts+=(6&n[18])>>>1)),p.data=n.subarray(9+n[8])},r=function(n,p,a){var m,h=new Uint8Array(n.size),f={type:p},o=0,v=0,T=!1;if(n.data.length&&!(n.size<9)){for(f.trackId=n.data[0].pid,o=0;o<n.data.length;o++)m=n.data[o],h.set(m.data,v),v+=m.data.byteLength;e(h,f),T=p==="video"||f.packetLength===n.size,(a||T)&&(n.size=0,n.data.length=0),T&&u.trigger("data",f)}};k.prototype.init.call(this),this.push=function(n){({pat:function(){},pes:function(){var p,a;switch(n.streamType){case b.H264_STREAM_TYPE:case l.H264_STREAM_TYPE:p=i,a="video";break;case b.ADTS_STREAM_TYPE:p=c,a="audio";break;case b.METADATA_STREAM_TYPE:p=t,a="timed-metadata";break;default:return}n.payloadUnitStartIndicator&&r(p,a,!0),p.data.push(n),p.size+=n.data.byteLength},pmt:function(){var p,a,m={type:"metadata",tracks:[]},h=n.programMapTable;for(p in h)h.hasOwnProperty(p)&&(a={timelineStartInfo:{baseMediaDecodeTime:0}},a.id=+p,h[p]===l.H264_STREAM_TYPE?(a.codec="avc",a.type="video"):h[p]===l.ADTS_STREAM_TYPE&&(a.codec="adts",a.type="audio"),m.tracks.push(a));u.trigger("data",m)}})[n.type]()},this.flush=function(){r(i,"video"),r(c,"audio"),r(t,"timed-metadata"),this.trigger("done")}},k.prototype=new w;var g={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:O,TransportParseStream:A,ElementaryStream:k,TimestampRolloverStream:_,