node_modules ignore

This commit is contained in:
oier committed 2025-05-08 23:43:47 +02:00
1 parent e19d52f172
commit 4574544c9f
65041 files changed
+10593536

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
"use strict";var Qt=Object.defineProperty;var di=Object.getOwnPropertyDescriptor;var ui=Object.getOwnPropertyNames;var ci=Object.getPrototypeOf,hi=Object.prototype.hasOwnProperty;var li=Reflect.get;var fi=(e,i,t)=>i in e?Qt(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t;var mi=(e,i)=>{for(var t in i)Qt(e,t,{get:i[t],enumerable:!0})},pi=(e,i,t,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of ui(i))!hi.call(e,n)&&n!==t&&Qt(e,n,{get:()=>i[n],enumerable:!(s=di(i,n))||s.enumerable});return e};var gi=e=>pi(Qt({},"__esModule",{value:!0}),e);var T=(e,i,t)=>(fi(e,typeof i!="symbol"?i+"":i,t),t),Te=(e,i,t)=>{if(!i.has(e))throw TypeError("Cannot "+t)};var r=(e,i,t)=>(Te(e,i,"read from private field"),t?t.call(e):i.get(e)),u=(e,i,t)=>{if(i.has(e))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(e):i.set(e,t)},h=(e,i,t,s)=>(Te(e,i,"write to private field"),s?s.call(e,t):i.set(e,t),t);var k=(e,i,t)=>(Te(e,i,"access private method"),t),Zt=(e,i,t)=>li(ci(e),t,i);var Mi={};mi(Mi,{Attributes:()=>o,MediaError:()=>f.MediaError,VideoEvents:()=>ee,default:()=>Li});module.exports=gi(Mi);var Tt=class{addEventListener(){}removeEventListener(){}dispatchEvent(i){return!0}};if(typeof DocumentFragment=="undefined"){class e extends Tt{}globalThis.DocumentFragment=e}var xt=class extends Tt{},be=class extends Tt{},Ei={get(e){},define(e,i,t){},getName(e){return null},upgrade(e){},whenDefined(e){return Promise.resolve(xt)}},Nt,ve=class{constructor(i,t={}){u(this,Nt,void 0);h(this,Nt,t==null?void 0:t.detail)}get detail(){return r(this,Nt)}initCustomEvent(){}};Nt=new WeakMap;function Ti(e,i){return new xt}var Pe={document:{createElement:Ti},DocumentFragment,customElements:Ei,CustomEvent:ve,EventTarget:Tt,HTMLElement:xt,HTMLVideoElement:be},Ie=typeof window=="undefined"||typeof globalThis.customElements=="undefined",te=Ie?Pe:globalThis,Ni=Ie?Pe.document:globalThis.document;var f=require("@mux/playback-core");var bi=()=>{try{return"0.22.0"}catch{}return"UNKNOWN"},vi=bi(),Le=()=>vi;var ee=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"];function yi(e){return`
<style>
:host {
display: inline-flex;
line-height: 0;
flex-direction: column;
justify-content: end;
}
audio {
width: 100%;
}
</style>
<slot name="media">
<audio${Ge(e)}></audio>
</slot>
<slot></slot>
`}function Ai(e){return`
<style>
:host {
display: inline-block;
line-height: 0;
}
video {
max-width: 100%;
max-height: 100%;
min-width: 100%;
min-height: 100%;
object-fit: var(--media-object-fit, contain);
object-position: var(--media-object-position, 50% 50%);
}
video::-webkit-media-text-track-container {
transform: var(--media-webkit-text-track-transform);
transition: var(--media-webkit-text-track-transition);
}
</style>
<slot name="media">
<video${Ge(e)}></video>
</slot>
<slot></slot>
`}var xe=(e,{tag:i,is:t})=>{var l,m,d,b,_,Ne,pt,N,a,p,ot,x,ye,M,De,P,Ve;let s=(m=(l=globalThis.document)==null?void 0:l.createElement)==null?void 0:m.call(l,i,{is:t}),n=s?ki(s):[];return d=class extends e{constructor(){super();u(this,p);u(this,x);u(this,M);u(this,P);u(this,pt,void 0);u(this,N,void 0);u(this,a,new Map)}static get observedAttributes(){var E,y,I;return k(E=d,_,Ne).call(E),[...(I=(y=s==null?void 0:s.constructor)==null?void 0:y.observedAttributes)!=null?I:[],"autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"]}get nativeEl(){var g,E,y;return k(this,p,ot).call(this),(y=(E=(g=r(this,N))!=null?g:this.shadowRoot.querySelector(i))!=null?E:this.querySelector(":scope > [slot=media]"))!=null?y:this.querySelector(i)}set nativeEl(g){h(this,N,g)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(g){this.toggleAttribute("muted",!!g)}get src(){return this.getAttribute("src")}set src(g){this.setAttribute("src",`${g}`)}get preload(){var g,E;return(E=this.getAttribute("preload"))!=null?E:(g=this.nativeEl)==null?void 0:g.preload}set preload(g){this.setAttribute("preload",`${g}`)}init(){var g,E;if(!this.shadowRoot){this.attachShadow({mode:"open"});let y=Si(this.attributes);t&&(y.is=t),i&&(y.part=i),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(y)}this.nativeEl.muted=this.hasAttribute("muted");for(let y of n)k(this,M,De).call(this,y);this.shadowRoot.addEventListener("slotchange",this),k(this,x,ye).call(this);for(let y of this.constructor.Events)(E=(g=this.shadowRoot).addEventListener)==null||E.call(g,y,this,!0)}handleEvent(g){if(g.type==="slotchange"){k(this,x,ye).call(this);return}g.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(g.type,{detail:g.detail}))}attributeChangedCallback(g,E,y){k(this,p,ot).call(this),k(this,P,Ve).call(this,g,E,y)}connectedCallback(){k(this,p,ot).call(this)}},b=new WeakMap,_=new WeakSet,Ne=function(){if(r(this,b))return;h(this,b,!0);let g=new Set(this.observedAttributes);g.delete("muted");for(let E of n){if(E in this.prototype)continue;if(typeof s[E]=="function")this.prototype[E]=function(...I){return k(this,p,ot).call(this),this.call?this.call(E,...I):this.nativeEl[E].apply(this.nativeEl,I)};else{let I={get(){var V,Mt,wt;k(this,p,ot).call(this);let O=E.toLowerCase();if(g.has(O)){let Et=this.getAttribute(O);return Et===null?!1:Et===""?!0:Et}return(wt=(V=this.get)==null?void 0:V.call(this,E))!=null?wt:(Mt=this.nativeEl)==null?void 0:Mt[E]}};E!==E.toUpperCase()&&(I.set=function(O){k(this,p,ot).call(this);let V=E.toLowerCase();if(g.has(V)){O===!0||O===!1||O==null?this.toggleAttribute(V,!!O):this.setAttribute(V,O);return}if(this.set){this.set(E,O);return}this.nativeEl[E]=O}),Object.defineProperty(this.prototype,E,I)}}},pt=new WeakMap,N=new WeakMap,a=new WeakMap,p=new WeakSet,ot=function(){r(this,pt)||(h(this,pt,!0),this.init())},x=new WeakSet,ye=function(){let g=new Map(r(this,a));this.shadowRoot.querySelector("slot:not([name])").assignedElements({flatten:!0}).filter(E=>["track","source"].includes(E.localName)).forEach(E=>{var I,O;g.delete(E);let y=r(this,a).get(E);y||(y=E.cloneNode(),r(this,a).set(E,y)),(O=(I=this.nativeEl).append)==null||O.call(I,y),y.localName==="track"&&y.default&&(y.kind==="chapters"||y.kind==="metadata")&&y.track.mode==="disabled"&&(y.track.mode="hidden")}),g.forEach(E=>E.remove())},M=new WeakSet,De=function(g){if(Object.prototype.hasOwnProperty.call(this,g)){let E=this[g];delete this[g],this[g]=E}},P=new WeakSet,Ve=function(g,E,y){var I,O,V,Mt,wt,Et;["id","class"].includes(g)||!d.observedAttributes.includes(g)&&this.constructor.observedAttributes.includes(g)||(y===null?(O=(I=this.nativeEl).removeAttribute)==null||O.call(I,g):((Mt=(V=this.nativeEl).getAttribute)==null?void 0:Mt.call(V,g))!=y&&((Et=(wt=this.nativeEl).setAttribute)==null||Et.call(wt,g,y)))},u(d,_),T(d,"getTemplateHTML",i.endsWith("audio")?yi:Ai),T(d,"shadowRootOptions",{mode:"open"}),T(d,"Events",ee),u(d,b,void 0),d};function ki(e){let i=[];for(let t=Object.getPrototypeOf(e);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t))i.push(...Object.getOwnPropertyNames(t));return i}function Ge(e){let i="";for(let t in e){let s=e[t];s===""?i+=` ${t}`:i+=` ${t}="${s}"`}return i}function Si(e){let i={};for(let t of e)i[t.name]=t.value;return i}var Me,ie=xe((Me=globalThis.HTMLElement)!=null?Me:class{},{tag:"video"}),we,Bi=xe((we=globalThis.HTMLElement)!=null?we:class{},{tag:"audio"});var G=new WeakMap,bt=class extends Error{},re=class extends Error{};var Be=globalThis.WeakRef?class extends Set{add(e){super.add(new WeakRef(e))}forEach(e){super.forEach(i=>{let t=i.deref();t&&e(t)})}}:Set;function Ke(e){var i,t,s;(t=(i=globalThis.chrome)==null?void 0:i.cast)!=null&&t.isAvailable?(s=globalThis.cast)!=null&&s.framework?e():customElements.whenDefined("google-cast-button").then(e):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("go Line truncated
//# sourceMappingURL=index.cjs.js.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../src/polyfills/index.ts", "../src/env.ts", "../../../node_modules/custom-media-element/custom-media-element.js", "../../../node_modules/castable-video/castable-utils.js", "../../../node_modules/castable-video/castable-remote-playback.js", "../../../node_modules/castable-video/castable-mixin.js", "../../../node_modules/media-tracks/dist/track-event.js", "../../../node_modules/media-tracks/dist/utils.js", "../../../node_modules/media-tracks/dist/video-track-list.js", "../../../node_modules/media-tracks/dist/rendition-event.js", "../../../node_modules/media-tracks/dist/video-rendition-list.js", "../../../node_modules/media-tracks/dist/video-rendition.js", "../../../node_modules/media-tracks/dist/video-track.js", "../../../node_modules/media-tracks/dist/audio-rendition-list.js", "../../../node_modules/media-tracks/dist/audio-rendition.js", "../../../node_modules/media-tracks/dist/audio-track-list.js", "../../../node_modules/media-tracks/dist/audio-track.js", "../../../node_modules/media-tracks/dist/mixin.js"],
"sourcesContent": ["import { globalThis } from './polyfills';\nimport {\n initialize,\n teardown,\n generatePlayerInitTime,\n MuxMediaProps,\n StreamTypes,\n PlaybackTypes,\n toMuxVideoURL,\n Metadata,\n MediaError,\n getError,\n CmcdTypes,\n CmcdTypeValues,\n addCuePoints,\n getCuePoints,\n getActiveCuePoint,\n addChapters,\n getActiveChapter,\n getStartDate,\n getCurrentPdt,\n getStreamType,\n getTargetLiveWindow,\n getLiveEdgeStart,\n getSeekable,\n getEnded,\n getChapters,\n toPlaybackIdFromSrc,\n toPlaybackIdParts,\n // isMuxVideoSrc,\n} from '@mux/playback-core';\nimport type {\n PlaybackCore,\n PlaybackEngine,\n Autoplay,\n ExtensionMimeTypeMap,\n ValueOf,\n MaxResolutionValue,\n MinResolutionValue,\n RenditionOrderValue,\n Chapter,\n CuePoint,\n Tokens,\n} from '@mux/playback-core';\nimport { getPlayerVersion } from './env';\n// this must be imported after playback-core for the polyfill to be included\nimport { CustomVideoElement, Events as VideoEvents } from 'custom-media-element';\nimport { CastableMediaMixin } from 'castable-video/castable-mixin.js';\nimport { MediaTracksMixin } from 'media-tracks';\nimport type { HlsConfig } from 'hls.js';\n\n// Must mutate so the added events are available in custom-media-element.\nVideoEvents.push('castchange', 'entercast', 'leavecast');\n\nexport const Attributes = {\n BEACON_COLLECTION_DOMAIN: 'beacon-collection-domain',\n CUSTOM_DOMAIN: 'custom-domain',\n DEBUG: 'debug',\n DISABLE_TRACKING: 'disable-tracking',\n DISABLE_COOKIES: 'disable-cookies',\n DRM_TOKEN: 'drm-token',\n PLAYBACK_TOKEN: 'playback-token',\n ENV_KEY: 'env-key',\n MAX_RESOLUTION: 'max-resolution',\n MIN_RESOLUTION: 'min-resolution',\n RENDITION_ORDER: 'rendition-order',\n PROGRAM_START_TIME: 'program-start-time',\n PROGRAM_END_TIME: 'program-end-time',\n ASSET_START_TIME: 'asset-start-time',\n ASSET_END_TIME: 'asset-end-time',\n METADATA_URL: 'metadata-url',\n PLAYBACK_ID: 'playback-id',\n PLAYER_SOFTWARE_NAME: 'player-software-name',\n PLAYER_SOFTWARE_VERSION: 'player-software-version',\n PREFER_CMCD: 'prefer-cmcd',\n PREFER_PLAYBACK: 'prefer-playback',\n START_TIME: 'start-time',\n STREAM_TYPE: 'stream-type',\n TARGET_LIVE_WINDOW: 'target-live-window',\n LIVE_EDGE_OFFSET: 'live-edge-offset',\n TYPE: 'type',\n} as const;\n\nconst AttributeNameValues = Object.values(Attributes);\n\nconst playerSoftwareVersion = getPlayerVersion();\nconst playerSoftwareName = 'mux-video';\n\nclass MuxVideoBaseElement extends CustomVideoElement implements Partial<MuxMediaProps> {\n static get observedAttributes() {\n return [...AttributeNameValues, ...(CustomVideoElement.observedAttributes ?? [])];\n }\n\n #core?: PlaybackCore;\n #loadRequested?: Promise<void> | null;\n #playerInitTime: number;\n #metadata: Readonly<Metadata> = {};\n #tokens: Tokens = {};\n #_hlsConfig?: Partial<HlsConfig>;\n #playerSoftwareVersion?: string;\n #playerSoftwareName?: string;\n #errorTranslator?: (errorEvent: any) => any;\n\n constructor() {\n super();\n this.#playerInitTime = generatePlayerInitTime();\n }\n\n get preferCmcd() {\n return (this.getAttribute(Attributes.PREFER_CMCD) as ValueOf<CmcdTypes>) ?? undefined;\n }\n\n set preferCmcd(value: ValueOf<CmcdTypes> | undefined) {\n if (value === this.preferCmcd) return;\n if (!value) {\n this.removeAttribute(Attributes.PREFER_CMCD);\n } else if (CmcdTypeValues.includes(value)) {\n this.setAttribute(Attributes.PREFER_CMCD, value);\n } else {\n console.warn(`Invalid value for preferCmcd. Must be one of ${CmcdTypeValues.join()}`);\n }\n }\n\n get playerInitTime() {\n return this.#playerInitTime;\n }\n\n get playerSoftwareName() {\n return this.#playerSoftwareName ?? playerSoftwareName;\n }\n\n set playerSoftwareName(value: string | undefined) {\n this.#playerSoftwareName = value;\n }\n\n get playerSoftwareVersion() {\n return this.#playerSoftwareVersion ?? playerSoftwareVersion;\n }\n\n set playerSoftwareVersion(value: string | undefined) {\n this.#playerSoftwareVersion = value;\n }\n\n // Keeping this named \"_hls\" since it's exposed for unadvertised \"advanced usage\" via getter that assumes specifically hls.js (CJP)\n get _hls(): PlaybackEngine | undefined {\n return this.#core?.engine;\n }\n\n get mux(): Readonly<HTMLVideoElement['mux']> | undefined {\n return this.nativeEl?.mux;\n }\n\n get error() {\n return getError(this.nativeEl) ?? null;\n }\n\n get errorTranslator(): ((errorEvent: any) => any) | undefined {\n return this.#errorTranslator;\n }\n\n set errorTranslator(value: ((errorEvent: any) => any) | undefined) {\n this.#errorTranslator = value;\n }\n\n get src() {\n // Use the attribute value as the source of truth.\n // No need to store it in two places.\n // This avoids needing a to read the attribute initially and update the src.\n return this.getAttribute('src') as string;\n }Line truncated
"mappings": "ihCAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,gBAAAE,EAAA,4CAAAC,GAAA,YAAAC,KAAA,eAAAC,GAAAL,ICEA,IAAMM,GAAN,KAAkB,CAChB,kBAAmB,CAAC,CACpB,qBAAsB,CAAC,CACvB,cAAcC,EAAe,CAC3B,MAAO,EACT,CACF,EAGA,GAAI,OAAO,kBAAqB,YAAa,CAC3C,MAAMC,UAAyBF,EAAY,CAAC,CAE5C,WAAW,iBAAmBE,CAChC,CAEA,IAAMC,GAAN,cAA0BH,EAAY,CAAC,EACjCI,GAAN,cAA+BJ,EAAY,CAAC,EAEtCK,GAAwC,CAC5C,IAAIC,EAAe,CAEnB,EACA,OAAOA,EAAOC,EAAcC,EAAU,CAAC,EACvC,QAAQD,EAAc,CACpB,OAAO,IACT,EACA,QAAQE,EAAO,CAAC,EAChB,YAAYH,EAAO,CACjB,OAAO,QAAQ,QAAQH,EAAkD,CAC3E,CACF,EAhCAO,GAkCMC,GAAN,KAAkB,CAKhB,YAAYC,EAAiBC,EAAiC,CAAC,EAAG,CAJlEC,EAAA,KAAAJ,GAAA,QAMEK,EAAA,KAAKL,GAAUG,GAAA,YAAAA,EAAe,OAChC,CANA,IAAI,QAAS,CACX,OAAOG,EAAA,KAAKN,GACd,CAKA,iBAAkB,CAAC,CACrB,EATEA,GAAA,YAWF,SAASO,GAAcC,EAAkBV,EAAgD,CACvF,OAAO,IAAIL,EACb,CAEA,IAAMgB,GAAiB,CACrB,SAAU,CACR,cAAAF,EACF,EACA,iBACA,eAAAZ,GACA,YAAAM,GACA,YAAAX,GACA,YAAAG,GACA,iBAAAC,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Element", "HTMLVideoElement", "customElements", "_name", "_constructor", "_options", "_root", "_detail", "CustomEvent", "typeArg", "eventInitDict", "__privateAdd", "__privateSet", "__privateGet", "createElement", "_tagName", "globalThisShim", "isServer", "internalGlobalThis", "internalDocument", "import_playback_core", "getEnvPlayerVersion", "player_version", "getPlayerVersion", "Events", "getAudioTemplateHTML", "attrs", "serializeAttributes", "getVideoTemplateHTML", "CustomMediaMixin", "superclass", "tag", "is", "_a", "_b", "_c", "_isDefined", "_define", "define_fn", "_isInit", "_nativeEl", "_childMap", "_init", "init_fn", "_syncMediaChildren", "syncMediaChildren_fn", "_upgradeProperty", "upgradeProperty_fn", "_forwardAttribute", "forwardAttribute_fn", "nativeElTest", "nativeElProps", "getNativeElProps", "__privateAdd", "__privateMethod", "__privateGet", "val", "__privateSet", "namedNodeMapToObject", "prop", "type", "event", "attrName", "oldValue", "newValue", "propsToAttrs", "args", "config", "attr", "removeNativeChildren", "el", "clone", "value", "_d", "_e", "_f", "__publicField", "proto", "html", "key", "namedNodeMap", "obj", "CustomVideoElement", "CustomAudioElement", "privateProps", "InvalidStateError", "NotSupportedError", "IterableWeakSet", "el", "fn", "ref", "value", "onCastApiAvailable", "callback", "_a", "_b", "_c", "requiresCastFramework", "loadCastFramework", "sdkUrl", "script", "castContext", "currentSession", "currentMedia", "editTracksInfo", "request", "resolve", "reject", "getMediaStatus", "setCastOptions", "options", "getDefaultCastOptions", "remoteInstances", "IterableWeakSet", "castElementRef", "cf", "onCastApiAvailable", "_a", "_b", "_c", "_d", "castContext", "e", "r", "privateProps", "remotePlaybackCallbackIdCount", "_media", "_isInit", "_remotePlayer", "_remoteListeners", "_state", "_available", "_callbacks", "_callbackIds", "_castPlayer", "castPlayer_get", "_disconnect", "disconnect_fn", "_onCastStateChanged", "onCastStateChanged_fn", "_onSessionStateChanged", "onSessionStateChanged_fn", "_init", "init_fn", "_onRemoteMediaLoaded", "onRemoteMediaLoaded_fn", "_updateRemoteTextTrack", "updateRemoteTextTrack_fn", "RemotePlayback", "media", "__privateAdd", "__privateSet", "__privateMethod", "__privateGet", "callback", "InvalidStateError", "NotSupportedError", "willDisconnect", "setCastOptions", "event", "listener", "err", "castState", "SESSION_RESUMED", "currentMedia", "getMediaStatus", "error", "value", "_e", "remoteSubtitles", "type", "localSubtitles", "kind", "subtitles", "language", "name", "trackId", "mode", "local", "hiddenTrackIds", "showingSubtitle", "activeTrackIds", "currentSession", "requestTrackIds", "id", "a", "b", "request", "editTracksInfo", "CastableMediaMixin", "superclass", "_a", "_b", "_localState", "_castOptions", "_castCustomData", "_remote", "_castPlayer", "castPlayer_get", "_loadOnPrompt", "loadOnPrompt_fn", "__privateAdd", "getDefaultCastOptions", "__privateGet", "requiresCastFramework", "loadCastFramework", "privateProps", "__privateMethod", "__privateSet", "RemotePlayback", "attrName", "oldValue", "newValue", "mediaInfo", "subtitles", "kind", "src", "activeTrackIds", "textTrackIdCount", "trackEl", "trackId", "track", "request", "currentSession", "val", "_c", "valType", "__superGet", "err", "__publicField", "TrackEvent", "type", "init", "__publicField", "privateProps", "getPrivate", "instance", "_a", "setPrivate", "props", "saved", "addVideoTrack", "media", "track", "trackList", "getPrivate", "trackSet", "index", "VideoTrackList", "TrackEvent", "removeVideoTrack", "_a", "selectedChanged", "selected", "hasUnselected", "_addTrackCallback", "_removeTrackCallback", "_changeCallback", "_tracks", "tracks_get", "__privateAdd", "__privateGet", "id", "callback", "__privateSet", "RenditionEvent", "type", "init", "__publicField", "addRendition", "track", "rendition", "renditionList", "getPrivate", "renditionSet", "index", "VideoRenditionList", "getCurrentRenditions", "RenditionEvent", "removeRendition", "selectedChanged", "_addRenditionCallback", "_removeRenditionCallback", "_changeCallback", "__privateAdd", "id", "_a", "i", "__privateGet", "callback", "__privateSet", "_selected", "VideoRendition", "__publicField", "__privateAdd", "__privateGet", "val", "__privateSet", "selectedChanged", "_selected", "VideoTrack", "__publicField", "__privateAdd", "src", "width", "height", "codec", "bitrate", "frameRate", "rendition", "VideoRendition", "addRendition", "removeRendition", "__privateGet", "val", "__privateSet", "selectedChanged", "addRendition", "track", "rendition", "renditionList", "getPrivate", "renditionSet", "index", "AudioRenditionList", "getCurrentRenditions", "RenditionEvent", "removeRendition", "selectedChanged", "_addRenditionCallback", "_removeRenditionCallback", "_changeCallback", "__privateAdd", "id", "_a", "i", "__privateGLine truncated
}
+44
View File
@@ -0,0 +1,44 @@
var di=Object.defineProperty;var ui=Object.getPrototypeOf;var ci=Reflect.get;var hi=(e,r,t)=>r in e?di(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var E=(e,r,t)=>(hi(e,typeof r!="symbol"?r+"":r,t),t),ge=(e,r,t)=>{if(!r.has(e))throw TypeError("Cannot "+t)};var i=(e,r,t)=>(ge(e,r,"read from private field"),t?t.call(e):r.get(e)),u=(e,r,t)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,t)},h=(e,r,t,s)=>(ge(e,r,"write to private field"),s?s.call(e,t):r.set(e,t),t);var A=(e,r,t)=>(ge(e,r,"access private method"),t),Jt=(e,r,t)=>ci(ui(e),t,r);var Et=class{addEventListener(){}removeEventListener(){}dispatchEvent(r){return!0}};if(typeof DocumentFragment=="undefined"){class e extends Et{}globalThis.DocumentFragment=e}var wt=class extends Et{},Ee=class extends Et{},li={get(e){},define(e,r,t){},getName(e){return null},upgrade(e){},whenDefined(e){return Promise.resolve(wt)}},xt,Te=class{constructor(r,t={}){u(this,xt,void 0);h(this,xt,t==null?void 0:t.detail)}get detail(){return i(this,xt)}initCustomEvent(){}};xt=new WeakMap;function fi(e,r){return new wt}var Oe={document:{createElement:fi},DocumentFragment,customElements:li,CustomEvent:Te,EventTarget:Et,HTMLElement:wt,HTMLVideoElement:Ee},Pe=typeof window=="undefined"||typeof globalThis.customElements=="undefined",Qt=Pe?Oe:globalThis,$i=Pe?Oe.document:globalThis.document;import{initialize as ki,teardown as Si,generatePlayerInitTime as Ri,PlaybackTypes as me,toMuxVideoURL as Ci,MediaError as vs,getError as _i,CmcdTypeValues as ai,addCuePoints as Oi,getCuePoints as Pi,getActiveCuePoint as Ii,addChapters as Li,getActiveChapter as Mi,getStartDate as wi,getCurrentPdt as xi,getStreamType as Ni,getTargetLiveWindow as Di,getLiveEdgeStart as Vi,getSeekable as Gi,getEnded as Bi,getChapters as Ki,toPlaybackIdFromSrc as qi,toPlaybackIdParts as Fi}from"@mux/playback-core";var mi=()=>{try{return"0.22.0"}catch{}return"UNKNOWN"},pi=mi(),Ie=()=>pi;var ve=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"];function gi(e){return`
<style>
:host {
display: inline-flex;
line-height: 0;
flex-direction: column;
justify-content: end;
}
audio {
width: 100%;
}
</style>
<slot name="media">
<audio${Ve(e)}></audio>
</slot>
<slot></slot>
`}function Ei(e){return`
<style>
:host {
display: inline-block;
line-height: 0;
}
video {
max-width: 100%;
max-height: 100%;
min-width: 100%;
min-height: 100%;
object-fit: var(--media-object-fit, contain);
object-position: var(--media-object-position, 50% 50%);
}
video::-webkit-media-text-track-container {
transform: var(--media-webkit-text-track-transform);
transition: var(--media-webkit-text-track-transition);
}
</style>
<slot name="media">
<video${Ve(e)}></video>
</slot>
<slot></slot>
`}var we=(e,{tag:r,is:t})=>{var l,f,d,T,C,xe,mt,x,a,m,nt,w,be,L,Ne,O,De;let s=(f=(l=globalThis.document)==null?void 0:l.createElement)==null?void 0:f.call(l,r,{is:t}),n=s?Ti(s):[];return d=class extends e{constructor(){super();u(this,m);u(this,w);u(this,L);u(this,O);u(this,mt,void 0);u(this,x,void 0);u(this,a,new Map)}static get observedAttributes(){var g,v,P;return A(g=d,C,xe).call(g),[...(P=(v=s==null?void 0:s.constructor)==null?void 0:v.observedAttributes)!=null?P:[],"autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"]}get nativeEl(){var p,g,v;return A(this,m,nt).call(this),(v=(g=(p=i(this,x))!=null?p:this.shadowRoot.querySelector(r))!=null?g:this.querySelector(":scope > [slot=media]"))!=null?v:this.querySelector(r)}set nativeEl(p){h(this,x,p)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(p){this.toggleAttribute("muted",!!p)}get src(){return this.getAttribute("src")}set src(p){this.setAttribute("src",`${p}`)}get preload(){var p,g;return(g=this.getAttribute("preload"))!=null?g:(p=this.nativeEl)==null?void 0:p.preload}set preload(p){this.setAttribute("preload",`${p}`)}init(){var p,g;if(!this.shadowRoot){this.attachShadow({mode:"open"});let v=bi(this.attributes);t&&(v.is=t),r&&(v.part=r),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(v)}this.nativeEl.muted=this.hasAttribute("muted");for(let v of n)A(this,L,Ne).call(this,v);this.shadowRoot.addEventListener("slotchange",this),A(this,w,be).call(this);for(let v of this.constructor.Events)(g=(p=this.shadowRoot).addEventListener)==null||g.call(p,v,this,!0)}handleEvent(p){if(p.type==="slotchange"){A(this,w,be).call(this);return}p.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(p.type,{detail:p.detail}))}attributeChangedCallback(p,g,v){A(this,m,nt).call(this),A(this,O,De).call(this,p,g,v)}connectedCallback(){A(this,m,nt).call(this)}},T=new WeakMap,C=new WeakSet,xe=function(){if(i(this,T))return;h(this,T,!0);let p=new Set(this.observedAttributes);p.delete("muted");for(let g of n){if(g in this.prototype)continue;if(typeof s[g]=="function")this.prototype[g]=function(...P){return A(this,m,nt).call(this),this.call?this.call(g,...P):this.nativeEl[g].apply(this.nativeEl,P)};else{let P={get(){var D,Lt,Mt;A(this,m,nt).call(this);let _=g.toLowerCase();if(p.has(_)){let gt=this.getAttribute(_);return gt===null?!1:gt===""?!0:gt}return(Mt=(D=this.get)==null?void 0:D.call(this,g))!=null?Mt:(Lt=this.nativeEl)==null?void 0:Lt[g]}};g!==g.toUpperCase()&&(P.set=function(_){A(this,m,nt).call(this);let D=g.toLowerCase();if(p.has(D)){_===!0||_===!1||_==null?this.toggleAttribute(D,!!_):this.setAttribute(D,_);return}if(this.set){this.set(g,_);return}this.nativeEl[g]=_}),Object.defineProperty(this.prototype,g,P)}}},mt=new WeakMap,x=new WeakMap,a=new WeakMap,m=new WeakSet,nt=function(){i(this,mt)||(h(this,mt,!0),this.init())},w=new WeakSet,be=function(){let p=new Map(i(this,a));this.shadowRoot.querySelector("slot:not([name])").assignedElements({flatten:!0}).filter(g=>["track","source"].includes(g.localName)).forEach(g=>{var P,_;p.delete(g);let v=i(this,a).get(g);v||(v=g.cloneNode(),i(this,a).set(g,v)),(_=(P=this.nativeEl).append)==null||_.call(P,v),v.localName==="track"&&v.default&&(v.kind==="chapters"||v.kind==="metadata")&&v.track.mode==="disabled"&&(v.track.mode="hidden")}),p.forEach(g=>g.remove())},L=new WeakSet,Ne=function(p){if(Object.prototype.hasOwnProperty.call(this,p)){let g=this[p];delete this[p],this[p]=g}},O=new WeakSet,De=function(p,g,v){var P,_,D,Lt,Mt,gt;["id","class"].includes(p)||!d.observedAttributes.includes(p)&&this.constructor.observedAttributes.includes(p)||(v===null?(_=(P=this.nativeEl).removeAttribute)==null||_.call(P,p):((Lt=(D=this.nativeEl).getAttribute)==null?void 0:Lt.call(D,p))!=v&&((gt=(Mt=this.nativeEl).setAttribute)==null||gt.call(Mt,p,v)))},u(d,C),E(d,"getTemplateHTML",r.endsWith("audio")?gi:Ei),E(d,"shadowRootOptions",{mode:"open"}),E(d,"Events",ve),u(d,T,void 0),d};function Ti(e){let r=[];for(let t=Object.getPrototypeOf(e);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t))r.push(...Object.getOwnPropertyNames(t));return r}function Ve(e){let r="";for(let t in e){let s=e[t];s===""?r+=` ${t}`:r+=` ${t}="${s}"`}return r}function bi(e){let r={};for(let t of e)r[t.name]=t.value;return r}var Le,Zt=we((Le=globalThis.HTMLElement)!=null?Le:class{},{tag:"video"}),Me,Qi=we((Me=globalThis.HTMLElement)!=null?Me:class{},{tag:"audio"});var V=new WeakMap,Tt=class extends Error{},te=class extends Error{};var Ge=globalThis.WeakRef?class extends Set{add(e){super.add(new WeakRef(e))}forEach(e){super.forEach(r=>{let t=r.deref();t&&e(t)})}}:Set;function Be(e){var r,t,s;(t=(r=globalThis.chrome)==null?void 0:r.cast)!=null&&t.isAvailable?(s=globalThis.cast)!=null&&s.framework?e():customElements.whenDefined("google-cast-button").then(e):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("go Line truncated
//# sourceMappingURL=index.mjs.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/polyfills/index.ts", "../src/index.ts", "../src/env.ts", "../../../node_modules/custom-media-element/custom-media-element.js", "../../../node_modules/castable-video/castable-utils.js", "../../../node_modules/castable-video/castable-remote-playback.js", "../../../node_modules/castable-video/castable-mixin.js", "../../../node_modules/media-tracks/dist/track-event.js", "../../../node_modules/media-tracks/dist/utils.js", "../../../node_modules/media-tracks/dist/video-track-list.js", "../../../node_modules/media-tracks/dist/rendition-event.js", "../../../node_modules/media-tracks/dist/video-rendition-list.js", "../../../node_modules/media-tracks/dist/video-rendition.js", "../../../node_modules/media-tracks/dist/video-track.js", "../../../node_modules/media-tracks/dist/audio-rendition-list.js", "../../../node_modules/media-tracks/dist/audio-rendition.js", "../../../node_modules/media-tracks/dist/audio-track-list.js", "../../../node_modules/media-tracks/dist/audio-track.js", "../../../node_modules/media-tracks/dist/mixin.js"],
"sourcesContent": ["/* eslint @typescript-eslint/no-empty-function: \"off\", @typescript-eslint/no-unused-vars: \"off\" */\n\nclass EventTarget {\n addEventListener() {}\n removeEventListener() {}\n dispatchEvent(_event: Event) {\n return true;\n }\n}\n\n// @github/template-parts requires DocumentFragment to be available on globalThis for SSR\nif (typeof DocumentFragment === 'undefined') {\n class DocumentFragment extends EventTarget {}\n // @ts-ignore\n globalThis.DocumentFragment = DocumentFragment;\n}\n\nclass HTMLElement extends EventTarget {}\nclass HTMLVideoElement extends EventTarget {}\n\nconst customElements: CustomElementRegistry = {\n get(_name: string) {\n return undefined;\n },\n define(_name, _constructor, _options) {},\n getName(_constructor) {\n return null;\n },\n upgrade(_root) {},\n whenDefined(_name) {\n return Promise.resolve(HTMLElement as unknown as CustomElementConstructor);\n },\n};\n\nclass CustomEvent {\n #detail;\n get detail() {\n return this.#detail;\n }\n constructor(typeArg: string, eventInitDict: CustomEventInit = {}) {\n // super(typeArg, eventInitDict);\n this.#detail = eventInitDict?.detail;\n }\n initCustomEvent() {}\n}\n\nfunction createElement(_tagName: string, _options?: ElementCreationOptions): HTMLElement {\n return new HTMLElement();\n}\n\nconst globalThisShim = {\n document: {\n createElement,\n },\n DocumentFragment,\n customElements,\n CustomEvent,\n EventTarget,\n HTMLElement,\n HTMLVideoElement,\n};\n\n// const isServer = typeof window === 'undefined' || typeof globalThis.customElements === 'undefined';\n// const GlobalThis = isServer ? globalThisShim : globalThis;\n// const Document = isServer ? globalThisShim.document : globalThis.document;\n//\n// export { GlobalThis as globalThis, Document as document };\nconst isServer = typeof window === 'undefined' || typeof globalThis.customElements === 'undefined';\ntype GlobalThis = typeof globalThis;\nconst internalGlobalThis: GlobalThis = (isServer ? globalThisShim : globalThis) as GlobalThis;\nconst internalDocument: Document = (isServer ? globalThisShim.document : globalThis.document) as Document;\n\nexport { internalGlobalThis as globalThis, internalDocument as document };\n", "import { globalThis } from './polyfills';\nimport {\n initialize,\n teardown,\n generatePlayerInitTime,\n MuxMediaProps,\n StreamTypes,\n PlaybackTypes,\n toMuxVideoURL,\n Metadata,\n MediaError,\n getError,\n CmcdTypes,\n CmcdTypeValues,\n addCuePoints,\n getCuePoints,\n getActiveCuePoint,\n addChapters,\n getActiveChapter,\n getStartDate,\n getCurrentPdt,\n getStreamType,\n getTargetLiveWindow,\n getLiveEdgeStart,\n getSeekable,\n getEnded,\n getChapters,\n toPlaybackIdFromSrc,\n toPlaybackIdParts,\n // isMuxVideoSrc,\n} from '@mux/playback-core';\nimport type {\n PlaybackCore,\n PlaybackEngine,\n Autoplay,\n ExtensionMimeTypeMap,\n ValueOf,\n MaxResolutionValue,\n MinResolutionValue,\n RenditionOrderValue,\n Chapter,\n CuePoint,\n Tokens,\n} from '@mux/playback-core';\nimport { getPlayerVersion } from './env';\n// this must be imported after playback-core for the polyfill to be included\nimport { CustomVideoElement, Events as VideoEvents } from 'custom-media-element';\nimport { CastableMediaMixin } from 'castable-video/castable-mixin.js';\nimport { MediaTracksMixin } from 'media-tracks';\nimport type { HlsConfig } from 'hls.js';\n\n// Must mutate so the added events are available in custom-media-element.\nVideoEvents.push('castchange', 'entercast', 'leavecast');\n\nexport const Attributes = {\n BEACON_COLLECTION_DOMAIN: 'beacon-collection-domain',\n CUSTOM_DOMAIN: 'custom-domain',\n DEBUG: 'debug',\n DISABLE_TRACKING: 'disable-tracking',\n DISABLE_COOKIES: 'disable-cookies',\n DRM_TOKEN: 'drm-token',\n PLAYBACK_TOKEN: 'playback-token',\n ENV_KEY: 'env-key',\n MAX_RESOLUTION: 'max-resolution',\n MIN_RESOLUTION: 'min-resolution',\n RENDITION_ORDER: 'rendition-order',\n PROGRAM_START_TIME: 'program-start-time',\n PROGRAM_END_TIME: 'program-end-time',\n ASSET_START_TIME: 'asset-start-time',\n ASSET_END_TIME: 'asset-end-time',\n METADATA_URL: 'metadata-url',\n PLAYBACK_ID: 'playback-id',\n PLAYER_SOFTWARE_NAME: 'player-software-name',\n PLAYER_SOFTWARE_VERSION: 'player-software-version',\n PREFER_CMCD: 'prefer-cmcd',\n PREFER_PLAYBACK: 'prefer-playback',\n START_TIME: 'start-time',\n STREAM_TYPE: 'stream-type',\n TARGET_LIVE_WINDOW: 'target-live-window',\n LIVE_EDGE_OFFSET: 'live-edge-offset',\n TYPE: 'type',\n} as const;\n\nconst AttributeNameValues = Object.values(Attributes);\n\nconst playerSoftwareVersion = getPlayerVersion();\nconst playerSoftwareName = 'mux-video';\n\nclass MuxVideoBaseElement extends CustomVideoElement implements Partial<MuxMediaProps> {\n static get observedAttributes() {\n return [...AttributeNameValues, ...(CustomVideoElement.observedAttributes ?? [])];\n }\n\n #core?: PlaybackCore;\n #lLine truncated
"mappings": "2nBAEA,IAAMA,GAAN,KAAkB,CAChB,kBAAmB,CAAC,CACpB,qBAAsB,CAAC,CACvB,cAAcC,EAAe,CAC3B,MAAO,EACT,CACF,EAGA,GAAI,OAAO,kBAAqB,YAAa,CAC3C,MAAMC,UAAyBF,EAAY,CAAC,CAE5C,WAAW,iBAAmBE,CAChC,CAEA,IAAMC,GAAN,cAA0BH,EAAY,CAAC,EACjCI,GAAN,cAA+BJ,EAAY,CAAC,EAEtCK,GAAwC,CAC5C,IAAIC,EAAe,CAEnB,EACA,OAAOA,EAAOC,EAAcC,EAAU,CAAC,EACvC,QAAQD,EAAc,CACpB,OAAO,IACT,EACA,QAAQE,EAAO,CAAC,EAChB,YAAYH,EAAO,CACjB,OAAO,QAAQ,QAAQH,EAAkD,CAC3E,CACF,EAhCAO,GAkCMC,GAAN,KAAkB,CAKhB,YAAYC,EAAiBC,EAAiC,CAAC,EAAG,CAJlEC,EAAA,KAAAJ,GAAA,QAMEK,EAAA,KAAKL,GAAUG,GAAA,YAAAA,EAAe,OAChC,CANA,IAAI,QAAS,CACX,OAAOG,EAAA,KAAKN,GACd,CAKA,iBAAkB,CAAC,CACrB,EATEA,GAAA,YAWF,SAASO,GAAcC,EAAkBV,EAAgD,CACvF,OAAO,IAAIL,EACb,CAEA,IAAMgB,GAAiB,CACrB,SAAU,CACR,cAAAF,EACF,EACA,iBACA,eAAAZ,GACA,YAAAM,GACA,YAAAX,GACA,YAAAG,GACA,iBAAAC,EACF,EAOMgB,GAAW,OAAO,QAAW,aAAe,OAAO,WAAW,gBAAmB,YAEjFC,GAAkCD,GAAWD,GAAiB,WAC9DG,GAA8BF,GAA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AKZ,EAAAC,IAAL,UACF,CACF,EAvRSP,EAAA,YA0BAC,EAAA,YAAAC,GAAO,UAAG,CACf,GAAIiB,EAAA,KAAKnB,GAAY,OACrBqB,EAAA,KAAKrB,EAAa,IAElB,IAAM6B,EAAe,IAAI,IAAI,KAAK,kBAAkB,EAEpDA,EAAa,OAAO,OAAO,EAG3B,QAASN,KAAQR,EAAe,CAC9B,GAAIQ,KAAQ,KAAK,UAAW,SAG5B,GADa,OAAOT,EAAaS,CAAI,GACzB,WAEV,KAAK,UAAUA,CAAI,EAAI,YAAaO,EAAM,CACxC,OAAAZ,EAAA,KAAKZ,EAAAC,IAAL,WAGM,KAAK,KAAa,KAAK,KAAKgB,EAAM,GAAGO,CAAI,EACtC,KAAK,SAASP,CAAI,EAAE,MAAM,KAAK,SAAUO,CAAI,CAIxD,MACK,CAIL,IAAIC,EAAS,CACX,KAAM,CAtKlB,IAAAlC,EAAAC,GAAAC,GAuKcmB,EAAA,KAAKZ,EAAAC,IAAL,WAEA,IAAIyB,EAAOT,EAAK,YAAY,EAC5B,GAAIM,EAAa,IAAIG,CAAI,EAAG,CAC1B,IAAMZ,GAAM,KAAK,aAAaY,CAAI,EAClC,OAAOZ,KAAQ,KAAO,GAAQA,KAAQ,GAAK,GAAOA,EACpD,CAEA,OAAOrB,IAAAF,EAAA,KAAK,MAAL,YAAAA,EAAA,UAAW0B,KAAX,KAAAxB,IAAoBD,GAAA,KAAK,WAAL,YAAAA,GAAgByB,EAC7C,CACF,EAEIA,IAASA,EAAK,YAAY,IAE5BQ,EAAO,IAAM,SAAUX,EAAK,CAC1BF,EAAA,KAAKZ,EAAAC,IAAL,WAEA,IAAIyB,EAAOT,EAAK,YAAY,EAC5B,GAAIM,EAAa,IAAIG,CAAI,EAAG,CACtBZ,IAAQ,IAAQA,Line truncated
"names": ["EventTarget", "_event", "DocumentFragment", "HTMLElement", "HTMLVideoElement", "customElements", "_name", "_constructor", "_options", "_root", "_detail", "CustomEvent", "typeArg", "eventInitDict", "__privateAdd", "__privateSet", "__privateGet", "createElement", "_tagName", "globalThisShim", "isServer", "internalGlobalThis", "internalDocument", "initialize", "teardown", "generatePlayerInitTime", "PlaybackTypes", "toMuxVideoURL", "MediaError", "getError", "CmcdTypeValues", "addCuePoints", "getCuePoints", "getActiveCuePoint", "addChapters", "getActiveChapter", "getStartDate", "getCurrentPdt", "getStreamType", "getTargetLiveWindow", "getLiveEdgeStart", "getSeekable", "getEnded", "getChapters", "toPlaybackIdFromSrc", "toPlaybackIdParts", "getEnvPlayerVersion", "player_version", "getPlayerVersion", "Events", "getAudioTemplateHTML", "attrs", "serializeAttributes", "getVideoTemplateHTML", "CustomMediaMixin", "superclass", "tag", "is", "_a", "_b", "_c", "_isDefined", "_define", "define_fn", "_isInit", "_nativeEl", "_childMap", "_init", "init_fn", "_syncMediaChildren", "syncMediaChildren_fn", "_upgradeProperty", "upgradeProperty_fn", "_forwardAttribute", "forwardAttribute_fn", "nativeElTest", "nativeElProps", "getNativeElProps", "__privateAdd", "__privateMethod", "__privateGet", "val", "__privateSet", "namedNodeMapToObject", "prop", "type", "event", "attrName", "oldValue", "newValue", "propsToAttrs", "args", "config", "attr", "removeNativeChildren", "el", "clone", "value", "_d", "_e", "_f", "__publicField", "proto", "html", "key", "namedNodeMap", "obj", "CustomVideoElement", "CustomAudioElement", "privateProps", "InvalidStateError", "NotSupportedError", "IterableWeakSet", "el", "fn", "ref", "value", "onCastApiAvailable", "callback", "_a", "_b", "_c", "requiresCastFramework", "loadCastFramework", "sdkUrl", "script", "castContext", "currentSession", "currentMedia", "editTracksInfo", "request", "resolve", "reject", "getMediaStatus", "setCastOptions", "options", "getDefaultCastOptions", "remoteInstances", "IterableWeakSet", "castElementRef", "cf", "onCastApiAvailable", "_a", "_b", "_c", "_d", "castContext", "e", "r", "privateProps", "remotePlaybackCallbackIdCount", "_media", "_isInit", "_remotePlayer", "_remoteListeners", "_state", "_available", "_callbacks", "_callbackIds", "_castPlayer", "castPlayer_get", "_disconnect", "disconnect_fn", "_onCastStateChanged", "onCastStateChanged_fn", "_onSessionStateChanged", "onSessionStateChanged_fn", "_init", "init_fn", "_onRemoteMediaLoaded", "onRemoteMediaLoaded_fn", "_updateRemoteTextTrack", "updateRemoteTextTrack_fn", "RemotePlayback", "media", "__privateAdd", "__privateSet", "__privateMethod", "__privateGet", "callback", "InvalidStateError", "NotSupportedError", "willDisconnect", "setCastOptions", "event", "listener", "err", "castState", "SESSION_RESUMED", "currentMedia", "getMediaStatus", "error", "value", "_e", "remoteSubtitles", "type", "localSubtitles", "kind", "subtitles", "language", "name", "trackId", "mode", "local", "hiddenTrackIds", "showingSubtitle", "activeTrackIds", "currentSession", "requestTrackIds", "id", "a", "b", "request", "editTracksInfo", "CastableMediaMixin", "superclass", "_a", "_b", "_localState", "_castOptions", "_castCustomData", "_remote", "_castPlayer", "castPlayer_get", "_loadOnPrompt", "loadOnPrompt_fn", "__privateAdd", "getDefaultCastOptions", "__privateGet", "requiresCastFramework", "loadCastFramework", "privateProps", "__privateMethod", "__privateSet", "RemotePlayback", "attrName", "oldValue", "newValue", "mediaInfo", "subtitles", "kind", "src", "activeTrackIds", "textTrackIdCount", "trackEl", "trackId", "track", "request", "currentSession", "val", "_c", "valType", "__superGet", "err", "__publicField", "TrackEvent", "type", "init", "__publicField", "privateProps", "getPrivate", "instance", "_a", "setPrivate", "props", "saved", "addVideoTrack", "media", "track", "trackList", "getPrivate", "trackSet", "index", "VideoTrackList", "TrackEvent", "removeVideoTrack", "_a", "selectedChanged", "selected", "hasUnselected", "_addTrackCallback", "_removeTrackCallback", "_changeCallback", "_tracks", "tracks_get", "__privateAdd", "__privateGet", "id", "callback", "__privateSet", "RenditionEvent", "type", "init", "__publicField", "addRendition", "track", "rendition", "renditionList", "getPrivate", "renditionSet", "index", "VideoRenditionList", "getCurrentRenditions", "RenditionEvent", "removeRendition", "selectedChanged", "_addRenditionCallback", "_removeRenditionCallback", "_changeCallback", "__privateAdd", "id", "_a", "i", "__privateGet", "callback", "__privateSet", "_selected", "VideoRendition", "__publicField", "__privateAdd", "__privateGet", "val", "__privateSet", "selectedChanged", "_selected", "VideoTrack", "__publicField", "__privateAdd", "src", "width", "height", "codec", "bitrate", "frameRate", "rendition", "VideoRendition", "addRendition", "removeRendition", "__privateGet", "val", "__privateSet", "selectedChanged", "addRendition", "tracLine truncated
}
+106
View File
@@ -0,0 +1,106 @@
"use strict";(()=>{var ud=Object.defineProperty;var dd=Object.getPrototypeOf;var hd=Reflect.get;var fd=(s,e,t)=>e in s?ud(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var te=(s,e,t)=>(fd(s,typeof e!="symbol"?e+"":e,t),t),Wr=(s,e,t)=>{if(!e.has(s))throw TypeError("Cannot "+t)};var S=(s,e,t)=>(Wr(s,e,"read from private field"),t?t.call(s):e.get(s)),F=(s,e,t)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,t)},G=(s,e,t,i)=>(Wr(s,e,"write to private field"),i?i.call(s,t):e.set(s,t),t);var ce=(s,e,t)=>(Wr(s,e,"access private method"),t),Ts=(s,e,t)=>hd(dd(s),t,e);var ai=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class s extends ai{}globalThis.DocumentFragment=s}var Pi=class extends ai{},Yr=class extends ai{},md={get(s){},define(s,e,t){},getName(s){return null},upgrade(s){},whenDefined(s){return Promise.resolve(Pi)}},Oi,jr=class{constructor(e,t={}){F(this,Oi,void 0);G(this,Oi,t==null?void 0:t.detail)}get detail(){return S(this,Oi)}initCustomEvent(){}};Oi=new WeakMap;function gd(s,e){return new Pi}var Io={document:{createElement:gd},DocumentFragment,customElements:md,CustomEvent:jr,EventTarget:ai,HTMLElement:Pi,HTMLVideoElement:Yr},Do=typeof window=="undefined"||typeof globalThis.customElements=="undefined",xs=Do?Io:globalThis,oy=Do?Io.document:globalThis.document;var pd=Object.create,Fo=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,vd=Object.getOwnPropertyNames,Ed=Object.getPrototypeOf,Td=Object.prototype.hasOwnProperty,Uo=function(s,e){return function(){return s&&(e=s(s=0)),e}},Oe=function(s,e){return function(){return e||s((e={exports:{}}).exports,e),e.exports}},xd=function(s,e,t,i){if(e&&typeof e=="object"||typeof e=="function")for(var r=vd(e),n=0,a=r.length,o;n<a;n++)o=r[n],!Td.call(s,o)&&o!==t&&Fo(s,o,{get:function(l){return e[l]}.bind(null,o),enumerable:!(i=yd(e,o))||i.enumerable});return s},qe=function(s,e,t){return t=s!=null?pd(Ed(s)):{},xd(e||!s||!s.__esModule?Fo(t,"default",{value:s,enumerable:!0}):t,s)},Je=Oe(function(s,e){var t;typeof window!="undefined"?t=window:typeof global!="undefined"?t=global:typeof self!="undefined"?t=self:t={},e.exports=t});function Kt(s,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](s):Kt(s,e)}var Ht=Uo(function(){Ht()});function an(s){"@swc/helpers - typeof";return s&&typeof Symbol!="undefined"&&s.constructor===Symbol?"symbol":typeof s}var on=Uo(function(){}),Bo=Oe(function(s,e){var t=Array.prototype.slice;e.exports=i;function i(r,n){for(("length"in r)||(r=[r]),r=t.call(r);r.length;){var a=r.shift(),o=n(a);if(o)return o;a.childNodes&&a.childNodes.length&&(r=t.call(a.childNodes).concat(r))}}}),_d=Oe(function(s,e){Ht(),e.exports=t;function t(i,r){if(!Kt(this,t))return new t(i,r);this.data=i,this.nodeValue=i,this.length=i.length,this.ownerDocument=r||null}t.prototype.nodeType=8,t.prototype.nodeName="#comment",t.prototype.toString=function(){return"[object Comment]"}}),Sd=Oe(function(s,e){Ht(),e.exports=t;function t(i,r){if(!Kt(this,t))return new t(i);this.data=i||"",this.length=this.data.length,this.ownerDocument=r||null}t.prototype.type="DOMTextNode",t.prototype.nodeType=3,t.prototype.nodeName="#text",t.prototype.toString=function(){return this.data},t.prototype.replaceData=function(i,r,n){var a=this.data,o=a.substring(0,i),l=a.substring(i+r,a.length);this.data=o+n+l,this.length=this.data.length}}),$o=Oe(function(s,e){e.exports=t;function t(i){var r=this,n=i.type;i.target||(i.target=r),r.listeners||(r.listeners={});var a=r.listeners[n];if(a)return a.forEach(function(o){i.currentTarget=r,typeof o=="function"?o(i):o.handleEvent(i)});r.parentNode&&r.parentNode.dispatchEvent(i)}}),Go=Oe(function(s,e){e.exports=t;function t(i,r){var n=this;n.listeners||(n.listeners={}),n.listeners[i]||(n.listeners[i]=[]),n.listeners[i].indexOf(r)===-1&&n.listeners[i].push(r)}}),Ko=Oe(function(s,e){e.exports=t;function t(i,r){var n=this;if(n.listeners&&n.listeners[i]){var a=n.listeners[i],o=a.indexOf(r);o!==-1&&a.splice(o,1)}}}),bd=Oe(function(s,e){on(),e.exports=i;var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function i(h){switch(h.nodeType){case 3:return u(h.data);case 8:return"<!--"+h.data+"-->";default:return r(h)}}function r(h){var f=[],m=h.tagName;return h.namespaceURI==="http://www.w3.org/1999/xhtml"&&(m=m.toLowerCase()),f.push("<"+m+c(h)+o(h)),t.indexOf(m)>-1?f.push(" />"):(f.push(">"),h.childNodes.length?f.push.apply(f,h.childNodes.map(i)):h.textContent||h.innerText?f.push(u(h.textContent||h.innerText)):h.innerHTML&&f.push(h.innerHTML),f.push("</"+m+">")),f.join("")}function n(h,f){var m=an(h[f]);return f==="style"&&Object.keys(h.style).length>0?!0:h.hasOwnProperty(f)&&(m==="string"||m==="boolean"||m==="number")&&f!=="nodeName"&&f!=="className"&&f!=="tagName"&&f!=="textContent"&&f!=="innerTextLine truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function en(s,e){(e==null||e>s.length)&&(e=s.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=s[t];return i}function Vo(s,e){if(s){if(typeof s=="string")return en(s,e);var t=Object.prototype.toString.call(s).slice(8,-1);if(t==="Object"&&s.constructor&&(t=s.constructor.name),t==="Map"||t==="Set")return Array.from(t);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return en(s,e)}}function at(s,e){return kd(s)||wd(s,e)||Vo(s,e)||Cd()}var Fi=qe(Je()),Bi=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){var e=Math.random()*16|0,t=s==="x"?e:e&3|8;return t.toString(16)})},qo=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)},Bt=function(s){if(s&&typeof s.nodeName!="undefined")return s.muxId||(s.muxId=qo()),s.muxId;var e;try{e=document.querySelector(s)}catch{}return e&&!e.muxId&&(e.muxId=s),(e==null?void 0:e.muxId)||s},tn=function(s){var e;s&&typeof s.nodeName!="undefined"?(e=s,s=Bt(e)):e=document.querySelector(s);var t=e&&e.nodeName?e.nodeName.toLowerCase():"";return[e,s,t]};function Pd(s){if(Array.isArray(s))return en(s)}function Od(s){if(typeof Symbol!="undefined"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}function Md(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qe(s){return Pd(s)||Od(s)||Vo(s)||Md()}var $t={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},Nd=function(s){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,t,i,r,n,a,o=s?[console,s]:[console],l=(t=console.trace).bind.apply(t,Qe(o)),c=(i=console.info).bind.apply(i,Qe(o)),u=(r=console.debug).bind.apply(r,Qe(o)),d=(n=console.warn).bind.apply(n,Qe(o)),h=(a=console.error).bind.apply(a,Qe(o)),f=e;return{trace:function(){for(var m=arguments.length,g=new Array(m),p=0;p<m;p++)g[p]=arguments[p];if(!(f>$t.TRACE))return l.apply(void 0,Qe(g))},debug:function(){for(var m=arguments.length,g=new Array(m),p=0;p<m;p++)g[p]=arguments[p];if(!(f>$t.DEBUG))return u.apply(void 0,Qe(g))},info:function(){for(var m=arguments.length,g=new Array(m),p=0;p<m;p++)g[p]=arguments[p];if(!(f>$t.INFO))return c.apply(void 0,Qe(g))},warn:function(){for(var m=arguments.length,g=new Array(m),p=0;p<m;p++)g[p]=arguments[p];if(!(f>$t.WARN))return d.apply(void 0,Qe(g))},error:function(){for(var m=arguments.length,g=new Array(m),p=0;p<m;p++)g[p]=arguments[p];if(!(f>$t.ERROR))return h.apply(void 0,Qe(g))},get level(){return f},set level(m){m!==this.level&&(f=m!=null?m:e)}}},ge=Nd("[mux]"),zr=qe(Je());function sn(){var s=zr.default.doNotTrack||zr.default.navigator&&zr.default.navigator.doNotTrack;return s==="1"}var Fd=qe(Je()),Ud={now:function(){var s=Fd.default.performance,e=s&&s.timing,t=e&&e.navigationStart,i=typeof t=="number"&&typeof s.now=="function"?t+s.now():Date.now();return Math.round(i)}},Se=Ud;function Q(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}Ht();function Le(s,e){if(!Kt(s,e))throw new TypeError("Cannot call a class as a function")}function ko(s,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(s,i.key,i)}}function Ze(s,e,t){return e&&ko(s.prototype,e),t&&ko(s,t),s}function N(s,e,t){return e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function rn(s,e){return rn=Object.setPrototypeOf||function(t,i){return t.__proto__=i,t},rn(s,e)}function Bd(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(e&&e.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),e&&rn(s,e)}function Ss(s){return Ss=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ss(s)}function $d(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}on();function Gd(s,e){return e&&(an(e)==="object"||typeof e=="function")?e:Q(s)}function Kd(s){var e=$d();return function(){var t=Ss(s),i;if(e){var r=Ss(this).constructor;i=Reflect.construct(t,arguments,r)}else i=t.apply(this,arguments);return Gd(this,i)}}var Ve=function(s){return $i(s)[0]},$i=function(s){if(typeof s!="string"||s==="")return["localhost"];var e=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,t=s.match(e)||[],i=t[4],r;return i&&(r=(i.match(/[^\.]+\.[^\.]+$/)||[])[0]),[i,r]},Xr=qe(Je()),Hd={exists:function(){var s=Xr.default.performance,e=s&&s.timing;return e!==void 0},domContentLoadedEventEnd:function(){var s=Xr.default.performance,e=s&&s.timing;return e&&e.domContentLoadedEventEnd},navigationStart:function(){var s=Xr.default.performance,e=s&&s.timing;return e&&e.navigationStart}},bs=Hd;function Ee(s,e,t){t=t===void 0?1:t,s[e]=s[e]||0,s[e]+=t}function As(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.forEach(function(r){N(s,r,t[r])})}return s}function Vd(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(s,r).enumerable})),t.push.apply(t,i)}return t}function ln(s,e){return e=e!=null?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(e)):Vd(Object(e)).forEach(function(t){Object.defineProperty(s,t,Object.getOwnPropertyDescriptor(e,t))}),s}var qd=["x-cdn","content-type"],Wo=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],Wd=qd.concat(Wo);function cn(s){s=s||"";var e={},t=s.trim().split(/[\r\n]+/);return t.forEach(function(i){if(i){var r=i.split(": "),n=r.shift();n&&(Wd.indexOf(n.toLowerCase())>=0||n.toLowerCase().indexOf("x-litix-")===0)&&(e[n]=r.join(": "))}}),e}function Rs(s){if(s){var e=Wo.find(function(t){return s[t]!==void 0});return e?s[e]:void 0}}var Yd=function(s){var e={};for(var t i Line truncated
`):"")+"".concat(_&&(_.code||_.text)?"response: ".concat(_.code,", ").concat(_.text,`
`):"")+"".concat(E.reason?"failure reason: ".concat(E.reason,`
`):"")+"".concat(E.level?"level: ".concat(E.level,`
`):"")+"".concat(E.parent?"parent stream controller: ".concat(E.parent,`
`):"")+"".concat(E.buffer?"buffer length: ".concat(E.buffer,`
`):"")+"".concat(E.error?"error: ".concat(E.error,`
`):"")+"".concat(E.event?"event: ".concat(E.event,`
`):"")+"".concat(E.err?"error message: ".concat((w=E.err)===null||w===void 0?void 0:w.message,`
`):"");l("error",{player_error_code:T,player_error_message:x,player_error_context:P})}};t.on(r.Events.ERROR,m);var g=function(v,E){var T=E.frag,x=T&&T._url||"";l("requestcanceled",{request_event_type:v,request_url:x,request_type:"media",request_hostname:Ve(x)})};t.on(r.Events.FRAG_LOAD_EMERGENCY_ABORTED,g);var p=function(v,E){var T=E.level,x=t.levels[T];if(x&&x.attrs&&x.attrs.BANDWIDTH){var _=x.attrs.BANDWIDTH,I,b=parseFloat(x.attrs["FRAME-RATE"]);isNaN(b)||(I=b),_?l("renditionchange",{video_source_fps:I,video_source_bitrate:_,video_source_width:x.width,video_source_height:x.height,video_source_rendition_name:x.name,video_source_codec:x==null?void 0:x.videoCodec}):n.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};t.on(r.Events.LEVEL_SWITCHED,p),t._stopMuxMonitor=function(){t.off(r.Events.MANIFEST_LOADED,c),t.off(r.Events.LEVEL_LOADED,u),t.off(r.Events.AUDIO_TRACK_LOADED,d),t.off(r.Events.FRAG_LOADED,h),t.off(r.Events.FRAG_CHANGED,f),t.off(r.Events.ERROR,m),t.off(r.Events.FRAG_LOAD_EMERGENCY_ABORTED,g),t.off(r.Events.LEVEL_SWITCHED,p),t.off(r.Events.DESTROYING,t._stopMuxMonitor),delete t._stopMuxMonitor},t.on(r.Events.DESTROYING,t._stopMuxMonitor)},zd=function(s){s&&typeof s._stopMuxMonitor=="function"&&s._stopMuxMonitor()},wo=function(s,e){if(!s||!s.requestEndDate)return{};var t=Ve(s.url),i=s.url,r=s.bytesLoaded,n=new Date(s.requestStartDate).getTime(),a=new Date(s.firstByteDate).getTime(),o=new Date(s.requestEndDate).getTime(),l=isNaN(s.duration)?0:s.duration,c=typeof e.getMetricsFor=="function"?e.getMetricsFor(s.mediaType).HttpList:e.getDashMetrics().getHttpRequests(s.mediaType),u;c.length>0&&(u=cn(c[c.length-1]._responseHeaders||""));var d=u?Rs(u):void 0;return{requestStart:n,requestResponseStart:a,requestResponseEnd:o,requestBytesLoaded:r,requestResponseHeaders:u,requestMediaDuration:l,requestHostname:t,requestUrl:i,requestId:d}},Xd=function(s,e){var t=e.getQualityFor(s),i=e.getCurrentTrackFor(s).bitrateList;return i?{currentLevel:t,renditionWidth:i[t].width||null,renditionHeight:i[t].height||null,renditionBitrate:i[t].bandwidth}:{}},Qd=function(s){var e;return(e=s.match(/.*codecs\*?="(.*)"/))===null||e===void 0?void 0:e[1]},Jd=function(s){try{var e,t,i=(t=s.getVersion)===null||t===void 0||(e=t.call(s))===null||e===void 0?void 0:e.split(".").map(function(r){return parseInt(r)})[0];return i}catch{return!1}},Zd=function(s,e,t){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},r=s.log;if(!t||!t.on){r.warn("Invalid dash.js player reference. Monitoring blocked.");return}var n=Jd(t),a=function(T,x){return s.emit(e,T,x)},o=function(T){var x=T.type,_=T.data,I=(_||{}).url;a("requestcompleted",{request_event_type:x,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:Ve(I),request_url:I})};t.on("manifestLoaded",o);var l={},c=function(T){if(typeof T.getRequests!="function")return null;var x=T.getRequests({state:"executed"});return x.length===0?null:x[x.length-1]},u=function(T){var x=T.type,_=T.fragmentModel,I=T.chunk,b=c(_);d({type:x,request:b,chunk:I})},d=function(T){var x=T.type,_=T.chunk,I=T.request,b=(_||{}).mediaInfo,R=b||{},k=R.type,L=R.bitrateList;L=L||[];var w={};L.forEach(function(ee,X){w[X]={},w[X].width=ee.width,w[X].height=ee.height,w[X].bitrate=ee.bandwidth,w[X].attrs={}}),k==="video"?l.video=w:k==="audio"?l.audio=w:l.media=w;var P=wo(I,t),O=P.requestStart,W=P.requestResponseStart,q=P.requestResponseEnd,$=P.requestResponseHeaders,Z=P.requestMediaDuration,ne=P.requestHostname,H=P.requestUrl,B=P.requestId;a("requestcompleted",{request_event_type:x,request_start:O,request_response_start:W,request_response_end:q,request_bytes_loaded:-1,request_type:k+"_init",request_response_headers:$,request_hostname:ne,request_id:B,request_url:H,request_media_duration:Z,request_rendition_lists:l})};n>=4?t.on("initFragmentLoaded",d):t.on("initFragmentLoaded",u);var h=function(T){var x=T.type,_=T.fragmentModel,I=T.chunk,b=c(_);f({type:x,request:b,chunk:I})},f=function(T){var x=T.type,_=T.chunk,I=T.request,b=_||{},R=b.mediaInfo,k=b.start,L=R||{},w=L.type,P=wo(I,t),O=P.requestStart,W=P.requestResponseStart,q=P.requestResponseEnd,$=P.requestBytesLoaded,Z=P.requestResponseHeaders,ne=P.requestMediaDuration,H=P.requestHostname,B=P.requestUrl,ee=P.requestId,X=Xd(w,t),ae=X.currentLevel,ye=X.renditionWidth,ve=X.renditionHeight,_e=X.renditionBitrate;a("requestcompleted",{request_event_type:x,request_start:O,request_response_start:W,request_response_end:q,request_bytes_loaded:$,request_type:w,request_response_headers:Z,request_hostname:H,request_id:ee,request_url:B,request_media_start_time:k,request_media_duration:ne,request_current_level:ae,request_labeled_bitrate:_e,request_video_width:ye,request_video_height:ve})};n>=4?t.on("mediaFragmentLoaded",f):t.on("mediaFragmentLoaded",h);var m={video:void 0,audio:void 0,totalBitrate:void 0},g=function(){if(m.video&&typeof m.video.bitrate=="number"){if(!(m.video.width&&m.video.height)){ Line truncated
`):"")+"".concat(R!=null&&R.status||R!=null&&R.statusText?"response: ".concat(R==null?void 0:R.status,", ").concat(R==null?void 0:R.statusText,`
`):"");a("error",{player_error_code:x==null?void 0:x.code,player_error_message:x==null?void 0:x.message,player_error_context:k})};t.on("error",E),t._stopMuxMonitor=function(){t.off("manifestLoaded",o),t.off("initFragmentLoaded",d),t.off("mediaFragmentLoaded",f),t.off("qualityChangeRendered",p),t.off("error",E),t.off("fragmentLoadingAbandoned",v),delete t._stopMuxMonitor}},eh=function(s){s&&typeof s._stopMuxMonitor=="function"&&s._stopMuxMonitor()},Co=0,th=function(){"use strict";function s(){Le(this,s),N(this,"_listeners",void 0)}return Ze(s,[{key:"on",value:function(e,t,i){return t._eventEmitterGuid=t._eventEmitterGuid||++Co,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],i&&(t=t.bind(i)),this._listeners[e].push(t),t}},{key:"off",value:function(e,t){var i=this._listeners&&this._listeners[e];i&&i.forEach(function(r,n){r._eventEmitterGuid===t._eventEmitterGuid&&i.splice(n,1)})}},{key:"one",value:function(e,t,i){var r=this;t._eventEmitterGuid=t._eventEmitterGuid||++Co;var n=function(){r.off(e,n),t.apply(i||this,arguments)};n._eventEmitterGuid=t._eventEmitterGuid,this.on(e,n)}},{key:"emit",value:function(e,t){var i=this;if(this._listeners){t=t||{};var r=this._listeners["before*"]||[],n=this._listeners[e]||[],a=this._listeners["after"+e]||[],o=function(l,c){l=l.slice(),l.forEach(function(u){u.call(i,{type:e},c)})};o(r,t),o(n,t),o(a,t)}}}]),s}(),ih=th,Qr=qe(Je()),sh=function(){"use strict";function s(e){var t=this;Le(this,s),N(this,"_playbackHeartbeatInterval",void 0),N(this,"_playheadShouldBeProgressing",void 0),N(this,"pm",void 0),this.pm=e,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,e.on("playing",function(){t._playheadShouldBeProgressing=!0}),e.on("play",this._startPlaybackHeartbeatInterval.bind(this)),e.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),e.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),e.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("seeked",function(){e.data.player_is_paused?t._stopPlaybackHeartbeatInterval():t._startPlaybackHeartbeatInterval()}),e.on("timeupdate",function(){t._playbackHeartbeatInterval!==null&&e.emit("playbackheartbeat")}),e.on("devicesleep",function(i,r){t._playbackHeartbeatInterval!==null&&(Qr.default.clearInterval(t._playbackHeartbeatInterval),e.emit("playbackheartbeatend",{viewer_time:r.viewer_time}),t._playbackHeartbeatInterval=null)})}return Ze(s,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;this._playbackHeartbeatInterval===null&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=Qr.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,this._playbackHeartbeatInterval!==null&&(Qr.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),s}(),rh=sh,nh=function s(e){"use strict";var t=this;Le(this,s),N(this,"viewErrored",void 0),e.on("viewinit",function(){t.viewErrored=!1}),e.on("error",function(i,r){try{var n=e.errorTranslator({player_error_code:r.player_error_code,player_error_message:r.player_error_message,player_error_context:r.player_error_context,player_error_severity:r.player_error_severity,player_error_business_exception:r.player_error_business_exception});n&&(e.data.player_error_code=n.player_error_code||r.player_error_code,e.data.player_error_message=n.player_error_message||r.player_error_message,e.data.player_error_context=n.player_error_context||r.player_error_context,e.data.player_error_severity=n.player_error_severity||r.player_error_severity,e.data.player_error_business_exception=n.player_error_business_exception||r.player_error_business_exception,t.viewErrored=!0)}catch(a){e.mux.log.warn("Exception in error translator callback.",a),t.viewErrored=!0}}),e.on("aftererror",function(){var i,r,n,a,o;(i=e.data)===null||i===void 0||delete i.player_error_code,(r=e.data)===null||r===void 0||delete r.player_error_message,(n=e.data)===null||n===void 0||delete n.player_error_context,(a=e.data)===null||a===void 0||delete a.player_error_severity,(o=e.data)=== Line truncated
`);e>-1;e=this.buffer.indexOf(`
`))this.processLine(this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)};Ls.prototype.processLine=function(s){var e=s.indexOf(":"),t=Ef(s,e),i=t[0],r=t.length===2?un(t[1]):void 0;if(i[0]!=="#")this.currentUri.uri=i,this.manifest.segments.push(this.currentUri),this.manifest.targetDuration&&!("duration"in this.currentUri)&&(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(i){case Ut.TARGET_DURATION:{if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break}case Ut.PART_INF:{Zr(this.manifest,t),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break}case Ut.SERVER_CONTROL:{Zr(this.manifest,t),this.setHoldBack();break}case Ut.INF:{r===0?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break}case Ut.PROGRAM_DATE_TIME:{var n=r,a=new Date(n);this.manifest.dateTimeString||(this.manifest.dateTimeString=n,this.manifest.dateTimeObject=a),this.currentUri.dateTimeString=n,this.currentUri.dateTimeObject=a;break}case Ut.VERSION:{Zr(this.manifest,t);break}case Ut.SESSION_DATA:{var o=Tf(t[1]),l=Yo(o);Object.assign(this.manifest.sessionData,l)}}};Ls.prototype.setHoldBack=function(){var s=this.manifest,e=s.serverControl,t=s.targetDuration,i=s.partTargetDuration;if(e){var r="holdBack",n="partHoldBack",a=t&&t*3,o=i&&i*2;t&&!e.hasOwnProperty(r)&&(e[r]=a),a&&e[r]<a&&(e[r]=a),i&&!e.hasOwnProperty(n)&&(e[n]=i*3),i&&e[n]<o&&(e[n]=o)}};var Zr=function(s,e){var t=il(e[0].replace("#EXT-X-","")),i;vf(e[1])?(i={},i=Object.assign(yf(e[1]),i)):i=un(e[1]),s[t]=i},il=function(s){return s.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},un=function(s){if(s.toLowerCase()==="yes"||s.toLowerCase()==="no")return s.toLowerCase()==="yes";var e=s.indexOf(":")!==-1?s:parseFloat(s);return isNaN(e)?s:e},pf=function(s){var e={},t=s.split("=");if(t.length>1){var i=il(t[0]);e[i]=un(t[1])}return e},yf=function(s){for(var e=s.split(","),t={},i=0;e.length>i;i++){var r=e[i],n=pf(r);t=Object.assign(n,t)}return t},vf=function(s){return s.indexOf("=")>-1},Ef=function(s,e){return e===-1?[s]:[s.substring(0,e),s.substring(e+1)]},Tf=function(s){var e={};if(s){var t=s.search(","),i=s.slice(0,t),r=s.slice(t+1),n=[i,r];return n.forEach(function(a,o){for(var l=a.replace(/['"]+/g,"").split("="),c=0;c<l.length;c++)l[c]==="DATA-ID"&&(e["DATA-ID"]=l[1-c]),l[c]==="VALUE"&&(e.VALUE=l[1-c])}),{data:e}}},xf=Ls,_f={safeCall:ff,safeIncrement:Ee,getComputedStyle:mf,secondsToMs:gf,assign:Object.assign,headersStringToObject:cn,cdnHeadersToRequestId:Rs,extractHostnameAndDomain:$i,extractHostname:Ve,manifestParser:xf,generateShortID:qo,generateUUID:Bi,now:Se.now},Sf=_f,bf={PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled"},Af=bf,Rf="mux-embed",Lf="5.3.1",If="2.1",Ge={},pt=function(s){var e=arguments;typeof s=="string"?pt.hasOwnProperty(s)?Fi.default.setTimeout(function(){e=Array.prototype.splice.call(e,1),pt[s].apply(null,e)},0):ge.warn("`"+s+"` is an unknown task"):typeof s=="function"?Fi.default.setTimeout(function(){s(pt)},0):ge.warn("`"+s+"` is invalid.")},Df={loaded:Se.now(),NAME:Rf,VERSION:Lf,API_VERSION:If,PLAYER_TRACKED:!1,monitor:function(s,e){return hf(pt,s,e)},destroyMonitor:function(s){var e=at(tn(s),1),t=e[0];t&&t.mux&&typeof t.mux.destroy=="function"?t.mux.destroy():ge.error("A video element monitor for `"+s+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(s,e){var t=Bt(s);Ge[t]?Ge[t].addHLSJS(e):ge.error("A monitor for `"+t+"` has not been initialized.")},addDashJS:function(s,e){var t=Bt(s);Ge[t]?Ge[t].addDashJS(e):ge.error("A monitor for `"+t+"` has not been initialized.")},removeHLSJS:function(s){var e=Bt(s);Ge[e]?Ge[e].removeHLSJS():ge.error("A monitor for `"+e+"` has not been initialized.")},removeDashJS:function(s){var e=Bt(s);Ge[e]?Ge[e].removeDashJS():ge.error("A monitor for `"+e+"` has not been initialized.")},init:function(s,e){sn()&&e&&e.respectDoNotTrack&&ge.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var t=Bt(s);Ge[t]=new lf(pt,t,e)},emit:function(s,e,t){var i=Bt(s);Ge[i]?(Ge[i].emit(e,t),e==="destroy"&&delete Ge[i]):ge.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:sn,log:ge,utils:Sf,events:Af,WINDOW_HIDDEN:!1,WINDO Line truncated
Time to underbuffer: ${g.toFixed(3)} s
Estimated load time for current fragment: ${R.toFixed(3)} s
Estimated load time for down switch fragment: ${L.toFixed(3)} s
TTFB estimate: ${p|0} ms
Current BW estimate: ${K(E)?E|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${w} @ ${P|0} bps`),r.trigger(y.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:i,stats:l})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(A.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){let e=this.hls.config;return new Vn(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){let{hls:e}=this;e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.FRAG_LOADING,this.onFragLoading,this),e.on(y.FRAG_LOADED,this.onFragLoaded,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this),e.on(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(y.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){let{hls:e}=this;e&&(e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.FRAG_LOADING,this.onFragLoading,this),e.off(y.FRAG_LOADED,this.onFragLoaded,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this),e.off(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(y.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(y.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){let i=t.frag;if(!this.ignoreFragment(i)){if(!i.bitrateTest){var r;this.fragCurrent=i,this.partCurrent=(r=t.part)!=null?r:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case D.BUFFER_ADD_CODEC_ERROR:case D.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case D.FRAG_LOAD_TIMEOUT:{let i=t.frag,{fragCurrent:r,partCurrent:n}=this;if(i&&r&&i.sn===r.sn&&i.level===r.level){let a=performance.now(),o=n?n.stats:i.stats,l=a-o.loading.start,c=o.loading.first?o.loading.first-o.loading.start:-1;if(o.loaded&&c>-1){let d=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(l-Math.min(d,c),o.loaded)}else this.bwEstimator.sampleTTFB(l)}break}}}getTimeToLoadFrag(e,t,i,r){let n=e+i/t,a=r?this.lastLevelLoadSec:0;return n+a}onLevelLoaded(e,t){let i=this.hls.config,{loading:r}=t.stats,n=r.end-r.start;K(n)&&(this.lastLevelLoadSec=n/1e3),t.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)}onFragLoaded(e,{frag:t,part:i}){let r=i?i.stats:t.stats;if(t.type===z.MAIN&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){let n=i?i.duration:t.duration,a=this.hls.levels[t.level],o=(a.loaded?a.loaded.bytes:0)+r.loaded,l=(a.loaded?a.loaded.duration:0)+n;a.loaded={bytes:o,duration:l},a.realBitrate=Math.round(8*o/l)}if(t.bitrateTest){let n={stats:r,frag:t,part:i,id:t.type};this.onFragBuffered(y.FRAG_BUFFERED,n),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){let{frag:i,part:r}=t,n=r!=null&&r.stats.loaded?r.stats:i.stats;if(n.aborted||this.ignoreFragment(i))return;let a=n.parsing.end-n.loading.start-Math.min(n.loading.first-n.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,n.loaded),n.bwEstimate=this.getBwEstimate(),i.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==z.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){let{maxAutoLevel:e,minAutoLevel:t}=this.hls,i=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,n=this.findBestLevel(i,t,e,0,r,1,1);if(n>-1)return n;let a=this.hls.firstLevel,o=Math.min(Math.max(a,t),e);return A.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${a} clamped to ${o}`),o}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){let e=this.forcedAutoLevel,i=this.bwEstimator.canEstimate(),r=this.lastLoadedFragLevel>-1;if(e!==-1&&(!i||!r||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;let n=i&&r?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){let a=this.hls.levels;if( Line truncated
discontinuity: ${v}
trackSwitch: ${E}
contiguous: ${I}
accurateTimeOffset: ${l}
timeOffset: ${m}
initSegmentChange: ${R}`);let L=new la(i,r,t,o,u);this.configureTransmuxer(L)}if(this.frag=n,this.part=a,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:g,chunkMeta:c,state:k},e instanceof ArrayBuffer?[e]:[]);else if(f){let L=f.push(e,g,c,k);Hs(L)?(f.async=!0,L.then(w=>{this.handleTransmuxComplete(w)}).catch(w=>{this.transmuxerError(w,c,"transmuxer-interface push error")})):(f.async=!1,this.handleTransmuxComplete(L))}}flush(e){e.transmuxing.start=self.performance.now();let{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let i=t.flush(e);Hs(i)||t.async?(Hs(i)||(i=Promise.resolve(i)),i.then(n=>{this.handleFlushResult(n,e)}).catch(n=>{this.transmuxerError(n,e,"transmuxer-interface flush error")})):this.handleFlushResult(i,e)}}transmuxerError(e,t,i){this.hls&&(this.error=e,this.hls.trigger(y.ERROR,{type:j.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,fatal:!1,error:e,err:e,reason:i}))}handleFlushResult(e,t){e.forEach(i=>{this.handleTransmuxComplete(i)}),this.onFlush(t)}onWorkerMessage(e){let t=e.data;if(!(t!=null&&t.event)){A.warn(`worker message received with no ${t?"event name":"data"}`);return}let i=this.hls;if(this.hls)switch(t.event){case"init":{var r;let n=(r=this.workerContext)==null?void 0:r.objectURL;n&&self.URL.revokeObjectURL(n);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}case"workerLog":A[t.data.logType]&&A[t.data.logType](t.data.message);break;default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,i.trigger(t.event,t.data);break}}}configureTransmuxer(e){let{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}};function Nc(s,e){if(s.length!==e.length)return!1;for(let t=0;t<s.length;t++)if(!vi(s[t].attrs,e[t].attrs))return!1;return!0}function vi(s,e,t){let i=s["STABLE-RENDITION-ID"];return i&&!t?i===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(r=>s[r]!==e[r])}function ua(s,e){return e.label.toLowerCase()===s.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(s.lang||"").toLowerCase())}var Ul=100,da=class extends Ji{constructor(e,t,i){super(e,t,i,"[audio-stream-controller]",z.AUDIO),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){let{hls:e}=this;e.on(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(y.ERROR,this.onError,this),e.on(y.BUFFER_RESET,this.onBufferReset,this),e.on(y.BUFFER_CREATED,this.onBufferCreated,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){let{hls:e}=this;e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(y.ERROR,this.onError,this),e.off(y.BUFFER_RESET,this.onBufferReset,this),e.off(y.BUFFER_CREATED,this.onBufferCreated,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:i,initPTS:r,timescale:n}){if(i==="main"){let a=t.cc;this.initPTS[t.cc]={baseTime:r,timescale:n},this.log(`InitPTS for cc: ${a} found from main: ${r}`),this.videoTrackCC=a,this.state===C.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels){this.startPosition=e,this.state=C.STOPPED;return}let t=this.lastCurrentTime;this.stopLoad(),this.setInterval(Ul),t>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=C.IDLE):(this.loadedmetadata=!1,this.state=C.WAITING_TRACK),this.nextLoadPosition=this.sta Line truncated
`)),i}getTextAndFormat(){return this.rows}},fr=class{constructor(e,t,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new qi(i),this.nonDisplayedMemory=new qi(i),this.lastOutputScreen=new qi(i),this.currRollUpRow=this.displayedMemory.rows[Ye-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[Ye-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let i=0;i<e.length;i++)this.writeScreen.insertChar(e[i]);let t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){let e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){let t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{let i=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[i]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){let t=this.logger.time;t!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=t:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}},mr=class{constructor(e,t,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Wg(),this.logger=void 0;let r=this.logger=new va;this.channels=[null,new fr(e,t,r),new fr(e+1,i,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let i=0;i<t.length;i+=2){let r=t[i]&127,n=t[i+1]&127,a=!1,o=null;if(r===0&&n===0)continue;this.logger.log(3,()=>"["+Vt([t[i],t[i+1]])+"] -> ("+Vt([r,n])+")");let l=this.cmdHistory;if(r>=16&&r<=31){if(qg(r,n,l)){Ms(null,null,l),this.logger.log(3,()=>"Repeated command ("+Vt([r,n])+") is dropped");continue}Ms(r,n,this.cmdHistory),a=this.parseCmd(r,n),a||(a=this.parseMidrow(r,n)),a||(a=this.parsePAC(r,n)),a||(a=this.parseBackgroundAttributes(r,n))}else Ms(null,null,l);if(!a&&(o=this.par Line truncated
`)}var ba=class{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new xa,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){let t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function i(){let n=t.buffer,a=0;for(n=$c(n);a<n.length&&n[a]!=="\r"&&n[a]!==`
`;)++a;let o=n.slice(0,a);return n[a]==="\r"&&++a,n[a]===`
`&&++a,t.buffer=n.slice(a),o}function r(n){Bc(n,function(a,o){},/:/)}try{let n="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;n=i();let o=n.match(/^()?WEBVTT([ \t].*)?$/);if(!(o!=null&&o[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let a=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case"HEADER":/:/.test(n)?r(n):n||(t.state="ID");continue;case"NOTE":n||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(n)){t.state="NOTE";break}if(!n)continue;if(t.cue=new ja(0,0,""),t.state="CUE",n.indexOf("-->")===-1){t.cue.id=n;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Yg(n,t.cue,t.regionList)}catch{t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{let o=n.indexOf("-->")!==-1;if(!n||o&&(a=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
`),t.cue.text+=n}continue;case"BADCUE":n||(t.state="ID")}}}catch{t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){let e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}},jg=/\r\n|\n\r|\n|\r/g,Sn=function(e,t,i=0){return e.slice(i,i+t.length)===t},zg=function(e){let t=parseInt(e.slice(-3)),i=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),n=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!K(t)||!K(i)||!K(r)||!K(n))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*i,t+=60*1e3*r,t+=60*60*1e3*n,t},bn=function(e){let t=5381,i=e.length;for(;i;)t=t*33^e.charCodeAt(--i);return(t>>>0).toString()};function za(s,e,t){return bn(s.toString())+bn(e.toString())+bn(t)}var Xg=function(e,t,i){let r=e[t],n=e[r.prevCC];if(!n||!n.new&&r.new){e.ccOffset=e.presentationOffset=r.start,r.new=!1;return}for(;(a=n)!=null&&a.new;){var a;e.ccOffset+=r.start-n.start,r.new=!1,r=n,n=e[r.prevCC]}e.presentationOffset=i};function Qg(s,e,t,i,r,n,a){let o=new ba,l=rt(new Uint8Array(s)).trim().replace(jg,`
`).split(`
`),c=[],u=e?kg(e.baseTime,e.timescale):0,d="00:00.000",h=0,f=0,m,g=!0;o.oncue=function(p){let v=t[i],E=t.ccOffset,T=(h-u)/9e4;if(v!=null&&v.new&&(f!==void 0?E=t.ccOffset=v.start:Xg(t,i,T)),T){if(!e){m=new Error("Missing initPTS for VTT MPEGTS");return}E=T-t.presentationOffset}let x=p.endTime-p.startTime,_=Ke((p.startTime+E-f)*9e4,r*9e4)/9e4;p.startTime=Math.max(_,0),p.endTime=Math.max(_+x,0);let I=p.text.trim();p.text=decodeURIComponent(encodeURIComponent(I)),p.id||(p.id=za(p.startTime,p.endTime,I)),p.endTime>0&&c.push(p)},o.onparsingerror=function(p){m=p},o.onflush=function(){if(m){a(m);return}n(c)},l.forEach(p=>{if(g)if(Sn(p,"X-TIMESTAMP-MAP=")){g=!1,p.slice(16).split(",").forEach(v=>{Sn(v,"LOCAL:")?d=v.slice(6):Sn(v,"MPEGTS:")&&(h=parseInt(v.slice(7)))});try{f=zg(d)/1e3}catch(v){m=v}return}else p===""&&(g=!1);o.parse(p+`
`)}),o.flush()}var An="stpp.ttml.im1t",Gc=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Kc=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Jg={left:"start",center:"center",right:"end",start:"start",end:"end"};function Kl(s,e,t,i){let r=J(new Uint8Array(s),["mdat"]);if(r.length===0){i(new Error("Could not parse IMSC1 mdat"));return}let n=r.map(o=>rt(o)),a=Dg(e.baseTime,1,e.timescale);try{n.forEach(o=>t(Zg(o,a)))}catch(o){i(o)}}function Zg(s,e){let r=new DOMParser().parseFromString(s,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");let n={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(n).reduce((d,h)=>(d[h]=r.getAttribute(`ttp:${h}`)||n[h],d),{}),o=r.getAttribute("xml:space")!=="preserve",l=Hl(Rn(r,"styling","style")),c=Hl(Rn(r,"layout","region")),u=Rn(r,"body","[begin]");return[].map.call(u,d=>{let h=Hc(d,o);if(!h||!d.hasAttribute("begin"))return null;let f=In(d.getAttribute("begin"),a),m=In(d.getAttribute("dur"),a),g=In(d.getAttribute("end"),a);if(f===null)throw Vl(d);if(g===null){if(m===null)throw Vl(d);g=f+m}let p=new ja(f-e,g-e,h);p.id=za(p.startTime,p.endTime,p.text);let v=c[d.getAttribute("region")],E=l[d.getAttribute("style")],T=ep(v,E,l),{textAlign:x}=T;if(x){let _=Jg[x];_&&(p.lineAlign=_),p.align=x}return Te(p,T),p}).filter(d=>d!==null)}function Rn(s,e,t){let i=s.getElementsByTagName(e)[0];return i?[].slice.call(i.querySelectorAll(t)):[]}function Hl(s){return s.reduce((e,t)=>{let i=t.getAttribute("xml:id");return i&&(e[i]=t),e},{})}function Hc(s,e){return[].slice.call(s.childNodes).reduce((t,i,r)=>{var n;return i.nodeName==="br"&&r?t+`
`:(n=i.childNodes)!=null&&n.length?Hc(i,e):e?t+i.textContent.trim().replace(/\s+/g," "):t+i.textContent},"")}function ep(s,e,t){let i="http://www.w3.org/ns/ttml#styling",r=null,n=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],a=s!=null&&s.hasAttribute("style")?s.getAttribute("style"):null;return a&&t.hasOwnProperty(a)&&(r=t[a]),n.reduce((o,l)=>{let c=Ln(e,i,l)||Ln(s,i,l)||Ln(r,i,l);return c&&(o[l]=c),o},{})}function Ln(s,e,t){return s&&s.hasAttributeNS(e,t)?s.getAttributeNS(e,t):null}function Vl(s){return new Error(`Could not parse ttml timestamp ${s}`)}function In(s,e){if(!s)return null;let t=Uc(s);return t===null&&(Gc.test(s)?t=tp(s,e):Kc.test(s)&&(t=ip(s,e))),t}function tp(s,e){let t=Gc.exec(s),i=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+i/e.frameRate}function ip(s,e){let t=Kc.exec(s),i=Number(t[1]);switch(t[2]){case"h":return i*3600;case"m":return i*60;case"ms":return i*1e3;case"f":return i/e.frameRate;case"t":return i/e.tickRate}return i}var Aa=class{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Wl(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(y.FRAG_LOADING,this.onFragLoading,this),e.on(y.FRAG_LOADED,this.onFragLoaded,this),e.on(y.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(y.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(y.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){let{hls:e}=this;e.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(y.FRAG_LOADING,this.onFragLoading,this),e.off(y.FRAG_LOADED,this.onFragLoaded,this),e.off(y.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(y.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(y.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){let e=new fi(this,"textTrack1"),t=new fi(this,"textTrack2"),i=new fi(this,"textTrack3"),r=new fi(this,"textTrack4");this.cea608Parser1=new mr(1,e,t),this.cea608Parser2=new mr(3,i,r)}}addCues(e,t,i,r,n){let a=!1;for(let o=n.length;o--;){let l=n[o],c=sp(l[0],l[1],t,i);if(c>=0&&(l[0]=Math.min(l[0],t),l[1]=Math.max(l[1],i),a=!0,c/(i-t)>.5))return}if(a||n.push([t,i]),this.config.renderTextTracksNatively){let o=this.captionsTracks[e];this.Cues.newCue(o,t,i,r)}else{let o=this.Cues.newCue(null,t,i,r);this.hls.trigger(y.CUES_PARSED,{type:"captions",cues:o,track:e})}}onInitPtsFound(e,{frag:t,id:i,initPTS:r,timescale:n}){let{unparsedVttFrags:a}=this;i==="main"&&(this.initPTS[t.cc]={baseTime:r,timescale:n}),a.length&&(this.unparsedVttFrags=[],a.forEach(o=>{this.onFragLoaded(y.FRAG_LOADED,o)}))}getExistingTrack(e,t){let{media:i}=this;if(i)for(let r=0;r<i.textTracks.length;r++){let n=i.textTracks[r];if(ql(n,{name:e,lang:t,attrs:{}}))return n}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;let{captionsProperties:t,captionsTracks:i,media:r}=this,{label:n,languageCode:a}=t[e],o=this.getExistingTrack(n,a);if(o)i[e]=o,hi(i[e]),hc(i[e],r);else{let l=this.createTextTrack("captions",n,a);l&&(l[e]=!0,i[e]=l)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;let t=this.captionsProperties[e];if(!t)return;let i=t.label,r={_id:e,label:i,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.med Line truncated
} (data length: ${t&&t.byteLength})`),r.update(t)}selectKeySystemFormat(e){let t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((t,i)=>{let r=dn(this.config),n=e.map(nl).filter(a=>!!a&&r.indexOf(a)!==-1);return this.getKeySystemSelectionPromise(n).then(({keySystem:a})=>{let o=ol(a);o?t(o):i(new Error(`Unable to find format for key-system "${a}"`))}).catch(i)})}loadKey(e){let t=e.keyInfo.decryptdata,i=this.getKeyIdString(t),r=`(keyId: ${i} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${r}`);let n=this.keyIdToKeySessionPromise[i];return n||(n=this.keyIdToKeySessionPromise[i]=this.getKeySystemForKeyPromise(t).then(({keySystem:a,mediaKeys:o})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${r}`),this.attemptSetMediaKeys(a,o).then(()=>{this.throwIfDestroyed();let l=this.createMediaKeySessionContext({keySystem:a,mediaKeys:o,decryptdata:t});return this.generateRequestWithPreferredKeySession(l,"cenc",t.pssh,"playlist-key")}))),n.catch(a=>this.handleError(a))),n}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof Ne?this.hls.trigger(y.ERROR,e.data):this.hls.trigger(y.ERROR,{type:j.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){let t=this.getKeyIdString(e),i=this.keyIdToKeySessionPromise[t];if(!i){let r=nl(e.keyFormat),n=r?[r]:dn(this.config);return this.attemptKeySystemAccess(n)}return i}getKeySystemSelectionPromise(e){if(e.length||(e=dn(this.config)),e.length===0)throw new Ne({type:j.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){let{initDataType:t,initData:i}=e,r=`"${e.type}" event: init data type: "${t}"`;if(this.debug(r),i===null)return;let n,a;if(t==="sinf"&&this.config.drmSystems[de.FAIRPLAY]){let d=be(new Uint8Array(i));try{let h=$a(JSON.parse(d).sinf),f=oc(new Uint8Array(h));if(!f)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");n=f.subarray(8,24),a=de.FAIRPLAY}catch(h){this.warn(`${r} Failed to parse sinf: ${h}`);return}}else{let d=ym(i),h=d.filter(f=>f.systemId===Ki.WIDEVINE)[0];if(!h){d.length===0||d.some(f=>!f.systemId)?this.warn(`${r} contains incomplete or invalid pssh data`):this.log(`ignoring ${r} for ${d.map(f=>al(f.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(a=al(h.systemId),h.version===0&&h.data){let f=h.data.length-22;n=h.data.subarray(f,f+16)}}if(!a||!n)return;let o=tt.hexDump(n),{keyIdToKeySessionPromise:l,mediaKeySessions:c}=this,u=l[o];for(let d=0;d<c.length;d++){let h=c[d],f=h.decryptdata;if(!f.keyId)continue;let m=tt.hexDump(f.keyId);if(o===m||f.uri.replace(/-/g,"").indexOf(o)!==-1){if(u=l[m],f.pssh)break;delete l[m],f.pssh=new Uint8Array(i),f.keyId=n,u=l[o]=u.then(()=>this.generateRequestWithPreferredKeySession(h,t,i,"encrypted-event-key-match"));break}}u||(u=l[o]=this.getKeySystemSelectionPromise([a]).then(({keySystem:d,mediaKeys:h})=>{var f;this.throwIfDestroyed();let m=new Yi("ISO-23001-7",o,(f=ol(d))!=null?f:"");return m.pssh=new Uint8Array(i),m.keyId=n,this.attemptSetMediaKeys(d,h).then(()=>{this.throwIfDestroyed();let g=this.createMediaKeySessionContext({decryptdata:m,keySystem:d,mediaKeys:h});return this.generateRequestWithPreferredKeySession(g,t,i,"encrypted-event-no-match")})})),u.catch(d=>this.handleError(d))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){let i=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);let r=Promise.all(i).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(r),r.then(()=>{this.log(`Media-keys set for "${e}"`),i.push(r),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(n=>i.indexOf(n)===-1)})}generateRequestWithPreferredKeySession(e,t,i,r){var n,a;let o=(n=this.config.drmSystems)==null||(a=n[e.keySystem])==null?void 0:a.generateRequest;if(o)try{let m=o.call(this.hls,t,i,e);if(!m)throw new Error("Invalid response from configured generateRequest filter");t=m.initDataType,i=e.decryptdata.pssh=m.initData?new Uint8Array(m.initData):null}catch(m){var l;if(this.warn(m.message),(l=this.hls)!=null&&l.config.debug)throw m}if(i===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);let c=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${r}": ${c} (init data type: ${t} length: ${i?i.byteLenLine truncated
`).find((i,r,n)=>r&&n[r-1].startsWith("#EXT-X-STREAM-INF"));return fetch(t).then(i=>i.status!==200?Promise.reject(i):i.text()).then(i=>i.split(`
`))}),R0=s=>{var e,t,i;let r=(t=((e=s.find(l=>l.startsWith("#EXT-X-PLAYLIST-TYPE")))!=null?e:"").split(":")[1])==null?void 0:t.trim(),n=cu(r),a=uu(r),o;if(n===Ue.LIVE){let l=s.find(c=>c.startsWith("#EXT-X-PART-INF"));if(l)o=+l.split(":")[1].split("=")[1]*2;else{let c=s.find(d=>d.startsWith("#EXT-X-TARGETDURATION")),u=(i=c==null?void 0:c.split(":"))==null?void 0:i[1];o=+(u!=null?u:6)*3}}return{streamType:n,targetLiveWindow:a,liveEdgeStartOffset:o}},L0=async(s,e)=>{if(e===_t.MP4)return{streamType:Ue.ON_DEMAND,targetLiveWindow:Number.NaN,liveEdgeStartOffset:void 0};if(e===_t.M3U8){let t=await A0(s);return R0(t)}return console.error(`Media type ${e} is an unrecognized or unsupported type for src ${s}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0}},I0=async(s,e,t=Rr({src:s}))=>{var i,r,n;let{streamType:a,targetLiveWindow:o,liveEdgeStartOffset:l}=await L0(s,t);((i=Ce.get(e))!=null?i:{}).liveEdgeStartOffset=l,((r=Ce.get(e))!=null?r:{}).targetLiveWindow=o,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((n=Ce.get(e))!=null?n:{}).streamType=a,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},D0=s=>{var e;let t=s.type,i=cu(t),r=uu(t),n,a=!!((e=s.partList)!=null&&e.length);return i===Ue.LIVE&&(n=a?s.partTarget*2:s.targetduration*3),{streamType:i,targetLiveWindow:r,liveEdgeStartOffset:n,lowLatency:a}},k0=(s,e,t)=>{var i,r,n,a,o,l,c,u;let{streamType:d,targetLiveWindow:h,liveEdgeStartOffset:f,lowLatency:m}=D0(s);if(d===Ue.LIVE){m?(t.config.backBufferLength=(i=t.userConfig.backBufferLength)!=null?i:4,t.config.maxFragLookUpTolerance=(r=t.userConfig.maxFragLookUpTolerance)!=null?r:.001,t.config.abrBandWidthUpFactor=(n=t.userConfig.abrBandWidthUpFactor)!=null?n:t.config.abrBandWidthFactor):t.config.backBufferLength=(a=t.userConfig.backBufferLength)!=null?a:8;let g=Object.freeze({get length(){return e.seekable.length},start(p){return e.seekable.start(p)},end(p){var v;return p>this.length||p<0||Number.isFinite(e.duration)?e.seekable.end(p):(v=t.liveSyncPosition)!=null?v:e.seekable.end(p)}});((o=Ce.get(e))!=null?o:{}).seekable=g}((l=Ce.get(e))!=null?l:{}).liveEdgeStartOffset=f,((c=Ce.get(e))!=null?c:{}).targetLiveWindow=h,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((u=Ce.get(e))!=null?u:{}).streamType=d,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},tu,iu,w0=(iu=(tu=globalThis==null?void 0:globalThis.navigator)==null?void 0:tu.userAgent)!=null?iu:"",su,ru,nu,C0=(nu=(ru=(su=globalThis==null?void 0:globalThis.navigator)==null?void 0:su.userAgentData)==null?void 0:ru.platform)!=null?nu:"",P0=w0.toLowerCase().includes("android")||["x11","android"].some(s=>C0.toLowerCase().includes(s)),Ce=new WeakMap,xt="mux.com",au,ou,Tu=(ou=(au=me).isSupported)==null?void 0:ou.call(au),O0=P0,xu=()=>Is.utils.now(),M0=Is.utils.generateUUID,_u=({playbackId:s,customDomain:e=xt,maxResolution:t,minResolution:i,renditionOrder:r,programStartTime:n,programEndTime:a,assetStartTime:o,assetEndTime:l,playbackToken:c,tokens:{playback:u=c}={},extraSourceParams:d={}}={})=>{if(!s)return;let[h,f=""]=Ar(s),m=new URL(`https://stream.${e}/${h}.m3u8${f}`);return u||m.searchParams.has("token")?(m.searchParams.forEach((g,p)=>{p!="token"&&m.searchParams.delete(p)}),u&&m.searchParams.set("token",u)):(t&&m.searchParams.set("max_resolution",t),i&&(m.searchParams.set("min_resolution",i),t&&+t.slice(0,-1)<+i.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",i,"maxResolution",t)),r&&m.searchParams.set("rendition_order",r),n&&m.searchParams.set("program_start_time",`${n}`),a&&m.searchParams.set("program_end_time",`${a}`),o&&m.searchParams.set("asset_start_time",`${o}`),l&&m.searchParams.set("asset_end_time",`${l}`),Object.entries(d).forEach(([g,p])=>{p!=null&&m.searchParams.set(g,p)})),m.toString()},Lr=s=>{if(!s)return;let[e]=s.split("?");return e||void 0},mo=s=>{if(!s||!s.startsWith("https://stream."))return;let[e]=new URL(s).pathname.slice(1).split(".m3u8");return e||void 0},N0=s=>{var e,t,i;return(e=s==null?void 0:s.metadata)!=null&&e.video_id?s.metadata.video_id:ku(s)&&(i=(t=Lr(s.playbackId))!=null?t:mo(s.src))!=null?i:s.src},go=s=>{var e;return(e=Ce.get(s))==null?void 0:e.error},br=s=>{var e,t;return(t=(e=Ce.get(s))==null?void 0:e.streamType)!=null?t:Ue.UNKNOWN},Su=s=>{var e,t;return(t=(e=Ce.get(s))==null?void 0:e.targetLiveWindow)!=null?t:Number.NaN},Ir=s=>{var e,t;return(t=(e=Ce.get(s))==null?void 0:e.seekable)!=null?t:s.seekable},bu=s=>{var e;let t=(e=Ce.get(s))==null?void 0:e.liveEdgeStartOffset;if(typeof t!="number")return Number.NaN;let i=Ir(s);return i.length?i.end(i.length-1)-t:Number.NaN},po=.034,F0=(s,e,t=po)=>Math.abs(s-e)<=t,Au=(s,e,t=po)=>s>e||F0(s,e,t),U0=(s,e=po)=>s.paused&&Au(s.currentTime,s.duration,e),Ru=(s,e)=>{var t,i,r;if(!e||!s.buffered.length)return;if(s.readyState>2)return!1;let n=e.currentLevel>=0?(i=(t=e.levels)==null?void 0:t[e.currentLevel])==null?vo Line truncated
`:""}${s.response&&(s.response.code||s.response.text)?`response: ${s.response.code}, ${s.response.text}
`:""}${s.reason?`failure reason: ${s.reason}
`:""}${s.level?`level: ${s.level}
`:""}${s.parent?`parent stream controller: ${s.parent}
`:""}${s.buffer?`buffer length: ${s.buffer}
`:""}${s.error?`error: ${s.error}
`:""}${s.event?`event: ${s.event}
`:""}${s.err?`error message: ${(r=s.err)==null?void 0:r.message}
`:""}`),l.data=s,l};var j0=()=>{try{return"0.22.0"}catch{}return"UNKNOWN"},z0=j0(),Pu=()=>z0;var To=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"];function X0(s){return`
<style>
:host {
display: inline-flex;
line-height: 0;
flex-direction: column;
justify-content: end;
}
audio {
width: 100%;
}
</style>
<slot name="media">
<audio${$u(s)}></audio>
</slot>
<slot></slot>
`}function Q0(s){return`
<style>
:host {
display: inline-block;
line-height: 0;
}
video {
max-width: 100%;
max-height: 100%;
min-width: 100%;
min-height: 100%;
object-fit: var(--media-object-fit, contain);
object-position: var(--media-object-position, 50% 50%);
}
video::-webkit-media-text-track-container {
transform: var(--media-webkit-text-track-transform);
transition: var(--media-webkit-text-track-transition);
}
</style>
<slot name="media">
<video${$u(s)}></video>
</slot>
<slot></slot>
`}var Nu=(s,{tag:e,is:t})=>{var n,a,o,l,c,Fu,d,h,f,m,Qt,p,Eo,E,Uu,x,Bu;let i=(a=(n=globalThis.document)==null?void 0:n.createElement)==null?void 0:a.call(n,e,{is:t}),r=i?J0(i):[];return o=class extends s{constructor(){super();F(this,m);F(this,p);F(this,E);F(this,x);F(this,d,void 0);F(this,h,void 0);F(this,f,new Map)}static get observedAttributes(){var k,L,w;return ce(k=o,c,Fu).call(k),[...(w=(L=i==null?void 0:i.constructor)==null?void 0:L.observedAttributes)!=null?w:[],"autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"]}get nativeEl(){var R,k,L;return ce(this,m,Qt).call(this),(L=(k=(R=S(this,h))!=null?R:this.shadowRoot.querySelector(e))!=null?k:this.querySelector(":scope > [slot=media]"))!=null?L:this.querySelector(e)}set nativeEl(R){G(this,h,R)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(R){this.toggleAttribute("muted",!!R)}get src(){return this.getAttribute("src")}set src(R){this.setAttribute("src",`${R}`)}get preload(){var R,k;return(k=this.getAttribute("preload"))!=null?k:(R=this.nativeEl)==null?void 0:R.preload}set preload(R){this.setAttribute("preload",`${R}`)}init(){var R,k;if(!this.shadowRoot){this.attachShadow({mode:"open"});let L=Z0(this.attributes);t&&(L.is=t),e&&(L.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(L)}this.nativeEl.muted=this.hasAttribute("muted");for(let L of r)ce(this,E,Uu).call(this,L);this.shadowRoot.addEventListener("slotchange",this),ce(this,p,Eo).call(this);for(let L of this.constructor.Events)(k=(R=this.shadowRoot).addEventListener)==null||k.call(R,L,this,!0)}handleEvent(R){if(R.type==="slotchange"){ce(this,p,Eo).call(this);return}R.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(R.type,{detail:R.detail}))}attributeChangedCallback(R,k,L){ce(this,m,Qt).call(this),ce(this,x,Bu).call(this,R,k,L)}connectedCallback(){ce(this,m,Qt).call(this)}},l=new WeakMap,c=new WeakSet,Fu=function(){if(S(this,l))return;G(this,l,!0);let R=new Set(this.observedAttributes);R.delete("muted");for(let k of r){if(k in this.prototype)continue;if(typeof i[k]=="function")this.prototype[k]=function(...w){return ce(this,m,Qt).call(this),this.call?this.call(k,...w):this.nativeEl[k].apply(this.nativeEl,w)};else{let w={get(){var O,W,q;ce(this,m,Qt).call(this);let P=k.toLowerCase();if(R.has(P)){let $=this.getAttribute(P);return $===null?!1:$===""?!0:$}return(q=(O=this.get)==null?void 0:O.call(this,k))!=null?q:(W=this.nativeEl)==null?void 0:W[k]}};k!==k.toUpperCase()&&(w.set=function(P){ce(this,m,Qt).call(this);let O=k.toLowerCase();if(R.has(O)){P===!0||P===!1||P==null?this.toggleAttribute(O,!!P):this.setAttribute(O,P);return}if(this.set){this.set(k,P);return}this.nativeEl[k]=P}),Object.defineProperty(this.prototype,k,w)}}},d=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakSet,Qt=function(){S(this,d)||(G(this,d,!0),this.init())},p=new WeakSet,Eo=function(){let R=new Map(S(this,f));this.shadowRoot.querySelector("slot:not([name])").assignedElements({flatten:!0}).filter(k=>["track","source"].includes(k.localName)).forEach(k=>{var w,P;R.delete(k);let L=S(this,f).get(k);L||(L=k.cloneNode(),S(this,f).set(k,L)),(P=(w=this.nativeEl).append)==null||P.call(w,L),L.localName==="track"&&L.default&&(L.kind==="chapters"||L.kind==="metadata")&&L.track.mode==="disabled"&&(L.track.mode="hidden")}),R.forEach(k=>k.remove())},E=new WeakSet,Uu=function(R){if(Object.prototype.hasOwnProperty.call(this,R)){let k=this[R];delete this[R],this[R]=k}},x=new WeakSet,Bu=function(R,k,L){var w,P,O,W,q,$;["id","class"].includes(R)||!o.observedAttributes.includes(R)&&this.constructor.observedAttributes.includes(R)||(L===null?(P=(w=this.nativeEl).removeAttribute)==null||P.call(w,R):((W=(O=this.nativeEl).getAttribute)==null?void 0:W.call(O,R))!=L&&(($=(q=this.nativeEl).setAttribute)==null||$.call(q,R,L)))},F(o,c),te(o,"getTemplateHTML",e.endsWith("audio")?X0:Q0),te(o,"shadowRootOptions",{mode:"open"}),te(o,"Events",To),F(o,l,void 0),o};function J0(s){let e=[];for(let t=Object.getPrototypeOf(s);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t))e.push(...Object.getOwnPropertyNames(t));return e}function $u(s){let e="";for(let t in s){let i=s[t];i===""?e+=` ${t}`:e+=` ${t}="${i}"`}return e}function Z0(s){let e={};for(let t of s)e[t.name]=t.value;return e}var Ou,Dr=Nu((Ou=globalThis.HTMLElement)!=null?Ou:class{},{tag:"video"}),Mu,_y=Nu((Mu=globalThis.HTMLElement)!=null?Mu:class{},{tag:"audio"});var dt=new WeakMap,Ei=class extends Error{},kr=class extends Error{};var Gu=globalThis.WeakRef?class extends Set{add(s){super.add(new WeakRef(s))}forEach(s){super.forEach(e=>{let t=e.deref();t&&s(t)})}}:Set;function Ku(s){var e,t,i;(t=(e=globalThis.chrome)==null?void 0:e.cast)!=null&&t.isAvailable?(i=globalThis.cast)!=null&&i.framework?s():customElements.whenDefined("google-cast-button").then(s):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast Line truncated
/*! Bundled license information:
mux-embed/dist/mux.mjs:
(*!
* JavaScript Cookie v2.1.3
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*)
*/
//# sourceMappingURL=mux-video.js.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/polyfills/index.ts", "../../../node_modules/mux-embed/dist/mux.mjs", "../../../node_modules/hls.js/dist/node_modules/url-toolkit/src/url-toolkit.js", "../../../node_modules/hls.js/dist/src/polyfills/number.ts", "../../../node_modules/hls.js/dist/src/events.ts", "../../../node_modules/hls.js/dist/src/errors.ts", "../../../node_modules/hls.js/dist/src/utils/logger.ts", "../../../node_modules/hls.js/dist/src/utils/attr-list.ts", "../../../node_modules/hls.js/dist/src/loader/date-range.ts", "../../../node_modules/hls.js/dist/src/loader/load-stats.ts", "../../../node_modules/hls.js/dist/src/loader/fragment.ts", "../../../node_modules/hls.js/dist/src/loader/level-details.ts", "../../../node_modules/hls.js/dist/src/utils/numeric-encoding-utils.ts", "../../../node_modules/hls.js/dist/src/utils/keysystem-util.ts", "../../../node_modules/hls.js/dist/src/utils/global.ts", "../../../node_modules/hls.js/dist/src/utils/mediakeys-helper.ts", "../../../node_modules/hls.js/dist/src/utils/typed-array.ts", "../../../node_modules/hls.js/dist/src/demux/id3.ts", "../../../node_modules/hls.js/dist/src/utils/hex.ts", "../../../node_modules/hls.js/dist/src/utils/mp4-tools.ts", "../../../node_modules/hls.js/dist/src/loader/level-key.ts", "../../../node_modules/hls.js/dist/src/utils/variable-substitution.ts", "../../../node_modules/hls.js/dist/src/utils/mediasource-helper.ts", "../../../node_modules/hls.js/dist/src/utils/codecs.ts", "../../../node_modules/hls.js/dist/src/loader/m3u8-parser.ts", "../../../node_modules/hls.js/dist/src/types/loader.ts", "../../../node_modules/hls.js/dist/src/loader/playlist-loader.ts", "../../../node_modules/hls.js/dist/src/utils/texttrack-utils.ts", "../../../node_modules/hls.js/dist/src/types/demuxer.ts", "../../../node_modules/hls.js/dist/src/controller/id3-track-controller.ts", "../../../node_modules/hls.js/dist/src/controller/latency-controller.ts", "../../../node_modules/hls.js/dist/src/types/level.ts", "../../../node_modules/hls.js/dist/src/utils/level-helper.ts", "../../../node_modules/hls.js/dist/src/utils/error-helper.ts", "../../../node_modules/hls.js/dist/src/utils/binary-search.ts", "../../../node_modules/hls.js/dist/src/controller/fragment-finders.ts", "../../../node_modules/hls.js/dist/src/controller/error-controller.ts", "../../../node_modules/hls.js/dist/src/controller/base-playlist-controller.ts", "../../../node_modules/hls.js/dist/src/utils/ewma.ts", "../../../node_modules/hls.js/dist/src/utils/ewma-bandwidth-estimator.ts", "../../../node_modules/hls.js/dist/src/utils/mediacapabilities-helper.ts", "../../../node_modules/hls.js/dist/src/utils/hdr.ts", "../../../node_modules/hls.js/dist/src/utils/rendition-helper.ts", "../../../node_modules/hls.js/dist/src/controller/abr-controller.ts", "../../../node_modules/hls.js/dist/src/task-loop.ts", "../../../node_modules/hls.js/dist/src/controller/fragment-tracker.ts", "../../../node_modules/hls.js/dist/src/utils/buffer-helper.ts", "../../../node_modules/hls.js/dist/src/types/transmuxer.ts", "../../../node_modules/hls.js/dist/src/utils/discontinuities.ts", "../../../node_modules/hls.js/dist/src/loader/fragment-loader.ts", "../../../node_modules/hls.js/dist/src/crypt/aes-crypto.ts", "../../../node_modules/hls.js/dist/src/crypt/fast-aes-key.ts", "../../../node_modules/hls.js/dist/src/crypt/aes-decryptor.ts", "../../../node_modules/hls.js/dist/src/crypt/decrypter.ts", "../../../node_modules/hls.js/dist/src/utils/time-ranges.ts", "../../../node_modules/hls.js/dist/src/controller/base-stream-controller.ts", "../../../node_modules/hls.js/dist/src/demux/chunk-cache.ts", "../../../node_modules/hls.js/dist/src/demux/inject-worker.ts", "../../../node_modules/hls.js/dist/src/demux/dummy-demuxed-track.ts", "../../../node_modules/hls.js/dist/src/demux/audio/base-audio-demuxer.ts", "../../../node_modules/hls.js/dist/src/demux/audio/adts.ts", "../../../node_modules/hls.js/dist/src/demux/audio/mpegaudio.ts", "../../../node_modules/hls.js/dist/src/demux/audio/aacdemuxer.ts", "../../../node_modules/hls.js/dist/src/demux/mp4demuxer.ts", "../../../node_modules/hls.js/dist/src/demux/audio/dolby.ts", "../../../node_modules/hls.js/dist/src/demux/audio/ac3-demuxer.ts", "../../../node_modules/hls.js/dist/src/demux/video/base-video-parser.ts", "../../../node_modules/hls.js/dist/src/demux/video/exp-golomb.ts", "../../../node_modules/hls.js/dist/src/demux/video/avc-video-parser.ts", "../../../node_modules/hls.js/dist/src/demux/sample-aes.ts", "../../../node_modules/hls.js/dist/src/demux/tsdemuxer.ts", "../../../node_modules/hls.js/dist/src/demux/audio/mp3demuxer.ts", "../../../node_modules/hls.js/dist/src/remux/aac-helper.ts", "../../../node_modules/hls.js/dist/src/remux/mp4-generator.ts", "../../../node_modules/hls.js/dist/src/utils/timescale-conversion.ts", "../../../node_modules/hls.js/dist/src/remux/mp4-remuxer.ts", "../../../node_modules/hls.js/dist/src/remux/passthrough-remuxer.ts", "../../../node_modules/hls.js/dist/src/demux/transmuxer.ts", "Line truncated
"sourcesContent": ["/* eslint @typescript-eslint/no-empty-function: \"off\", @typescript-eslint/no-unused-vars: \"off\" */\n\nclass EventTarget {\n addEventListener() {}\n removeEventListener() {}\n dispatchEvent(_event: Event) {\n return true;\n }\n}\n\n// @github/template-parts requires DocumentFragment to be available on globalThis for SSR\nif (typeof DocumentFragment === 'undefined') {\n class DocumentFragment extends EventTarget {}\n // @ts-ignore\n globalThis.DocumentFragment = DocumentFragment;\n}\n\nclass HTMLElement extends EventTarget {}\nclass HTMLVideoElement extends EventTarget {}\n\nconst customElements: CustomElementRegistry = {\n get(_name: string) {\n return undefined;\n },\n define(_name, _constructor, _options) {},\n getName(_constructor) {\n return null;\n },\n upgrade(_root) {},\n whenDefined(_name) {\n return Promise.resolve(HTMLElement as unknown as CustomElementConstructor);\n },\n};\n\nclass CustomEvent {\n #detail;\n get detail() {\n return this.#detail;\n }\n constructor(typeArg: string, eventInitDict: CustomEventInit = {}) {\n // super(typeArg, eventInitDict);\n this.#detail = eventInitDict?.detail;\n }\n initCustomEvent() {}\n}\n\nfunction createElement(_tagName: string, _options?: ElementCreationOptions): HTMLElement {\n return new HTMLElement();\n}\n\nconst globalThisShim = {\n document: {\n createElement,\n },\n DocumentFragment,\n customElements,\n CustomEvent,\n EventTarget,\n HTMLElement,\n HTMLVideoElement,\n};\n\n// const isServer = typeof window === 'undefined' || typeof globalThis.customElements === 'undefined';\n// const GlobalThis = isServer ? globalThisShim : globalThis;\n// const Document = isServer ? globalThisShim.document : globalThis.document;\n//\n// export { GlobalThis as globalThis, Document as document };\nconst isServer = typeof window === 'undefined' || typeof globalThis.customElements === 'undefined';\ntype GlobalThis = typeof globalThis;\nconst internalGlobalThis: GlobalThis = (isServer ? globalThisShim : globalThis) as GlobalThis;\nconst internalDocument: Document = (isServer ? globalThisShim.document : globalThis.document) as Document;\n\nexport { internalGlobalThis as globalThis, internalDocument as document };\n", "var Jr=Object.create;var lt=Object.defineProperty;var Qr=Object.getOwnPropertyDescriptor;var zr=Object.getOwnPropertyNames;var Kr=Object.getPrototypeOf,Yr=Object.prototype.hasOwnProperty;var ct=function(r,e){return function(){return r&&(e=r(r=0)),e}};var H=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var Xr=function(r,e,t,i){if(e&&typeof e==\"object\"||typeof e==\"function\")for(var a=zr(e),n=0,o=a.length,s;n<o;n++)s=a[n],!Yr.call(r,s)&&s!==t&&lt(r,s,{get:function(l){return e[l]}.bind(null,s),enumerable:!(i=Qr(e,s))||i.enumerable});return r};var W=function(r,e,t){return t=r!=null?Jr(Kr(r)):{},Xr(e||!r||!r.__esModule?lt(t,\"default\",{value:r,enumerable:!0}):t,r)};var G=H(function(Ui,vt){var ke;typeof window!=\"undefined\"?ke=window:typeof global!=\"undefined\"?ke=global:typeof self!=\"undefined\"?ke=self:ke={};vt.exports=ke});function B(r,e){return e!=null&&typeof Symbol!=\"undefined\"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](r):B(r,e)}var ee=ct(function(){ee()});function le(r){\"@swc/helpers - typeof\";return r&&typeof Symbol!=\"undefined\"&&r.constructor===Symbol?\"symbol\":typeof r}var Pe=ct(function(){});var ze=H(function(pu,fr){var _r=Array.prototype.slice;fr.exports=Wa;function Wa(r,e){for((\"length\"in r)||(r=[r]),r=_r.call(r);r.length;){var t=r.shift(),i=e(t);if(i)return i;t.childNodes&&t.childNodes.length&&(r=_r.call(t.childNodes).concat(r))}}});var vr=H(function(mu,pr){ee();pr.exports=ve;function ve(r,e){if(!B(this,ve))return new ve(r,e);this.data=r,this.nodeValue=r,this.length=r.length,this.ownerDocument=e||null}ve.prototype.nodeType=8;ve.prototype.nodeName=\"#comment\";ve.prototype.toString=function(){return\"[object Comment]\"}});var hr=H(function(yu,mr){ee();mr.exports=ae;function ae(r,e){if(!B(this,ae))return new ae(r);this.data=r||\"\",this.length=this.data.length,this.ownerDocument=e||null}ae.prototype.type=\"DOMTextNode\";ae.prototype.nodeType=3;ae.prototype.nodeName=\"#text\";ae.prototype.toString=function(){return this.data};ae.prototype.replaceData=function(e,t,i){var a=this.data,n=a.substring(0,e),o=a.substring(e+t,a.length);this.data=n+i+o,this.length=this.data.length}});var Ke=H(function(gu,yr){yr.exports=Ga;function Ga(r){var e=this,t=r.type;r.target||(r.target=e),e.listeners||(e.listeners={});var i=e.listeners[t];if(i)return i.forEach(function(a){r.currentTarget=e,typeof a==\"function\"?a(r):a.handleEvent(r)});e.parentNode&&e.parentNode.dispatchEvent(r)}});var Ye=H(function(bu,gr){gr.exports=Ja;function Ja(r,e){var t=this;t.listeners||(t.listeners={}),t.listeners[r]||(t.listeners[r]=[]),t.listeners[r].indexOf(e)===-1&&t.listeners[r].push(e)}});var Xe=H(function(Tu,br){br.exports=Qa;function Qa(r,e){var t=this;if(Line truncated
"mappings": "gpBAEA,IAAMA,GAAN,KAAkB,CAChB,kBAAmB,CAAC,CACpB,qBAAsB,CAAC,CACvB,cAAcC,EAAe,CAC3B,MAAO,EACT,CACF,EAGA,GAAI,OAAO,kBAAqB,YAAa,CAC3C,MAAMC,UAAyBF,EAAY,CAAC,CAE5C,WAAW,iBAAmBE,CAChC,CAEA,IAAMC,GAAN,cAA0BH,EAAY,CAAC,EACjCI,GAAN,cAA+BJ,EAAY,CAAC,EAEtCK,GAAwC,CAC5C,IAAIC,EAAe,CAEnB,EACA,OAAOA,EAAOC,EAAcC,EAAU,CAAC,EACvC,QAAQD,EAAc,CACpB,OAAO,IACT,EACA,QAAQE,EAAO,CAAC,EAChB,YAAYH,EAAO,CACjB,OAAO,QAAQ,QAAQH,EAAkD,CAC3E,CACF,EAhCAO,GAkCMC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AAQ,KAAK,MAAM,QAAQ,SAAS,OAAO,WAAW,OAAO,QAAQ,SAAS,QAAQ,KAAK,EAAE,SAASD,EAAG/C,EAAE,CAAC,OAAOA,EAAE,SAAS,CAAC,IAAK,GAAE,OAAOiD,EAAGjD,EAAE,IAAI,EAAE,IAAK,GAAE,MAAM,OAAOA,EAAE,KAAK,MAAM,QAAQ,OAAOkD,EAAGlD,CAAC,CAAC,CAAC,CAAC,SAASkD,EAAGlD,EAAE,CAAC,IAAIoB,EAAE,CAAC,EAAEC,EAAErB,EAAE,QAAQ,OAAOA,EAAE,eAAe,iCAAiCqB,EAAEA,EAAE,YAAY,GAAGD,EAAE,KAAK,IAAIC,EAAE8B,EAAGnD,CAAC,EAAEoD,EAAGpD,CAAC,CAAC,EAAEgD,Line truncated
"names": ["EventTarget", "_event", "DocumentFragment", "HTMLElement", "HTMLVideoElement", "customElements", "_name", "_constructor", "_options", "_root", "_detail", "CustomEvent", "typeArg", "eventInitDict", "__privateAdd", "__privateSet", "__privateGet", "createElement", "_tagName", "globalThisShim", "isServer", "internalGlobalThis", "internalDocument", "Jr", "lt", "Qr", "zr", "Kr", "Yr", "ct", "r", "H", "Xr", "a", "o", "s", "W", "G", "Ui", "vt", "ke", "B", "ee", "le", "Pe", "ze", "pu", "fr", "_r", "Wa", "e", "t", "i", "vr", "mu", "pr", "ve", "hr", "yu", "mr", "ae", "n", "Ke", "gu", "yr", "Ga", "Ye", "bu", "gr", "Ja", "Xe", "Tu", "br", "Qa", "kr", "Eu", "Er", "Tr", "za", "$e", "Ka", "Za", "$a", "Ya", "Xa", "wr", "ei", "et", "xu", "Dr", "Ze", "ti", "ri", "ai", "ii", "xr", "N", "Rr", "Su", "Sr", "tt", "z", "Ar", "Ru", "qr", "rt", "Ir", "Au", "Or", "ni", "oi", "si", "Re", "ui", "di", "li", "ci", "_i", "Ue", "F", "Pr", "Ou", "Nr", "fi", "Mr", "Iu", "Cr", "Lr", "pi", "qe", "_t", "ft", "pt", "Ee", "Ae", "M", "ge", "$", "Oe", "Z", "xe", "mt", "ht", "yt", "J", "K", "gt", "m", "g", "T", "w", "E", "x", "v", "_", "O", "Ie", "de", "bt", "$r", "q", "h", "D", "Tt", "L", "u", "Ne", "wt", "De", "Et", "kt", "xt", "U", "te", "Le", "Zr", "ce", "A", "oe", "ea", "_e", "ta", "Dt", "ra", "fe", "se", "aa", "Ce", "Me", "Se", "St", "p", "c", "d", "y", "b", "k", "S", "P", "C", "V", "ne", "I", "R", "X", "be", "Te", "Rt", "qt", "ia", "na", "oa", "At", "we", "Q", "Ve", "je", "We", "Vr", "jr", "Wr", "Gr", "Ot", "It", "sa", "l", "Nt", "He", "ua", "Pt", "da", "Lt", "la", "Ct", "ca", "Mt", "_a", "Ht", "Bt", "fa", "Ut", "pa", "Ft", "va", "Vt", "ma", "jt", "ha", "ya", "Wt", "Gt", "ga", "ba", "Jt", "Ge", "Ta", "Qt", "wa", "zt", "Be", "Je", "Kt", "Ea", "ka", "Yt", "Xt", "$t", "Zt", "Qe", "er", "tr", "rr", "ar", "xa", "Da", "nr", "Sa", "ir", "pe", "re", "Ra", "qa", "Aa", "Oa", "Y", "or", "Ia", "sr", "Na", "Pa", "La", "Ca", "Ma", "ur", "Ha", "dr", "Ba", "Ua", "lr", "Fa", "Va", "ja", "cr", "me", "at", "vi", "mi", "it", "nt", "ye", "he", "ot", "st", "ue", "Fe", "bi", "dt", "ut", "Ti", "Hr", "gi", "yi", "hi", "Br", "wi", "Ur", "Ei", "Fr", "ki", "xi", "Di", "j", "ie", "Si", "cd", "root", "URL_REGEX", "FIRST_SEGMENT_REGEX", "SLASH_DOT_REGEX", "SLASH_DOT_DOT_REGEX", "URLToolkit", "baseURL", "relativeURL", "opts", "basePartsForNormalise", "relativeParts", "baseParts", "pathParts", "builtParts", "baseURLPath", "newPath", "url", "parts", "path", "module", "isFiniteNumber", "Number", "isFinite", "value", "isSafeInteger", "Math", "abs", "MAX_SAFE_INTEGER", "Events", "ErrorTypes", "ErrorDetails", "noop", "fakeLogger", "trace", "debug", "log", "warn", "info", "error", "exportedLogger", "consolePrintFn", "type", "func", "self", "console", "bind", "exportLoggerFunctions", "debugConfig", "functions", "forEach", "enableLogs", "id", "logger", "DECIMAL_RESOLUTION_REGEX", "ATTR_LIST_REGEX", "AttrList", "constructor", "attrs", "parseAttrList", "_extends", "clientAttrs", "Object", "keys", "filter", "attr", "substring", "decimalInteger", "attrName", "intValue", "parseInt", "Infinity", "hexadecimalInteger", "stringValue", "slice", "length", "Uint8Array", "i", "hexadecimalIntegerAsNumber", "decimalFloatingPoint", "parseFloat", "optionalFloat", "defaultValue", "enumeratedString", "bool", "decimalResolution", "res", "exec", "width", "height", "input", "match", "quote", "lastIndex", "indexOf", "lastIndexOf", "name", "trim", "isDateRangeCueAttribute", "isSCTE35Attribute", "DateRange", "dateRangeAttr", "dateRangeWithSameId", "_startDate", "_endDate", "_badValueForSameId", "previousAttr", "key", "prototype", "hasOwnProperty", "call", "ID", "Date", "endDate", "_isFiniteNumber", "getTime", "class", "CLASS", "startDate", "duration", "_isFiniteNumber2", "plannedDuration", "endOnNext", "isValid", "_isFiniteNumber3", "LoadStats", "aborted", "loaded", "retry", "total", "chunkCount", "bwEstimate", "loading", "start", "first", "end", "parsing", "buffering", "ElementaryStreamTypes", "AUDIO", "VIDEO", "AUDIOVIDEO", "BaseSegment", "baseurl", "_byteRange", "_url", "relurl", "elementaryStreams", "setByteRange", "previous", "params", "split", "byteRangeEndOffset", "byteRange", "byteRangeStartOffset", "buildAbsoluteURL", "alwaysNormalize", "Fragment", "_decryptdata", "rawProgramDateTime", "programDateTime", "tagList", "sn", "levelkeys", "loader", "keyLoader", "level", "cc", "startPTS", "endPTS", "startDTS", "endDTS", "deltaPTS", "maxStartPTS", "minEndPTS", "stats", "data", "bitrateTest", "title", "initSegment", "endList", "gap", "urlId", "decryptdata", "NONE", "identity", "getDecryptData", "keyFormats", "endProgramDateTime", "encrypted", "_this$_decryptdata", "len", "setKeyFormat", "keyFormat", "abortRequests", "_this$loader", "_this$keyLoader", "abort", "setElementaryStreamInfo", "partial", "min", "max", "clearElementaryStreamInfo", "Part", "partAttrs", "frag", "index", "fragOffset", "independent", "fragment", "audio", "video", "audiovideo", "DEFAULT_TARGET_DURATION", "LevelDetails", "baLine truncated
}
+106
View File
@@ -0,0 +1,106 @@
var ud=Object.defineProperty;var dd=Object.getPrototypeOf;var hd=Reflect.get;var fd=(s,e,t)=>e in s?ud(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var te=(s,e,t)=>(fd(s,typeof e!="symbol"?e+"":e,t),t),Wr=(s,e,t)=>{if(!e.has(s))throw TypeError("Cannot "+t)};var S=(s,e,t)=>(Wr(s,e,"read from private field"),t?t.call(s):e.get(s)),F=(s,e,t)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,t)},G=(s,e,t,i)=>(Wr(s,e,"write to private field"),i?i.call(s,t):e.set(s,t),t);var ce=(s,e,t)=>(Wr(s,e,"access private method"),t),Ts=(s,e,t)=>hd(dd(s),t,e);var ai=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class s extends ai{}globalThis.DocumentFragment=s}var Pi=class extends ai{},Yr=class extends ai{},md={get(s){},define(s,e,t){},getName(s){return null},upgrade(s){},whenDefined(s){return Promise.resolve(Pi)}},Oi,jr=class{constructor(e,t={}){F(this,Oi,void 0);G(this,Oi,t==null?void 0:t.detail)}get detail(){return S(this,Oi)}initCustomEvent(){}};Oi=new WeakMap;function gd(s,e){return new Pi}var Io={document:{createElement:gd},DocumentFragment,customElements:md,CustomEvent:jr,EventTarget:ai,HTMLElement:Pi,HTMLVideoElement:Yr},Do=typeof window=="undefined"||typeof globalThis.customElements=="undefined",xs=Do?Io:globalThis,oy=Do?Io.document:globalThis.document;var pd=Object.create,Fo=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,vd=Object.getOwnPropertyNames,Ed=Object.getPrototypeOf,Td=Object.prototype.hasOwnProperty,Uo=function(s,e){return function(){return s&&(e=s(s=0)),e}},Oe=function(s,e){return function(){return e||s((e={exports:{}}).exports,e),e.exports}},xd=function(s,e,t,i){if(e&&typeof e=="object"||typeof e=="function")for(var r=vd(e),n=0,a=r.length,o;n<a;n++)o=r[n],!Td.call(s,o)&&o!==t&&Fo(s,o,{get:function(l){return e[l]}.bind(null,o),enumerable:!(i=yd(e,o))||i.enumerable});return s},qe=function(s,e,t){return t=s!=null?pd(Ed(s)):{},xd(e||!s||!s.__esModule?Fo(t,"default",{value:s,enumerable:!0}):t,s)},Je=Oe(function(s,e){var t;typeof window!="undefined"?t=window:typeof global!="undefined"?t=global:typeof self!="undefined"?t=self:t={},e.exports=t});function Kt(s,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](s):Kt(s,e)}var Ht=Uo(function(){Ht()});function an(s){"@swc/helpers - typeof";return s&&typeof Symbol!="undefined"&&s.constructor===Symbol?"symbol":typeof s}var on=Uo(function(){}),Bo=Oe(function(s,e){var t=Array.prototype.slice;e.exports=i;function i(r,n){for(("length"in r)||(r=[r]),r=t.call(r);r.length;){var a=r.shift(),o=n(a);if(o)return o;a.childNodes&&a.childNodes.length&&(r=t.call(a.childNodes).concat(r))}}}),_d=Oe(function(s,e){Ht(),e.exports=t;function t(i,r){if(!Kt(this,t))return new t(i,r);this.data=i,this.nodeValue=i,this.length=i.length,this.ownerDocument=r||null}t.prototype.nodeType=8,t.prototype.nodeName="#comment",t.prototype.toString=function(){return"[object Comment]"}}),Sd=Oe(function(s,e){Ht(),e.exports=t;function t(i,r){if(!Kt(this,t))return new t(i);this.data=i||"",this.length=this.data.length,this.ownerDocument=r||null}t.prototype.type="DOMTextNode",t.prototype.nodeType=3,t.prototype.nodeName="#text",t.prototype.toString=function(){return this.data},t.prototype.replaceData=function(i,r,n){var a=this.data,o=a.substring(0,i),l=a.substring(i+r,a.length);this.data=o+n+l,this.length=this.data.length}}),$o=Oe(function(s,e){e.exports=t;function t(i){var r=this,n=i.type;i.target||(i.target=r),r.listeners||(r.listeners={});var a=r.listeners[n];if(a)return a.forEach(function(o){i.currentTarget=r,typeof o=="function"?o(i):o.handleEvent(i)});r.parentNode&&r.parentNode.dispatchEvent(i)}}),Go=Oe(function(s,e){e.exports=t;function t(i,r){var n=this;n.listeners||(n.listeners={}),n.listeners[i]||(n.listeners[i]=[]),n.listeners[i].indexOf(r)===-1&&n.listeners[i].push(r)}}),Ko=Oe(function(s,e){e.exports=t;function t(i,r){var n=this;if(n.listeners&&n.listeners[i]){var a=n.listeners[i],o=a.indexOf(r);o!==-1&&a.splice(o,1)}}}),bd=Oe(function(s,e){on(),e.exports=i;var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function i(h){switch(h.nodeType){case 3:return u(h.data);case 8:return"<!--"+h.data+"-->";default:return r(h)}}function r(h){var f=[],m=h.tagName;return h.namespaceURI==="http://www.w3.org/1999/xhtml"&&(m=m.toLowerCase()),f.push("<"+m+c(h)+o(h)),t.indexOf(m)>-1?f.push(" />"):(f.push(">"),h.childNodes.length?f.push.apply(f,h.childNodes.map(i)):h.textContent||h.innerText?f.push(u(h.textContent||h.innerText)):h.innerHTML&&f.push(h.innerHTML),f.push("</"+m+">")),f.join("")}function n(h,f){var m=an(h[f]);return f==="style"&&Object.keys(h.style).length>0?!0:h.hasOwnProperty(f)&&(m==="string"||m==="boolean"||m==="number")&&f!=="nodeName"&&f!=="className"&&f!=="tagName"&&f!=="textContent"&&f!=="innerText"&&f!=="namespaceURLine truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function en(s,e){(e==null||e>s.length)&&(e=s.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=s[t];return i}function Vo(s,e){if(s){if(typeof s=="string")return en(s,e);var t=Object.prototype.toString.call(s).slice(8,-1);if(t==="Object"&&s.constructor&&(t=s.constructor.name),t==="Map"||t==="Set")return Array.from(t);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return en(s,e)}}function at(s,e){return kd(s)||wd(s,e)||Vo(s,e)||Cd()}var Fi=qe(Je()),Bi=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){var e=Math.random()*16|0,t=s==="x"?e:e&3|8;return t.toString(16)})},qo=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)},Bt=function(s){if(s&&typeof s.nodeName!="undefined")return s.muxId||(s.muxId=qo()),s.muxId;var e;try{e=document.querySelector(s)}catch{}return e&&!e.muxId&&(e.muxId=s),(e==null?void 0:e.muxId)||s},tn=function(s){var e;s&&typeof s.nodeName!="undefined"?(e=s,s=Bt(e)):e=document.querySelector(s);var t=e&&e.nodeName?e.nodeName.toLowerCase():"";return[e,s,t]};function Pd(s){if(Array.isArray(s))return en(s)}function Od(s){if(typeof Symbol!="undefined"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}function Md(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qe(s){return Pd(s)||Od(s)||Vo(s)||Md()}var $t={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},Nd=function(s){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,t,i,r,n,a,o=s?[console,s]:[console],l=(t=console.trace).bind.apply(t,Qe(o)),c=(i=console.info).bind.apply(i,Qe(o)),u=(r=console.debug).bind.apply(r,Qe(o)),d=(n=console.warn).bind.apply(n,Qe(o)),h=(a=console.error).bind.apply(a,Qe(o)),f=e;return{trace:function(){for(var m=arguments.length,g=new Array(m),p=0;p<m;p++)g[p]=arguments[p];if(!(f>$t.TRACE))return l.apply(void 0,Qe(g))},debug:function(){for(var m=arguments.length,g=new Array(m),p=0;p<m;p++)g[p]=arguments[p];if(!(f>$t.DEBUG))return u.apply(void 0,Qe(g))},info:function(){for(var m=arguments.length,g=new Array(m),p=0;p<m;p++)g[p]=arguments[p];if(!(f>$t.INFO))return c.apply(void 0,Qe(g))},warn:function(){for(var m=arguments.length,g=new Array(m),p=0;p<m;p++)g[p]=arguments[p];if(!(f>$t.WARN))return d.apply(void 0,Qe(g))},error:function(){for(var m=arguments.length,g=new Array(m),p=0;p<m;p++)g[p]=arguments[p];if(!(f>$t.ERROR))return h.apply(void 0,Qe(g))},get level(){return f},set level(m){m!==this.level&&(f=m!=null?m:e)}}},ge=Nd("[mux]"),zr=qe(Je());function sn(){var s=zr.default.doNotTrack||zr.default.navigator&&zr.default.navigator.doNotTrack;return s==="1"}var Fd=qe(Je()),Ud={now:function(){var s=Fd.default.performance,e=s&&s.timing,t=e&&e.navigationStart,i=typeof t=="number"&&typeof s.now=="function"?t+s.now():Date.now();return Math.round(i)}},Se=Ud;function Q(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}Ht();function Le(s,e){if(!Kt(s,e))throw new TypeError("Cannot call a class as a function")}function ko(s,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(s,i.key,i)}}function Ze(s,e,t){return e&&ko(s.prototype,e),t&&ko(s,t),s}function N(s,e,t){return e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function rn(s,e){return rn=Object.setPrototypeOf||function(t,i){return t.__proto__=i,t},rn(s,e)}function Bd(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(e&&e.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),e&&rn(s,e)}function Ss(s){return Ss=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ss(s)}function $d(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}on();function Gd(s,e){return e&&(an(e)==="object"||typeof e=="function")?e:Q(s)}function Kd(s){var e=$d();return function(){var t=Ss(s),i;if(e){var r=Ss(this).constructor;i=Reflect.construct(t,arguments,r)}else i=t.apply(this,arguments);return Gd(this,i)}}var Ve=function(s){return $i(s)[0]},$i=function(s){if(typeof s!="string"||s==="")return["localhost"];var e=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,t=s.match(e)||[],i=t[4],r;return i&&(r=(i.match(/[^\.]+\.[^\.]+$/)||[])[0]),[i,r]},Xr=qe(Je()),Hd={exists:function(){var s=Xr.default.performance,e=s&&s.timing;return e!==void 0},domContentLoadedEventEnd:function(){var s=Xr.default.performance,e=s&&s.timing;return e&&e.domContentLoadedEventEnd},navigationStart:function(){var s=Xr.default.performance,e=s&&s.timing;return e&&e.navigationStart}},bs=Hd;function Ee(s,e,t){t=t===void 0?1:t,s[e]=s[e]||0,s[e]+=t}function As(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.forEach(function(r){N(s,r,t[r])})}return s}function Vd(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(s,r).enumerable})),t.push.apply(t,i)}return t}function ln(s,e){return e=e!=null?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(e)):Vd(Object(e)).forEach(function(t){Object.defineProperty(s,t,Object.getOwnPropertyDescriptor(e,t))}),s}var qd=["x-cdn","content-type"],Wo=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],Wd=qd.concat(Wo);function cn(s){s=s||"";var e={},t=s.trim().split(/[\r\n]+/);return t.forEach(function(i){if(i){var r=i.split(": "),n=r.shift();n&&(Wd.indexOf(n.toLowerCase())>=0||n.toLowerCase().indexOf("x-litix-")===0)&&(e[n]=r.join(": "))}}),e}function Rs(s){if(s){var e=Wo.find(function(t){return s[t]!==void 0});return e?s[e]:void 0}}var Yd=function(s){var e={};for(var t i Line truncated
`):"")+"".concat(_&&(_.code||_.text)?"response: ".concat(_.code,", ").concat(_.text,`
`):"")+"".concat(E.reason?"failure reason: ".concat(E.reason,`
`):"")+"".concat(E.level?"level: ".concat(E.level,`
`):"")+"".concat(E.parent?"parent stream controller: ".concat(E.parent,`
`):"")+"".concat(E.buffer?"buffer length: ".concat(E.buffer,`
`):"")+"".concat(E.error?"error: ".concat(E.error,`
`):"")+"".concat(E.event?"event: ".concat(E.event,`
`):"")+"".concat(E.err?"error message: ".concat((w=E.err)===null||w===void 0?void 0:w.message,`
`):"");l("error",{player_error_code:T,player_error_message:x,player_error_context:P})}};t.on(r.Events.ERROR,m);var g=function(v,E){var T=E.frag,x=T&&T._url||"";l("requestcanceled",{request_event_type:v,request_url:x,request_type:"media",request_hostname:Ve(x)})};t.on(r.Events.FRAG_LOAD_EMERGENCY_ABORTED,g);var p=function(v,E){var T=E.level,x=t.levels[T];if(x&&x.attrs&&x.attrs.BANDWIDTH){var _=x.attrs.BANDWIDTH,I,b=parseFloat(x.attrs["FRAME-RATE"]);isNaN(b)||(I=b),_?l("renditionchange",{video_source_fps:I,video_source_bitrate:_,video_source_width:x.width,video_source_height:x.height,video_source_rendition_name:x.name,video_source_codec:x==null?void 0:x.videoCodec}):n.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};t.on(r.Events.LEVEL_SWITCHED,p),t._stopMuxMonitor=function(){t.off(r.Events.MANIFEST_LOADED,c),t.off(r.Events.LEVEL_LOADED,u),t.off(r.Events.AUDIO_TRACK_LOADED,d),t.off(r.Events.FRAG_LOADED,h),t.off(r.Events.FRAG_CHANGED,f),t.off(r.Events.ERROR,m),t.off(r.Events.FRAG_LOAD_EMERGENCY_ABORTED,g),t.off(r.Events.LEVEL_SWITCHED,p),t.off(r.Events.DESTROYING,t._stopMuxMonitor),delete t._stopMuxMonitor},t.on(r.Events.DESTROYING,t._stopMuxMonitor)},zd=function(s){s&&typeof s._stopMuxMonitor=="function"&&s._stopMuxMonitor()},wo=function(s,e){if(!s||!s.requestEndDate)return{};var t=Ve(s.url),i=s.url,r=s.bytesLoaded,n=new Date(s.requestStartDate).getTime(),a=new Date(s.firstByteDate).getTime(),o=new Date(s.requestEndDate).getTime(),l=isNaN(s.duration)?0:s.duration,c=typeof e.getMetricsFor=="function"?e.getMetricsFor(s.mediaType).HttpList:e.getDashMetrics().getHttpRequests(s.mediaType),u;c.length>0&&(u=cn(c[c.length-1]._responseHeaders||""));var d=u?Rs(u):void 0;return{requestStart:n,requestResponseStart:a,requestResponseEnd:o,requestBytesLoaded:r,requestResponseHeaders:u,requestMediaDuration:l,requestHostname:t,requestUrl:i,requestId:d}},Xd=function(s,e){var t=e.getQualityFor(s),i=e.getCurrentTrackFor(s).bitrateList;return i?{currentLevel:t,renditionWidth:i[t].width||null,renditionHeight:i[t].height||null,renditionBitrate:i[t].bandwidth}:{}},Qd=function(s){var e;return(e=s.match(/.*codecs\*?="(.*)"/))===null||e===void 0?void 0:e[1]},Jd=function(s){try{var e,t,i=(t=s.getVersion)===null||t===void 0||(e=t.call(s))===null||e===void 0?void 0:e.split(".").map(function(r){return parseInt(r)})[0];return i}catch{return!1}},Zd=function(s,e,t){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},r=s.log;if(!t||!t.on){r.warn("Invalid dash.js player reference. Monitoring blocked.");return}var n=Jd(t),a=function(T,x){return s.emit(e,T,x)},o=function(T){var x=T.type,_=T.data,I=(_||{}).url;a("requestcompleted",{request_event_type:x,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:Ve(I),request_url:I})};t.on("manifestLoaded",o);var l={},c=function(T){if(typeof T.getRequests!="function")return null;var x=T.getRequests({state:"executed"});return x.length===0?null:x[x.length-1]},u=function(T){var x=T.type,_=T.fragmentModel,I=T.chunk,b=c(_);d({type:x,request:b,chunk:I})},d=function(T){var x=T.type,_=T.chunk,I=T.request,b=(_||{}).mediaInfo,R=b||{},k=R.type,L=R.bitrateList;L=L||[];var w={};L.forEach(function(ee,X){w[X]={},w[X].width=ee.width,w[X].height=ee.height,w[X].bitrate=ee.bandwidth,w[X].attrs={}}),k==="video"?l.video=w:k==="audio"?l.audio=w:l.media=w;var P=wo(I,t),O=P.requestStart,W=P.requestResponseStart,q=P.requestResponseEnd,$=P.requestResponseHeaders,Z=P.requestMediaDuration,ne=P.requestHostname,H=P.requestUrl,B=P.requestId;a("requestcompleted",{request_event_type:x,request_start:O,request_response_start:W,request_response_end:q,request_bytes_loaded:-1,request_type:k+"_init",request_response_headers:$,request_hostname:ne,request_id:B,request_url:H,request_media_duration:Z,request_rendition_lists:l})};n>=4?t.on("initFragmentLoaded",d):t.on("initFragmentLoaded",u);var h=function(T){var x=T.type,_=T.fragmentModel,I=T.chunk,b=c(_);f({type:x,request:b,chunk:I})},f=function(T){var x=T.type,_=T.chunk,I=T.request,b=_||{},R=b.mediaInfo,k=b.start,L=R||{},w=L.type,P=wo(I,t),O=P.requestStart,W=P.requestResponseStart,q=P.requestResponseEnd,$=P.requestBytesLoaded,Z=P.requestResponseHeaders,ne=P.requestMediaDuration,H=P.requestHostname,B=P.requestUrl,ee=P.requestId,X=Xd(w,t),ae=X.currentLevel,ye=X.renditionWidth,ve=X.renditionHeight,_e=X.renditionBitrate;a("requestcompleted",{request_event_type:x,request_start:O,request_response_start:W,request_response_end:q,request_bytes_loaded:$,request_type:w,request_response_headers:Z,request_hostname:H,request_id:ee,request_url:B,request_media_start_time:k,request_media_duration:ne,request_current_level:ae,request_labeled_bitrate:_e,request_video_width:ye,request_video_height:ve})};n>=4?t.on("mediaFragmentLoaded",f):t.on("mediaFragmentLoaded",h);var m={video:void 0,audio:void 0,totalBitrate:void 0},g=function(){if(m.video&&typeof m.video.bitrate=="number"){if(!(m.video.width&&m.video.height)){ Line truncated
`):"")+"".concat(R!=null&&R.status||R!=null&&R.statusText?"response: ".concat(R==null?void 0:R.status,", ").concat(R==null?void 0:R.statusText,`
`):"");a("error",{player_error_code:x==null?void 0:x.code,player_error_message:x==null?void 0:x.message,player_error_context:k})};t.on("error",E),t._stopMuxMonitor=function(){t.off("manifestLoaded",o),t.off("initFragmentLoaded",d),t.off("mediaFragmentLoaded",f),t.off("qualityChangeRendered",p),t.off("error",E),t.off("fragmentLoadingAbandoned",v),delete t._stopMuxMonitor}},eh=function(s){s&&typeof s._stopMuxMonitor=="function"&&s._stopMuxMonitor()},Co=0,th=function(){"use strict";function s(){Le(this,s),N(this,"_listeners",void 0)}return Ze(s,[{key:"on",value:function(e,t,i){return t._eventEmitterGuid=t._eventEmitterGuid||++Co,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],i&&(t=t.bind(i)),this._listeners[e].push(t),t}},{key:"off",value:function(e,t){var i=this._listeners&&this._listeners[e];i&&i.forEach(function(r,n){r._eventEmitterGuid===t._eventEmitterGuid&&i.splice(n,1)})}},{key:"one",value:function(e,t,i){var r=this;t._eventEmitterGuid=t._eventEmitterGuid||++Co;var n=function(){r.off(e,n),t.apply(i||this,arguments)};n._eventEmitterGuid=t._eventEmitterGuid,this.on(e,n)}},{key:"emit",value:function(e,t){var i=this;if(this._listeners){t=t||{};var r=this._listeners["before*"]||[],n=this._listeners[e]||[],a=this._listeners["after"+e]||[],o=function(l,c){l=l.slice(),l.forEach(function(u){u.call(i,{type:e},c)})};o(r,t),o(n,t),o(a,t)}}}]),s}(),ih=th,Qr=qe(Je()),sh=function(){"use strict";function s(e){var t=this;Le(this,s),N(this,"_playbackHeartbeatInterval",void 0),N(this,"_playheadShouldBeProgressing",void 0),N(this,"pm",void 0),this.pm=e,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,e.on("playing",function(){t._playheadShouldBeProgressing=!0}),e.on("play",this._startPlaybackHeartbeatInterval.bind(this)),e.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),e.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),e.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("seeked",function(){e.data.player_is_paused?t._stopPlaybackHeartbeatInterval():t._startPlaybackHeartbeatInterval()}),e.on("timeupdate",function(){t._playbackHeartbeatInterval!==null&&e.emit("playbackheartbeat")}),e.on("devicesleep",function(i,r){t._playbackHeartbeatInterval!==null&&(Qr.default.clearInterval(t._playbackHeartbeatInterval),e.emit("playbackheartbeatend",{viewer_time:r.viewer_time}),t._playbackHeartbeatInterval=null)})}return Ze(s,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;this._playbackHeartbeatInterval===null&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=Qr.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,this._playbackHeartbeatInterval!==null&&(Qr.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),s}(),rh=sh,nh=function s(e){"use strict";var t=this;Le(this,s),N(this,"viewErrored",void 0),e.on("viewinit",function(){t.viewErrored=!1}),e.on("error",function(i,r){try{var n=e.errorTranslator({player_error_code:r.player_error_code,player_error_message:r.player_error_message,player_error_context:r.player_error_context,player_error_severity:r.player_error_severity,player_error_business_exception:r.player_error_business_exception});n&&(e.data.player_error_code=n.player_error_code||r.player_error_code,e.data.player_error_message=n.player_error_message||r.player_error_message,e.data.player_error_context=n.player_error_context||r.player_error_context,e.data.player_error_severity=n.player_error_severity||r.player_error_severity,e.data.player_error_business_exception=n.player_error_business_exception||r.player_error_business_exception,t.viewErrored=!0)}catch(a){e.mux.log.warn("Exception in error translator callback.",a),t.viewErrored=!0}}),e.on("aftererror",function(){var i,r,n,a,o;(i=e.data)===null||i===void 0||delete i.player_error_code,(r=e.data)===null||r===void 0||delete r.player_error_message,(n=e.data)===null||n===void 0||delete n.player_error_context,(a=e.data)===null||a===void 0||delete a.player_error_severity,(o=e.data)=== Line truncated
`);e>-1;e=this.buffer.indexOf(`
`))this.processLine(this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)};Ls.prototype.processLine=function(s){var e=s.indexOf(":"),t=Ef(s,e),i=t[0],r=t.length===2?un(t[1]):void 0;if(i[0]!=="#")this.currentUri.uri=i,this.manifest.segments.push(this.currentUri),this.manifest.targetDuration&&!("duration"in this.currentUri)&&(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(i){case Ut.TARGET_DURATION:{if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break}case Ut.PART_INF:{Zr(this.manifest,t),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break}case Ut.SERVER_CONTROL:{Zr(this.manifest,t),this.setHoldBack();break}case Ut.INF:{r===0?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break}case Ut.PROGRAM_DATE_TIME:{var n=r,a=new Date(n);this.manifest.dateTimeString||(this.manifest.dateTimeString=n,this.manifest.dateTimeObject=a),this.currentUri.dateTimeString=n,this.currentUri.dateTimeObject=a;break}case Ut.VERSION:{Zr(this.manifest,t);break}case Ut.SESSION_DATA:{var o=Tf(t[1]),l=Yo(o);Object.assign(this.manifest.sessionData,l)}}};Ls.prototype.setHoldBack=function(){var s=this.manifest,e=s.serverControl,t=s.targetDuration,i=s.partTargetDuration;if(e){var r="holdBack",n="partHoldBack",a=t&&t*3,o=i&&i*2;t&&!e.hasOwnProperty(r)&&(e[r]=a),a&&e[r]<a&&(e[r]=a),i&&!e.hasOwnProperty(n)&&(e[n]=i*3),i&&e[n]<o&&(e[n]=o)}};var Zr=function(s,e){var t=il(e[0].replace("#EXT-X-","")),i;vf(e[1])?(i={},i=Object.assign(yf(e[1]),i)):i=un(e[1]),s[t]=i},il=function(s){return s.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},un=function(s){if(s.toLowerCase()==="yes"||s.toLowerCase()==="no")return s.toLowerCase()==="yes";var e=s.indexOf(":")!==-1?s:parseFloat(s);return isNaN(e)?s:e},pf=function(s){var e={},t=s.split("=");if(t.length>1){var i=il(t[0]);e[i]=un(t[1])}return e},yf=function(s){for(var e=s.split(","),t={},i=0;e.length>i;i++){var r=e[i],n=pf(r);t=Object.assign(n,t)}return t},vf=function(s){return s.indexOf("=")>-1},Ef=function(s,e){return e===-1?[s]:[s.substring(0,e),s.substring(e+1)]},Tf=function(s){var e={};if(s){var t=s.search(","),i=s.slice(0,t),r=s.slice(t+1),n=[i,r];return n.forEach(function(a,o){for(var l=a.replace(/['"]+/g,"").split("="),c=0;c<l.length;c++)l[c]==="DATA-ID"&&(e["DATA-ID"]=l[1-c]),l[c]==="VALUE"&&(e.VALUE=l[1-c])}),{data:e}}},xf=Ls,_f={safeCall:ff,safeIncrement:Ee,getComputedStyle:mf,secondsToMs:gf,assign:Object.assign,headersStringToObject:cn,cdnHeadersToRequestId:Rs,extractHostnameAndDomain:$i,extractHostname:Ve,manifestParser:xf,generateShortID:qo,generateUUID:Bi,now:Se.now},Sf=_f,bf={PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled"},Af=bf,Rf="mux-embed",Lf="5.3.1",If="2.1",Ge={},pt=function(s){var e=arguments;typeof s=="string"?pt.hasOwnProperty(s)?Fi.default.setTimeout(function(){e=Array.prototype.splice.call(e,1),pt[s].apply(null,e)},0):ge.warn("`"+s+"` is an unknown task"):typeof s=="function"?Fi.default.setTimeout(function(){s(pt)},0):ge.warn("`"+s+"` is invalid.")},Df={loaded:Se.now(),NAME:Rf,VERSION:Lf,API_VERSION:If,PLAYER_TRACKED:!1,monitor:function(s,e){return hf(pt,s,e)},destroyMonitor:function(s){var e=at(tn(s),1),t=e[0];t&&t.mux&&typeof t.mux.destroy=="function"?t.mux.destroy():ge.error("A video element monitor for `"+s+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(s,e){var t=Bt(s);Ge[t]?Ge[t].addHLSJS(e):ge.error("A monitor for `"+t+"` has not been initialized.")},addDashJS:function(s,e){var t=Bt(s);Ge[t]?Ge[t].addDashJS(e):ge.error("A monitor for `"+t+"` has not been initialized.")},removeHLSJS:function(s){var e=Bt(s);Ge[e]?Ge[e].removeHLSJS():ge.error("A monitor for `"+e+"` has not been initialized.")},removeDashJS:function(s){var e=Bt(s);Ge[e]?Ge[e].removeDashJS():ge.error("A monitor for `"+e+"` has not been initialized.")},init:function(s,e){sn()&&e&&e.respectDoNotTrack&&ge.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var t=Bt(s);Ge[t]=new lf(pt,t,e)},emit:function(s,e,t){var i=Bt(s);Ge[i]?(Ge[i].emit(e,t),e==="destroy"&&delete Ge[i]):ge.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:sn,log:ge,utils:Sf,events:Af,WINDOW_HIDDEN:!1,WINDO Line truncated
Time to underbuffer: ${g.toFixed(3)} s
Estimated load time for current fragment: ${R.toFixed(3)} s
Estimated load time for down switch fragment: ${L.toFixed(3)} s
TTFB estimate: ${p|0} ms
Current BW estimate: ${K(E)?E|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${w} @ ${P|0} bps`),r.trigger(y.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:i,stats:l})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(A.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){let e=this.hls.config;return new Vn(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){let{hls:e}=this;e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.FRAG_LOADING,this.onFragLoading,this),e.on(y.FRAG_LOADED,this.onFragLoaded,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this),e.on(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(y.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){let{hls:e}=this;e&&(e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.FRAG_LOADING,this.onFragLoading,this),e.off(y.FRAG_LOADED,this.onFragLoaded,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this),e.off(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(y.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(y.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){let i=t.frag;if(!this.ignoreFragment(i)){if(!i.bitrateTest){var r;this.fragCurrent=i,this.partCurrent=(r=t.part)!=null?r:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case D.BUFFER_ADD_CODEC_ERROR:case D.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case D.FRAG_LOAD_TIMEOUT:{let i=t.frag,{fragCurrent:r,partCurrent:n}=this;if(i&&r&&i.sn===r.sn&&i.level===r.level){let a=performance.now(),o=n?n.stats:i.stats,l=a-o.loading.start,c=o.loading.first?o.loading.first-o.loading.start:-1;if(o.loaded&&c>-1){let d=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(l-Math.min(d,c),o.loaded)}else this.bwEstimator.sampleTTFB(l)}break}}}getTimeToLoadFrag(e,t,i,r){let n=e+i/t,a=r?this.lastLevelLoadSec:0;return n+a}onLevelLoaded(e,t){let i=this.hls.config,{loading:r}=t.stats,n=r.end-r.start;K(n)&&(this.lastLevelLoadSec=n/1e3),t.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)}onFragLoaded(e,{frag:t,part:i}){let r=i?i.stats:t.stats;if(t.type===z.MAIN&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){let n=i?i.duration:t.duration,a=this.hls.levels[t.level],o=(a.loaded?a.loaded.bytes:0)+r.loaded,l=(a.loaded?a.loaded.duration:0)+n;a.loaded={bytes:o,duration:l},a.realBitrate=Math.round(8*o/l)}if(t.bitrateTest){let n={stats:r,frag:t,part:i,id:t.type};this.onFragBuffered(y.FRAG_BUFFERED,n),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){let{frag:i,part:r}=t,n=r!=null&&r.stats.loaded?r.stats:i.stats;if(n.aborted||this.ignoreFragment(i))return;let a=n.parsing.end-n.loading.start-Math.min(n.loading.first-n.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,n.loaded),n.bwEstimate=this.getBwEstimate(),i.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==z.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){let{maxAutoLevel:e,minAutoLevel:t}=this.hls,i=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,n=this.findBestLevel(i,t,e,0,r,1,1);if(n>-1)return n;let a=this.hls.firstLevel,o=Math.min(Math.max(a,t),e);return A.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${a} clamped to ${o}`),o}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){let e=this.forcedAutoLevel,i=this.bwEstimator.canEstimate(),r=this.lastLoadedFragLevel>-1;if(e!==-1&&(!i||!r||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;let n=i&&r?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){let a=this.hls.levels;if( Line truncated
discontinuity: ${v}
trackSwitch: ${E}
contiguous: ${I}
accurateTimeOffset: ${l}
timeOffset: ${m}
initSegmentChange: ${R}`);let L=new la(i,r,t,o,u);this.configureTransmuxer(L)}if(this.frag=n,this.part=a,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:g,chunkMeta:c,state:k},e instanceof ArrayBuffer?[e]:[]);else if(f){let L=f.push(e,g,c,k);Hs(L)?(f.async=!0,L.then(w=>{this.handleTransmuxComplete(w)}).catch(w=>{this.transmuxerError(w,c,"transmuxer-interface push error")})):(f.async=!1,this.handleTransmuxComplete(L))}}flush(e){e.transmuxing.start=self.performance.now();let{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let i=t.flush(e);Hs(i)||t.async?(Hs(i)||(i=Promise.resolve(i)),i.then(n=>{this.handleFlushResult(n,e)}).catch(n=>{this.transmuxerError(n,e,"transmuxer-interface flush error")})):this.handleFlushResult(i,e)}}transmuxerError(e,t,i){this.hls&&(this.error=e,this.hls.trigger(y.ERROR,{type:j.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,fatal:!1,error:e,err:e,reason:i}))}handleFlushResult(e,t){e.forEach(i=>{this.handleTransmuxComplete(i)}),this.onFlush(t)}onWorkerMessage(e){let t=e.data;if(!(t!=null&&t.event)){A.warn(`worker message received with no ${t?"event name":"data"}`);return}let i=this.hls;if(this.hls)switch(t.event){case"init":{var r;let n=(r=this.workerContext)==null?void 0:r.objectURL;n&&self.URL.revokeObjectURL(n);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}case"workerLog":A[t.data.logType]&&A[t.data.logType](t.data.message);break;default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,i.trigger(t.event,t.data);break}}}configureTransmuxer(e){let{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}};function Nc(s,e){if(s.length!==e.length)return!1;for(let t=0;t<s.length;t++)if(!vi(s[t].attrs,e[t].attrs))return!1;return!0}function vi(s,e,t){let i=s["STABLE-RENDITION-ID"];return i&&!t?i===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(r=>s[r]!==e[r])}function ua(s,e){return e.label.toLowerCase()===s.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(s.lang||"").toLowerCase())}var Ul=100,da=class extends Ji{constructor(e,t,i){super(e,t,i,"[audio-stream-controller]",z.AUDIO),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){let{hls:e}=this;e.on(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(y.ERROR,this.onError,this),e.on(y.BUFFER_RESET,this.onBufferReset,this),e.on(y.BUFFER_CREATED,this.onBufferCreated,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){let{hls:e}=this;e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(y.ERROR,this.onError,this),e.off(y.BUFFER_RESET,this.onBufferReset,this),e.off(y.BUFFER_CREATED,this.onBufferCreated,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:i,initPTS:r,timescale:n}){if(i==="main"){let a=t.cc;this.initPTS[t.cc]={baseTime:r,timescale:n},this.log(`InitPTS for cc: ${a} found from main: ${r}`),this.videoTrackCC=a,this.state===C.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels){this.startPosition=e,this.state=C.STOPPED;return}let t=this.lastCurrentTime;this.stopLoad(),this.setInterval(Ul),t>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=C.IDLE):(this.loadedmetadata=!1,this.state=C.WAITING_TRACK),this.nextLoadPosition=this.sta Line truncated
`)),i}getTextAndFormat(){return this.rows}},fr=class{constructor(e,t,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new qi(i),this.nonDisplayedMemory=new qi(i),this.lastOutputScreen=new qi(i),this.currRollUpRow=this.displayedMemory.rows[Ye-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[Ye-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let i=0;i<e.length;i++)this.writeScreen.insertChar(e[i]);let t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){let e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){let t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{let i=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[i]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){let t=this.logger.time;t!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=t:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}},mr=class{constructor(e,t,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Wg(),this.logger=void 0;let r=this.logger=new va;this.channels=[null,new fr(e,t,r),new fr(e+1,i,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let i=0;i<t.length;i+=2){let r=t[i]&127,n=t[i+1]&127,a=!1,o=null;if(r===0&&n===0)continue;this.logger.log(3,()=>"["+Vt([t[i],t[i+1]])+"] -> ("+Vt([r,n])+")");let l=this.cmdHistory;if(r>=16&&r<=31){if(qg(r,n,l)){Ms(null,null,l),this.logger.log(3,()=>"Repeated command ("+Vt([r,n])+") is dropped");continue}Ms(r,n,this.cmdHistory),a=this.parseCmd(r,n),a||(a=this.parseMidrow(r,n)),a||(a=this.parsePAC(r,n)),a||(a=this.parseBackgroundAttributes(r,n))}else Ms(null,null,l);if(!a&&(o=this.par Line truncated
`)}var ba=class{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new xa,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){let t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function i(){let n=t.buffer,a=0;for(n=$c(n);a<n.length&&n[a]!=="\r"&&n[a]!==`
`;)++a;let o=n.slice(0,a);return n[a]==="\r"&&++a,n[a]===`
`&&++a,t.buffer=n.slice(a),o}function r(n){Bc(n,function(a,o){},/:/)}try{let n="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;n=i();let o=n.match(/^()?WEBVTT([ \t].*)?$/);if(!(o!=null&&o[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let a=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case"HEADER":/:/.test(n)?r(n):n||(t.state="ID");continue;case"NOTE":n||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(n)){t.state="NOTE";break}if(!n)continue;if(t.cue=new ja(0,0,""),t.state="CUE",n.indexOf("-->")===-1){t.cue.id=n;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Yg(n,t.cue,t.regionList)}catch{t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{let o=n.indexOf("-->")!==-1;if(!n||o&&(a=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
`),t.cue.text+=n}continue;case"BADCUE":n||(t.state="ID")}}}catch{t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){let e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}},jg=/\r\n|\n\r|\n|\r/g,Sn=function(e,t,i=0){return e.slice(i,i+t.length)===t},zg=function(e){let t=parseInt(e.slice(-3)),i=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),n=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!K(t)||!K(i)||!K(r)||!K(n))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*i,t+=60*1e3*r,t+=60*60*1e3*n,t},bn=function(e){let t=5381,i=e.length;for(;i;)t=t*33^e.charCodeAt(--i);return(t>>>0).toString()};function za(s,e,t){return bn(s.toString())+bn(e.toString())+bn(t)}var Xg=function(e,t,i){let r=e[t],n=e[r.prevCC];if(!n||!n.new&&r.new){e.ccOffset=e.presentationOffset=r.start,r.new=!1;return}for(;(a=n)!=null&&a.new;){var a;e.ccOffset+=r.start-n.start,r.new=!1,r=n,n=e[r.prevCC]}e.presentationOffset=i};function Qg(s,e,t,i,r,n,a){let o=new ba,l=rt(new Uint8Array(s)).trim().replace(jg,`
`).split(`
`),c=[],u=e?kg(e.baseTime,e.timescale):0,d="00:00.000",h=0,f=0,m,g=!0;o.oncue=function(p){let v=t[i],E=t.ccOffset,T=(h-u)/9e4;if(v!=null&&v.new&&(f!==void 0?E=t.ccOffset=v.start:Xg(t,i,T)),T){if(!e){m=new Error("Missing initPTS for VTT MPEGTS");return}E=T-t.presentationOffset}let x=p.endTime-p.startTime,_=Ke((p.startTime+E-f)*9e4,r*9e4)/9e4;p.startTime=Math.max(_,0),p.endTime=Math.max(_+x,0);let I=p.text.trim();p.text=decodeURIComponent(encodeURIComponent(I)),p.id||(p.id=za(p.startTime,p.endTime,I)),p.endTime>0&&c.push(p)},o.onparsingerror=function(p){m=p},o.onflush=function(){if(m){a(m);return}n(c)},l.forEach(p=>{if(g)if(Sn(p,"X-TIMESTAMP-MAP=")){g=!1,p.slice(16).split(",").forEach(v=>{Sn(v,"LOCAL:")?d=v.slice(6):Sn(v,"MPEGTS:")&&(h=parseInt(v.slice(7)))});try{f=zg(d)/1e3}catch(v){m=v}return}else p===""&&(g=!1);o.parse(p+`
`)}),o.flush()}var An="stpp.ttml.im1t",Gc=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Kc=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Jg={left:"start",center:"center",right:"end",start:"start",end:"end"};function Kl(s,e,t,i){let r=J(new Uint8Array(s),["mdat"]);if(r.length===0){i(new Error("Could not parse IMSC1 mdat"));return}let n=r.map(o=>rt(o)),a=Dg(e.baseTime,1,e.timescale);try{n.forEach(o=>t(Zg(o,a)))}catch(o){i(o)}}function Zg(s,e){let r=new DOMParser().parseFromString(s,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");let n={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(n).reduce((d,h)=>(d[h]=r.getAttribute(`ttp:${h}`)||n[h],d),{}),o=r.getAttribute("xml:space")!=="preserve",l=Hl(Rn(r,"styling","style")),c=Hl(Rn(r,"layout","region")),u=Rn(r,"body","[begin]");return[].map.call(u,d=>{let h=Hc(d,o);if(!h||!d.hasAttribute("begin"))return null;let f=In(d.getAttribute("begin"),a),m=In(d.getAttribute("dur"),a),g=In(d.getAttribute("end"),a);if(f===null)throw Vl(d);if(g===null){if(m===null)throw Vl(d);g=f+m}let p=new ja(f-e,g-e,h);p.id=za(p.startTime,p.endTime,p.text);let v=c[d.getAttribute("region")],E=l[d.getAttribute("style")],T=ep(v,E,l),{textAlign:x}=T;if(x){let _=Jg[x];_&&(p.lineAlign=_),p.align=x}return Te(p,T),p}).filter(d=>d!==null)}function Rn(s,e,t){let i=s.getElementsByTagName(e)[0];return i?[].slice.call(i.querySelectorAll(t)):[]}function Hl(s){return s.reduce((e,t)=>{let i=t.getAttribute("xml:id");return i&&(e[i]=t),e},{})}function Hc(s,e){return[].slice.call(s.childNodes).reduce((t,i,r)=>{var n;return i.nodeName==="br"&&r?t+`
`:(n=i.childNodes)!=null&&n.length?Hc(i,e):e?t+i.textContent.trim().replace(/\s+/g," "):t+i.textContent},"")}function ep(s,e,t){let i="http://www.w3.org/ns/ttml#styling",r=null,n=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],a=s!=null&&s.hasAttribute("style")?s.getAttribute("style"):null;return a&&t.hasOwnProperty(a)&&(r=t[a]),n.reduce((o,l)=>{let c=Ln(e,i,l)||Ln(s,i,l)||Ln(r,i,l);return c&&(o[l]=c),o},{})}function Ln(s,e,t){return s&&s.hasAttributeNS(e,t)?s.getAttributeNS(e,t):null}function Vl(s){return new Error(`Could not parse ttml timestamp ${s}`)}function In(s,e){if(!s)return null;let t=Uc(s);return t===null&&(Gc.test(s)?t=tp(s,e):Kc.test(s)&&(t=ip(s,e))),t}function tp(s,e){let t=Gc.exec(s),i=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+i/e.frameRate}function ip(s,e){let t=Kc.exec(s),i=Number(t[1]);switch(t[2]){case"h":return i*3600;case"m":return i*60;case"ms":return i*1e3;case"f":return i/e.frameRate;case"t":return i/e.tickRate}return i}var Aa=class{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Wl(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(y.FRAG_LOADING,this.onFragLoading,this),e.on(y.FRAG_LOADED,this.onFragLoaded,this),e.on(y.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(y.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(y.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){let{hls:e}=this;e.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(y.FRAG_LOADING,this.onFragLoading,this),e.off(y.FRAG_LOADED,this.onFragLoaded,this),e.off(y.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(y.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(y.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){let e=new fi(this,"textTrack1"),t=new fi(this,"textTrack2"),i=new fi(this,"textTrack3"),r=new fi(this,"textTrack4");this.cea608Parser1=new mr(1,e,t),this.cea608Parser2=new mr(3,i,r)}}addCues(e,t,i,r,n){let a=!1;for(let o=n.length;o--;){let l=n[o],c=sp(l[0],l[1],t,i);if(c>=0&&(l[0]=Math.min(l[0],t),l[1]=Math.max(l[1],i),a=!0,c/(i-t)>.5))return}if(a||n.push([t,i]),this.config.renderTextTracksNatively){let o=this.captionsTracks[e];this.Cues.newCue(o,t,i,r)}else{let o=this.Cues.newCue(null,t,i,r);this.hls.trigger(y.CUES_PARSED,{type:"captions",cues:o,track:e})}}onInitPtsFound(e,{frag:t,id:i,initPTS:r,timescale:n}){let{unparsedVttFrags:a}=this;i==="main"&&(this.initPTS[t.cc]={baseTime:r,timescale:n}),a.length&&(this.unparsedVttFrags=[],a.forEach(o=>{this.onFragLoaded(y.FRAG_LOADED,o)}))}getExistingTrack(e,t){let{media:i}=this;if(i)for(let r=0;r<i.textTracks.length;r++){let n=i.textTracks[r];if(ql(n,{name:e,lang:t,attrs:{}}))return n}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;let{captionsProperties:t,captionsTracks:i,media:r}=this,{label:n,languageCode:a}=t[e],o=this.getExistingTrack(n,a);if(o)i[e]=o,hi(i[e]),hc(i[e],r);else{let l=this.createTextTrack("captions",n,a);l&&(l[e]=!0,i[e]=l)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;let t=this.captionsProperties[e];if(!t)return;let i=t.label,r={_id:e,label:i,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.med Line truncated
} (data length: ${t&&t.byteLength})`),r.update(t)}selectKeySystemFormat(e){let t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((t,i)=>{let r=dn(this.config),n=e.map(nl).filter(a=>!!a&&r.indexOf(a)!==-1);return this.getKeySystemSelectionPromise(n).then(({keySystem:a})=>{let o=ol(a);o?t(o):i(new Error(`Unable to find format for key-system "${a}"`))}).catch(i)})}loadKey(e){let t=e.keyInfo.decryptdata,i=this.getKeyIdString(t),r=`(keyId: ${i} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${r}`);let n=this.keyIdToKeySessionPromise[i];return n||(n=this.keyIdToKeySessionPromise[i]=this.getKeySystemForKeyPromise(t).then(({keySystem:a,mediaKeys:o})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${r}`),this.attemptSetMediaKeys(a,o).then(()=>{this.throwIfDestroyed();let l=this.createMediaKeySessionContext({keySystem:a,mediaKeys:o,decryptdata:t});return this.generateRequestWithPreferredKeySession(l,"cenc",t.pssh,"playlist-key")}))),n.catch(a=>this.handleError(a))),n}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof Ne?this.hls.trigger(y.ERROR,e.data):this.hls.trigger(y.ERROR,{type:j.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){let t=this.getKeyIdString(e),i=this.keyIdToKeySessionPromise[t];if(!i){let r=nl(e.keyFormat),n=r?[r]:dn(this.config);return this.attemptKeySystemAccess(n)}return i}getKeySystemSelectionPromise(e){if(e.length||(e=dn(this.config)),e.length===0)throw new Ne({type:j.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){let{initDataType:t,initData:i}=e,r=`"${e.type}" event: init data type: "${t}"`;if(this.debug(r),i===null)return;let n,a;if(t==="sinf"&&this.config.drmSystems[de.FAIRPLAY]){let d=be(new Uint8Array(i));try{let h=$a(JSON.parse(d).sinf),f=oc(new Uint8Array(h));if(!f)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");n=f.subarray(8,24),a=de.FAIRPLAY}catch(h){this.warn(`${r} Failed to parse sinf: ${h}`);return}}else{let d=ym(i),h=d.filter(f=>f.systemId===Ki.WIDEVINE)[0];if(!h){d.length===0||d.some(f=>!f.systemId)?this.warn(`${r} contains incomplete or invalid pssh data`):this.log(`ignoring ${r} for ${d.map(f=>al(f.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(a=al(h.systemId),h.version===0&&h.data){let f=h.data.length-22;n=h.data.subarray(f,f+16)}}if(!a||!n)return;let o=tt.hexDump(n),{keyIdToKeySessionPromise:l,mediaKeySessions:c}=this,u=l[o];for(let d=0;d<c.length;d++){let h=c[d],f=h.decryptdata;if(!f.keyId)continue;let m=tt.hexDump(f.keyId);if(o===m||f.uri.replace(/-/g,"").indexOf(o)!==-1){if(u=l[m],f.pssh)break;delete l[m],f.pssh=new Uint8Array(i),f.keyId=n,u=l[o]=u.then(()=>this.generateRequestWithPreferredKeySession(h,t,i,"encrypted-event-key-match"));break}}u||(u=l[o]=this.getKeySystemSelectionPromise([a]).then(({keySystem:d,mediaKeys:h})=>{var f;this.throwIfDestroyed();let m=new Yi("ISO-23001-7",o,(f=ol(d))!=null?f:"");return m.pssh=new Uint8Array(i),m.keyId=n,this.attemptSetMediaKeys(d,h).then(()=>{this.throwIfDestroyed();let g=this.createMediaKeySessionContext({decryptdata:m,keySystem:d,mediaKeys:h});return this.generateRequestWithPreferredKeySession(g,t,i,"encrypted-event-no-match")})})),u.catch(d=>this.handleError(d))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){let i=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);let r=Promise.all(i).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(r),r.then(()=>{this.log(`Media-keys set for "${e}"`),i.push(r),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(n=>i.indexOf(n)===-1)})}generateRequestWithPreferredKeySession(e,t,i,r){var n,a;let o=(n=this.config.drmSystems)==null||(a=n[e.keySystem])==null?void 0:a.generateRequest;if(o)try{let m=o.call(this.hls,t,i,e);if(!m)throw new Error("Invalid response from configured generateRequest filter");t=m.initDataType,i=e.decryptdata.pssh=m.initData?new Uint8Array(m.initData):null}catch(m){var l;if(this.warn(m.message),(l=this.hls)!=null&&l.config.debug)throw m}if(i===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);let c=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${r}": ${c} (init data type: ${t} length: ${i?i.byteLenLine truncated
`).find((i,r,n)=>r&&n[r-1].startsWith("#EXT-X-STREAM-INF"));return fetch(t).then(i=>i.status!==200?Promise.reject(i):i.text()).then(i=>i.split(`
`))}),R0=s=>{var e,t,i;let r=(t=((e=s.find(l=>l.startsWith("#EXT-X-PLAYLIST-TYPE")))!=null?e:"").split(":")[1])==null?void 0:t.trim(),n=cu(r),a=uu(r),o;if(n===Ue.LIVE){let l=s.find(c=>c.startsWith("#EXT-X-PART-INF"));if(l)o=+l.split(":")[1].split("=")[1]*2;else{let c=s.find(d=>d.startsWith("#EXT-X-TARGETDURATION")),u=(i=c==null?void 0:c.split(":"))==null?void 0:i[1];o=+(u!=null?u:6)*3}}return{streamType:n,targetLiveWindow:a,liveEdgeStartOffset:o}},L0=async(s,e)=>{if(e===_t.MP4)return{streamType:Ue.ON_DEMAND,targetLiveWindow:Number.NaN,liveEdgeStartOffset:void 0};if(e===_t.M3U8){let t=await A0(s);return R0(t)}return console.error(`Media type ${e} is an unrecognized or unsupported type for src ${s}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0}},I0=async(s,e,t=Rr({src:s}))=>{var i,r,n;let{streamType:a,targetLiveWindow:o,liveEdgeStartOffset:l}=await L0(s,t);((i=Ce.get(e))!=null?i:{}).liveEdgeStartOffset=l,((r=Ce.get(e))!=null?r:{}).targetLiveWindow=o,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((n=Ce.get(e))!=null?n:{}).streamType=a,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},D0=s=>{var e;let t=s.type,i=cu(t),r=uu(t),n,a=!!((e=s.partList)!=null&&e.length);return i===Ue.LIVE&&(n=a?s.partTarget*2:s.targetduration*3),{streamType:i,targetLiveWindow:r,liveEdgeStartOffset:n,lowLatency:a}},k0=(s,e,t)=>{var i,r,n,a,o,l,c,u;let{streamType:d,targetLiveWindow:h,liveEdgeStartOffset:f,lowLatency:m}=D0(s);if(d===Ue.LIVE){m?(t.config.backBufferLength=(i=t.userConfig.backBufferLength)!=null?i:4,t.config.maxFragLookUpTolerance=(r=t.userConfig.maxFragLookUpTolerance)!=null?r:.001,t.config.abrBandWidthUpFactor=(n=t.userConfig.abrBandWidthUpFactor)!=null?n:t.config.abrBandWidthFactor):t.config.backBufferLength=(a=t.userConfig.backBufferLength)!=null?a:8;let g=Object.freeze({get length(){return e.seekable.length},start(p){return e.seekable.start(p)},end(p){var v;return p>this.length||p<0||Number.isFinite(e.duration)?e.seekable.end(p):(v=t.liveSyncPosition)!=null?v:e.seekable.end(p)}});((o=Ce.get(e))!=null?o:{}).seekable=g}((l=Ce.get(e))!=null?l:{}).liveEdgeStartOffset=f,((c=Ce.get(e))!=null?c:{}).targetLiveWindow=h,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((u=Ce.get(e))!=null?u:{}).streamType=d,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},tu,iu,w0=(iu=(tu=globalThis==null?void 0:globalThis.navigator)==null?void 0:tu.userAgent)!=null?iu:"",su,ru,nu,C0=(nu=(ru=(su=globalThis==null?void 0:globalThis.navigator)==null?void 0:su.userAgentData)==null?void 0:ru.platform)!=null?nu:"",P0=w0.toLowerCase().includes("android")||["x11","android"].some(s=>C0.toLowerCase().includes(s)),Ce=new WeakMap,xt="mux.com",au,ou,Tu=(ou=(au=me).isSupported)==null?void 0:ou.call(au),O0=P0,xu=()=>Is.utils.now(),M0=Is.utils.generateUUID,_u=({playbackId:s,customDomain:e=xt,maxResolution:t,minResolution:i,renditionOrder:r,programStartTime:n,programEndTime:a,assetStartTime:o,assetEndTime:l,playbackToken:c,tokens:{playback:u=c}={},extraSourceParams:d={}}={})=>{if(!s)return;let[h,f=""]=Ar(s),m=new URL(`https://stream.${e}/${h}.m3u8${f}`);return u||m.searchParams.has("token")?(m.searchParams.forEach((g,p)=>{p!="token"&&m.searchParams.delete(p)}),u&&m.searchParams.set("token",u)):(t&&m.searchParams.set("max_resolution",t),i&&(m.searchParams.set("min_resolution",i),t&&+t.slice(0,-1)<+i.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",i,"maxResolution",t)),r&&m.searchParams.set("rendition_order",r),n&&m.searchParams.set("program_start_time",`${n}`),a&&m.searchParams.set("program_end_time",`${a}`),o&&m.searchParams.set("asset_start_time",`${o}`),l&&m.searchParams.set("asset_end_time",`${l}`),Object.entries(d).forEach(([g,p])=>{p!=null&&m.searchParams.set(g,p)})),m.toString()},Lr=s=>{if(!s)return;let[e]=s.split("?");return e||void 0},mo=s=>{if(!s||!s.startsWith("https://stream."))return;let[e]=new URL(s).pathname.slice(1).split(".m3u8");return e||void 0},N0=s=>{var e,t,i;return(e=s==null?void 0:s.metadata)!=null&&e.video_id?s.metadata.video_id:ku(s)&&(i=(t=Lr(s.playbackId))!=null?t:mo(s.src))!=null?i:s.src},go=s=>{var e;return(e=Ce.get(s))==null?void 0:e.error},br=s=>{var e,t;return(t=(e=Ce.get(s))==null?void 0:e.streamType)!=null?t:Ue.UNKNOWN},Su=s=>{var e,t;return(t=(e=Ce.get(s))==null?void 0:e.targetLiveWindow)!=null?t:Number.NaN},Ir=s=>{var e,t;return(t=(e=Ce.get(s))==null?void 0:e.seekable)!=null?t:s.seekable},bu=s=>{var e;let t=(e=Ce.get(s))==null?void 0:e.liveEdgeStartOffset;if(typeof t!="number")return Number.NaN;let i=Ir(s);return i.length?i.end(i.length-1)-t:Number.NaN},po=.034,F0=(s,e,t=po)=>Math.abs(s-e)<=t,Au=(s,e,t=po)=>s>e||F0(s,e,t),U0=(s,e=po)=>s.paused&&Au(s.currentTime,s.duration,e),Ru=(s,e)=>{var t,i,r;if(!e||!s.buffered.length)return;if(s.readyState>2)return!1;let n=e.currentLevel>=0?(i=(t=e.levels)==null?void 0:t[e.currentLevel])==null?vo Line truncated
`:""}${s.response&&(s.response.code||s.response.text)?`response: ${s.response.code}, ${s.response.text}
`:""}${s.reason?`failure reason: ${s.reason}
`:""}${s.level?`level: ${s.level}
`:""}${s.parent?`parent stream controller: ${s.parent}
`:""}${s.buffer?`buffer length: ${s.buffer}
`:""}${s.error?`error: ${s.error}
`:""}${s.event?`event: ${s.event}
`:""}${s.err?`error message: ${(r=s.err)==null?void 0:r.message}
`:""}`),l.data=s,l};var j0=()=>{try{return"0.22.0"}catch{}return"UNKNOWN"},z0=j0(),Pu=()=>z0;var To=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"];function X0(s){return`
<style>
:host {
display: inline-flex;
line-height: 0;
flex-direction: column;
justify-content: end;
}
audio {
width: 100%;
}
</style>
<slot name="media">
<audio${$u(s)}></audio>
</slot>
<slot></slot>
`}function Q0(s){return`
<style>
:host {
display: inline-block;
line-height: 0;
}
video {
max-width: 100%;
max-height: 100%;
min-width: 100%;
min-height: 100%;
object-fit: var(--media-object-fit, contain);
object-position: var(--media-object-position, 50% 50%);
}
video::-webkit-media-text-track-container {
transform: var(--media-webkit-text-track-transform);
transition: var(--media-webkit-text-track-transition);
}
</style>
<slot name="media">
<video${$u(s)}></video>
</slot>
<slot></slot>
`}var Nu=(s,{tag:e,is:t})=>{var n,a,o,l,c,Fu,d,h,f,m,Qt,p,Eo,E,Uu,x,Bu;let i=(a=(n=globalThis.document)==null?void 0:n.createElement)==null?void 0:a.call(n,e,{is:t}),r=i?J0(i):[];return o=class extends s{constructor(){super();F(this,m);F(this,p);F(this,E);F(this,x);F(this,d,void 0);F(this,h,void 0);F(this,f,new Map)}static get observedAttributes(){var k,L,w;return ce(k=o,c,Fu).call(k),[...(w=(L=i==null?void 0:i.constructor)==null?void 0:L.observedAttributes)!=null?w:[],"autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"]}get nativeEl(){var R,k,L;return ce(this,m,Qt).call(this),(L=(k=(R=S(this,h))!=null?R:this.shadowRoot.querySelector(e))!=null?k:this.querySelector(":scope > [slot=media]"))!=null?L:this.querySelector(e)}set nativeEl(R){G(this,h,R)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(R){this.toggleAttribute("muted",!!R)}get src(){return this.getAttribute("src")}set src(R){this.setAttribute("src",`${R}`)}get preload(){var R,k;return(k=this.getAttribute("preload"))!=null?k:(R=this.nativeEl)==null?void 0:R.preload}set preload(R){this.setAttribute("preload",`${R}`)}init(){var R,k;if(!this.shadowRoot){this.attachShadow({mode:"open"});let L=Z0(this.attributes);t&&(L.is=t),e&&(L.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(L)}this.nativeEl.muted=this.hasAttribute("muted");for(let L of r)ce(this,E,Uu).call(this,L);this.shadowRoot.addEventListener("slotchange",this),ce(this,p,Eo).call(this);for(let L of this.constructor.Events)(k=(R=this.shadowRoot).addEventListener)==null||k.call(R,L,this,!0)}handleEvent(R){if(R.type==="slotchange"){ce(this,p,Eo).call(this);return}R.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(R.type,{detail:R.detail}))}attributeChangedCallback(R,k,L){ce(this,m,Qt).call(this),ce(this,x,Bu).call(this,R,k,L)}connectedCallback(){ce(this,m,Qt).call(this)}},l=new WeakMap,c=new WeakSet,Fu=function(){if(S(this,l))return;G(this,l,!0);let R=new Set(this.observedAttributes);R.delete("muted");for(let k of r){if(k in this.prototype)continue;if(typeof i[k]=="function")this.prototype[k]=function(...w){return ce(this,m,Qt).call(this),this.call?this.call(k,...w):this.nativeEl[k].apply(this.nativeEl,w)};else{let w={get(){var O,W,q;ce(this,m,Qt).call(this);let P=k.toLowerCase();if(R.has(P)){let $=this.getAttribute(P);return $===null?!1:$===""?!0:$}return(q=(O=this.get)==null?void 0:O.call(this,k))!=null?q:(W=this.nativeEl)==null?void 0:W[k]}};k!==k.toUpperCase()&&(w.set=function(P){ce(this,m,Qt).call(this);let O=k.toLowerCase();if(R.has(O)){P===!0||P===!1||P==null?this.toggleAttribute(O,!!P):this.setAttribute(O,P);return}if(this.set){this.set(k,P);return}this.nativeEl[k]=P}),Object.defineProperty(this.prototype,k,w)}}},d=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakSet,Qt=function(){S(this,d)||(G(this,d,!0),this.init())},p=new WeakSet,Eo=function(){let R=new Map(S(this,f));this.shadowRoot.querySelector("slot:not([name])").assignedElements({flatten:!0}).filter(k=>["track","source"].includes(k.localName)).forEach(k=>{var w,P;R.delete(k);let L=S(this,f).get(k);L||(L=k.cloneNode(),S(this,f).set(k,L)),(P=(w=this.nativeEl).append)==null||P.call(w,L),L.localName==="track"&&L.default&&(L.kind==="chapters"||L.kind==="metadata")&&L.track.mode==="disabled"&&(L.track.mode="hidden")}),R.forEach(k=>k.remove())},E=new WeakSet,Uu=function(R){if(Object.prototype.hasOwnProperty.call(this,R)){let k=this[R];delete this[R],this[R]=k}},x=new WeakSet,Bu=function(R,k,L){var w,P,O,W,q,$;["id","class"].includes(R)||!o.observedAttributes.includes(R)&&this.constructor.observedAttributes.includes(R)||(L===null?(P=(w=this.nativeEl).removeAttribute)==null||P.call(w,R):((W=(O=this.nativeEl).getAttribute)==null?void 0:W.call(O,R))!=L&&(($=(q=this.nativeEl).setAttribute)==null||$.call(q,R,L)))},F(o,c),te(o,"getTemplateHTML",e.endsWith("audio")?X0:Q0),te(o,"shadowRootOptions",{mode:"open"}),te(o,"Events",To),F(o,l,void 0),o};function J0(s){let e=[];for(let t=Object.getPrototypeOf(s);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t))e.push(...Object.getOwnPropertyNames(t));return e}function $u(s){let e="";for(let t in s){let i=s[t];i===""?e+=` ${t}`:e+=` ${t}="${i}"`}return e}function Z0(s){let e={};for(let t of s)e[t.name]=t.value;return e}var Ou,Dr=Nu((Ou=globalThis.HTMLElement)!=null?Ou:class{},{tag:"video"}),Mu,_y=Nu((Mu=globalThis.HTMLElement)!=null?Mu:class{},{tag:"audio"});var dt=new WeakMap,Ei=class extends Error{},kr=class extends Error{};var Gu=globalThis.WeakRef?class extends Set{add(s){super.add(new WeakRef(s))}forEach(s){super.forEach(e=>{let t=e.deref();t&&s(t)})}}:Set;function Ku(s){var e,t,i;(t=(e=globalThis.chrome)==null?void 0:e.cast)!=null&&t.isAvailable?(i=globalThis.cast)!=null&&i.framework?s():customElements.whenDefined("google-cast-button").then(s):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast Line truncated
/*! Bundled license information:
mux-embed/dist/mux.mjs:
(*!
* JavaScript Cookie v2.1.3
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*)
*/
//# sourceMappingURL=mux-video.mjs.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/polyfills/index.ts", "../../../node_modules/mux-embed/dist/mux.mjs", "../../../node_modules/hls.js/dist/node_modules/url-toolkit/src/url-toolkit.js", "../../../node_modules/hls.js/dist/src/polyfills/number.ts", "../../../node_modules/hls.js/dist/src/events.ts", "../../../node_modules/hls.js/dist/src/errors.ts", "../../../node_modules/hls.js/dist/src/utils/logger.ts", "../../../node_modules/hls.js/dist/src/utils/attr-list.ts", "../../../node_modules/hls.js/dist/src/loader/date-range.ts", "../../../node_modules/hls.js/dist/src/loader/load-stats.ts", "../../../node_modules/hls.js/dist/src/loader/fragment.ts", "../../../node_modules/hls.js/dist/src/loader/level-details.ts", "../../../node_modules/hls.js/dist/src/utils/numeric-encoding-utils.ts", "../../../node_modules/hls.js/dist/src/utils/keysystem-util.ts", "../../../node_modules/hls.js/dist/src/utils/global.ts", "../../../node_modules/hls.js/dist/src/utils/mediakeys-helper.ts", "../../../node_modules/hls.js/dist/src/utils/typed-array.ts", "../../../node_modules/hls.js/dist/src/demux/id3.ts", "../../../node_modules/hls.js/dist/src/utils/hex.ts", "../../../node_modules/hls.js/dist/src/utils/mp4-tools.ts", "../../../node_modules/hls.js/dist/src/loader/level-key.ts", "../../../node_modules/hls.js/dist/src/utils/variable-substitution.ts", "../../../node_modules/hls.js/dist/src/utils/mediasource-helper.ts", "../../../node_modules/hls.js/dist/src/utils/codecs.ts", "../../../node_modules/hls.js/dist/src/loader/m3u8-parser.ts", "../../../node_modules/hls.js/dist/src/types/loader.ts", "../../../node_modules/hls.js/dist/src/loader/playlist-loader.ts", "../../../node_modules/hls.js/dist/src/utils/texttrack-utils.ts", "../../../node_modules/hls.js/dist/src/types/demuxer.ts", "../../../node_modules/hls.js/dist/src/controller/id3-track-controller.ts", "../../../node_modules/hls.js/dist/src/controller/latency-controller.ts", "../../../node_modules/hls.js/dist/src/types/level.ts", "../../../node_modules/hls.js/dist/src/utils/level-helper.ts", "../../../node_modules/hls.js/dist/src/utils/error-helper.ts", "../../../node_modules/hls.js/dist/src/utils/binary-search.ts", "../../../node_modules/hls.js/dist/src/controller/fragment-finders.ts", "../../../node_modules/hls.js/dist/src/controller/error-controller.ts", "../../../node_modules/hls.js/dist/src/controller/base-playlist-controller.ts", "../../../node_modules/hls.js/dist/src/utils/ewma.ts", "../../../node_modules/hls.js/dist/src/utils/ewma-bandwidth-estimator.ts", "../../../node_modules/hls.js/dist/src/utils/mediacapabilities-helper.ts", "../../../node_modules/hls.js/dist/src/utils/hdr.ts", "../../../node_modules/hls.js/dist/src/utils/rendition-helper.ts", "../../../node_modules/hls.js/dist/src/controller/abr-controller.ts", "../../../node_modules/hls.js/dist/src/task-loop.ts", "../../../node_modules/hls.js/dist/src/controller/fragment-tracker.ts", "../../../node_modules/hls.js/dist/src/utils/buffer-helper.ts", "../../../node_modules/hls.js/dist/src/types/transmuxer.ts", "../../../node_modules/hls.js/dist/src/utils/discontinuities.ts", "../../../node_modules/hls.js/dist/src/loader/fragment-loader.ts", "../../../node_modules/hls.js/dist/src/crypt/aes-crypto.ts", "../../../node_modules/hls.js/dist/src/crypt/fast-aes-key.ts", "../../../node_modules/hls.js/dist/src/crypt/aes-decryptor.ts", "../../../node_modules/hls.js/dist/src/crypt/decrypter.ts", "../../../node_modules/hls.js/dist/src/utils/time-ranges.ts", "../../../node_modules/hls.js/dist/src/controller/base-stream-controller.ts", "../../../node_modules/hls.js/dist/src/demux/chunk-cache.ts", "../../../node_modules/hls.js/dist/src/demux/inject-worker.ts", "../../../node_modules/hls.js/dist/src/demux/dummy-demuxed-track.ts", "../../../node_modules/hls.js/dist/src/demux/audio/base-audio-demuxer.ts", "../../../node_modules/hls.js/dist/src/demux/audio/adts.ts", "../../../node_modules/hls.js/dist/src/demux/audio/mpegaudio.ts", "../../../node_modules/hls.js/dist/src/demux/audio/aacdemuxer.ts", "../../../node_modules/hls.js/dist/src/demux/mp4demuxer.ts", "../../../node_modules/hls.js/dist/src/demux/audio/dolby.ts", "../../../node_modules/hls.js/dist/src/demux/audio/ac3-demuxer.ts", "../../../node_modules/hls.js/dist/src/demux/video/base-video-parser.ts", "../../../node_modules/hls.js/dist/src/demux/video/exp-golomb.ts", "../../../node_modules/hls.js/dist/src/demux/video/avc-video-parser.ts", "../../../node_modules/hls.js/dist/src/demux/sample-aes.ts", "../../../node_modules/hls.js/dist/src/demux/tsdemuxer.ts", "../../../node_modules/hls.js/dist/src/demux/audio/mp3demuxer.ts", "../../../node_modules/hls.js/dist/src/remux/aac-helper.ts", "../../../node_modules/hls.js/dist/src/remux/mp4-generator.ts", "../../../node_modules/hls.js/dist/src/utils/timescale-conversion.ts", "../../../node_modules/hls.js/dist/src/remux/mp4-remuxer.ts", "../../../node_modules/hls.js/dist/src/remux/passthrough-remuxer.ts", "../../../node_modules/hls.js/dist/src/demux/transmuxer.ts", "Line truncated
"sourcesContent": ["/* eslint @typescript-eslint/no-empty-function: \"off\", @typescript-eslint/no-unused-vars: \"off\" */\n\nclass EventTarget {\n addEventListener() {}\n removeEventListener() {}\n dispatchEvent(_event: Event) {\n return true;\n }\n}\n\n// @github/template-parts requires DocumentFragment to be available on globalThis for SSR\nif (typeof DocumentFragment === 'undefined') {\n class DocumentFragment extends EventTarget {}\n // @ts-ignore\n globalThis.DocumentFragment = DocumentFragment;\n}\n\nclass HTMLElement extends EventTarget {}\nclass HTMLVideoElement extends EventTarget {}\n\nconst customElements: CustomElementRegistry = {\n get(_name: string) {\n return undefined;\n },\n define(_name, _constructor, _options) {},\n getName(_constructor) {\n return null;\n },\n upgrade(_root) {},\n whenDefined(_name) {\n return Promise.resolve(HTMLElement as unknown as CustomElementConstructor);\n },\n};\n\nclass CustomEvent {\n #detail;\n get detail() {\n return this.#detail;\n }\n constructor(typeArg: string, eventInitDict: CustomEventInit = {}) {\n // super(typeArg, eventInitDict);\n this.#detail = eventInitDict?.detail;\n }\n initCustomEvent() {}\n}\n\nfunction createElement(_tagName: string, _options?: ElementCreationOptions): HTMLElement {\n return new HTMLElement();\n}\n\nconst globalThisShim = {\n document: {\n createElement,\n },\n DocumentFragment,\n customElements,\n CustomEvent,\n EventTarget,\n HTMLElement,\n HTMLVideoElement,\n};\n\n// const isServer = typeof window === 'undefined' || typeof globalThis.customElements === 'undefined';\n// const GlobalThis = isServer ? globalThisShim : globalThis;\n// const Document = isServer ? globalThisShim.document : globalThis.document;\n//\n// export { GlobalThis as globalThis, Document as document };\nconst isServer = typeof window === 'undefined' || typeof globalThis.customElements === 'undefined';\ntype GlobalThis = typeof globalThis;\nconst internalGlobalThis: GlobalThis = (isServer ? globalThisShim : globalThis) as GlobalThis;\nconst internalDocument: Document = (isServer ? globalThisShim.document : globalThis.document) as Document;\n\nexport { internalGlobalThis as globalThis, internalDocument as document };\n", "var Jr=Object.create;var lt=Object.defineProperty;var Qr=Object.getOwnPropertyDescriptor;var zr=Object.getOwnPropertyNames;var Kr=Object.getPrototypeOf,Yr=Object.prototype.hasOwnProperty;var ct=function(r,e){return function(){return r&&(e=r(r=0)),e}};var H=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var Xr=function(r,e,t,i){if(e&&typeof e==\"object\"||typeof e==\"function\")for(var a=zr(e),n=0,o=a.length,s;n<o;n++)s=a[n],!Yr.call(r,s)&&s!==t&&lt(r,s,{get:function(l){return e[l]}.bind(null,s),enumerable:!(i=Qr(e,s))||i.enumerable});return r};var W=function(r,e,t){return t=r!=null?Jr(Kr(r)):{},Xr(e||!r||!r.__esModule?lt(t,\"default\",{value:r,enumerable:!0}):t,r)};var G=H(function(Ui,vt){var ke;typeof window!=\"undefined\"?ke=window:typeof global!=\"undefined\"?ke=global:typeof self!=\"undefined\"?ke=self:ke={};vt.exports=ke});function B(r,e){return e!=null&&typeof Symbol!=\"undefined\"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](r):B(r,e)}var ee=ct(function(){ee()});function le(r){\"@swc/helpers - typeof\";return r&&typeof Symbol!=\"undefined\"&&r.constructor===Symbol?\"symbol\":typeof r}var Pe=ct(function(){});var ze=H(function(pu,fr){var _r=Array.prototype.slice;fr.exports=Wa;function Wa(r,e){for((\"length\"in r)||(r=[r]),r=_r.call(r);r.length;){var t=r.shift(),i=e(t);if(i)return i;t.childNodes&&t.childNodes.length&&(r=_r.call(t.childNodes).concat(r))}}});var vr=H(function(mu,pr){ee();pr.exports=ve;function ve(r,e){if(!B(this,ve))return new ve(r,e);this.data=r,this.nodeValue=r,this.length=r.length,this.ownerDocument=e||null}ve.prototype.nodeType=8;ve.prototype.nodeName=\"#comment\";ve.prototype.toString=function(){return\"[object Comment]\"}});var hr=H(function(yu,mr){ee();mr.exports=ae;function ae(r,e){if(!B(this,ae))return new ae(r);this.data=r||\"\",this.length=this.data.length,this.ownerDocument=e||null}ae.prototype.type=\"DOMTextNode\";ae.prototype.nodeType=3;ae.prototype.nodeName=\"#text\";ae.prototype.toString=function(){return this.data};ae.prototype.replaceData=function(e,t,i){var a=this.data,n=a.substring(0,e),o=a.substring(e+t,a.length);this.data=n+i+o,this.length=this.data.length}});var Ke=H(function(gu,yr){yr.exports=Ga;function Ga(r){var e=this,t=r.type;r.target||(r.target=e),e.listeners||(e.listeners={});var i=e.listeners[t];if(i)return i.forEach(function(a){r.currentTarget=e,typeof a==\"function\"?a(r):a.handleEvent(r)});e.parentNode&&e.parentNode.dispatchEvent(r)}});var Ye=H(function(bu,gr){gr.exports=Ja;function Ja(r,e){var t=this;t.listeners||(t.listeners={}),t.listeners[r]||(t.listeners[r]=[]),t.listeners[r].indexOf(e)===-1&&t.listeners[r].push(e)}});var Xe=H(function(Tu,br){br.exports=Qa;function Qa(r,e){var t=this;if(Line truncated
"mappings": "6nBAEA,IAAMA,GAAN,KAAkB,CAChB,kBAAmB,CAAC,CACpB,qBAAsB,CAAC,CACvB,cAAcC,EAAe,CAC3B,MAAO,EACT,CACF,EAGA,GAAI,OAAO,kBAAqB,YAAa,CAC3C,MAAMC,UAAyBF,EAAY,CAAC,CAE5C,WAAW,iBAAmBE,CAChC,CAEA,IAAMC,GAAN,cAA0BH,EAAY,CAAC,EACjCI,GAAN,cAA+BJ,EAAY,CAAC,EAEtCK,GAAwC,CAC5C,IAAIC,EAAe,CAEnB,EACA,OAAOA,EAAOC,EAAcC,EAAU,CAAC,EACvC,QAAQD,EAAc,CACpB,OAAO,IACT,EACA,QAAQE,EAAO,CAAC,EAChB,YAAYH,EAAO,CACjB,OAAO,QAAQ,QAAQH,EAAkD,CAC3E,CACF,EAhCAO,GAkCMC,GAAN,KAAkB,CAKhB,YAAYC,EAAi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AO,WAAW,OAAO,QAAQ,SAAS,QAAQ,KAAK,EAAE,SAASD,EAAG/C,EAAE,CAAC,OAAOA,EAAE,SAAS,CAAC,IAAK,GAAE,OAAOiD,EAAGjD,EAAE,IAAI,EAAE,IAAK,GAAE,MAAM,OAAOA,EAAE,KAAK,MAAM,QAAQ,OAAOkD,EAAGlD,CAAC,CAAC,CAAC,CAAC,SAASkD,EAAGlD,EAAE,CAAC,IAAIoB,EAAE,CAAC,EAAEC,EAAErB,EAAE,QAAQ,OAAOA,EAAE,eAAe,iCAAiCqB,EAAEA,EAAE,YAAY,GAAGD,EAAE,KAAK,IAAIC,EAAE8B,EAAGnD,CAAC,EAAEoD,EAAGpD,CAAC,CAAC,EAAEgD,Line truncated
"names": ["EventTarget", "_event", "DocumentFragment", "HTMLElement", "HTMLVideoElement", "customElements", "_name", "_constructor", "_options", "_root", "_detail", "CustomEvent", "typeArg", "eventInitDict", "__privateAdd", "__privateSet", "__privateGet", "createElement", "_tagName", "globalThisShim", "isServer", "internalGlobalThis", "internalDocument", "Jr", "lt", "Qr", "zr", "Kr", "Yr", "ct", "r", "H", "Xr", "a", "o", "s", "W", "G", "Ui", "vt", "ke", "B", "ee", "le", "Pe", "ze", "pu", "fr", "_r", "Wa", "e", "t", "i", "vr", "mu", "pr", "ve", "hr", "yu", "mr", "ae", "n", "Ke", "gu", "yr", "Ga", "Ye", "bu", "gr", "Ja", "Xe", "Tu", "br", "Qa", "kr", "Eu", "Er", "Tr", "za", "$e", "Ka", "Za", "$a", "Ya", "Xa", "wr", "ei", "et", "xu", "Dr", "Ze", "ti", "ri", "ai", "ii", "xr", "N", "Rr", "Su", "Sr", "tt", "z", "Ar", "Ru", "qr", "rt", "Ir", "Au", "Or", "ni", "oi", "si", "Re", "ui", "di", "li", "ci", "_i", "Ue", "F", "Pr", "Ou", "Nr", "fi", "Mr", "Iu", "Cr", "Lr", "pi", "qe", "_t", "ft", "pt", "Ee", "Ae", "M", "ge", "$", "Oe", "Z", "xe", "mt", "ht", "yt", "J", "K", "gt", "m", "g", "T", "w", "E", "x", "v", "_", "O", "Ie", "de", "bt", "$r", "q", "h", "D", "Tt", "L", "u", "Ne", "wt", "De", "Et", "kt", "xt", "U", "te", "Le", "Zr", "ce", "A", "oe", "ea", "_e", "ta", "Dt", "ra", "fe", "se", "aa", "Ce", "Me", "Se", "St", "p", "c", "d", "y", "b", "k", "S", "P", "C", "V", "ne", "I", "R", "X", "be", "Te", "Rt", "qt", "ia", "na", "oa", "At", "we", "Q", "Ve", "je", "We", "Vr", "jr", "Wr", "Gr", "Ot", "It", "sa", "l", "Nt", "He", "ua", "Pt", "da", "Lt", "la", "Ct", "ca", "Mt", "_a", "Ht", "Bt", "fa", "Ut", "pa", "Ft", "va", "Vt", "ma", "jt", "ha", "ya", "Wt", "Gt", "ga", "ba", "Jt", "Ge", "Ta", "Qt", "wa", "zt", "Be", "Je", "Kt", "Ea", "ka", "Yt", "Xt", "$t", "Zt", "Qe", "er", "tr", "rr", "ar", "xa", "Da", "nr", "Sa", "ir", "pe", "re", "Ra", "qa", "Aa", "Oa", "Y", "or", "Ia", "sr", "Na", "Pa", "La", "Ca", "Ma", "ur", "Ha", "dr", "Ba", "Ua", "lr", "Fa", "Va", "ja", "cr", "me", "at", "vi", "mi", "it", "nt", "ye", "he", "ot", "st", "ue", "Fe", "bi", "dt", "ut", "Ti", "Hr", "gi", "yi", "hi", "Br", "wi", "Ur", "Ei", "Fr", "ki", "xi", "Di", "j", "ie", "Si", "cd", "root", "URL_REGEX", "FIRST_SEGMENT_REGEX", "SLASH_DOT_REGEX", "SLASH_DOT_DOT_REGEX", "URLToolkit", "baseURL", "relativeURL", "opts", "basePartsForNormalise", "relativeParts", "baseParts", "pathParts", "builtParts", "baseURLPath", "newPath", "url", "parts", "path", "module", "isFiniteNumber", "Number", "isFinite", "value", "isSafeInteger", "Math", "abs", "MAX_SAFE_INTEGER", "Events", "ErrorTypes", "ErrorDetails", "noop", "fakeLogger", "trace", "debug", "log", "warn", "info", "error", "exportedLogger", "consolePrintFn", "type", "func", "self", "console", "bind", "exportLoggerFunctions", "debugConfig", "functions", "forEach", "enableLogs", "id", "logger", "DECIMAL_RESOLUTION_REGEX", "ATTR_LIST_REGEX", "AttrList", "constructor", "attrs", "parseAttrList", "_extends", "clientAttrs", "Object", "keys", "filter", "attr", "substring", "decimalInteger", "attrName", "intValue", "parseInt", "Infinity", "hexadecimalInteger", "stringValue", "slice", "length", "Uint8Array", "i", "hexadecimalIntegerAsNumber", "decimalFloatingPoint", "parseFloat", "optionalFloat", "defaultValue", "enumeratedString", "bool", "decimalResolution", "res", "exec", "width", "height", "input", "match", "quote", "lastIndex", "indexOf", "lastIndexOf", "name", "trim", "isDateRangeCueAttribute", "isSCTE35Attribute", "DateRange", "dateRangeAttr", "dateRangeWithSameId", "_startDate", "_endDate", "_badValueForSameId", "previousAttr", "key", "prototype", "hasOwnProperty", "call", "ID", "Date", "endDate", "_isFiniteNumber", "getTime", "class", "CLASS", "startDate", "duration", "_isFiniteNumber2", "plannedDuration", "endOnNext", "isValid", "_isFiniteNumber3", "LoadStats", "aborted", "loaded", "retry", "total", "chunkCount", "bwEstimate", "loading", "start", "first", "end", "parsing", "buffering", "ElementaryStreamTypes", "AUDIO", "VIDEO", "AUDIOVIDEO", "BaseSegment", "baseurl", "_byteRange", "_url", "relurl", "elementaryStreams", "setByteRange", "previous", "params", "split", "byteRangeEndOffset", "byteRange", "byteRangeStartOffset", "buildAbsoluteURL", "alwaysNormalize", "Fragment", "_decryptdata", "rawProgramDateTime", "programDateTime", "tagList", "sn", "levelkeys", "loader", "keyLoader", "level", "cc", "startPTS", "endPTS", "startDTS", "endDTS", "deltaPTS", "maxStartPTS", "minEndPTS", "stats", "data", "bitrateTest", "title", "initSegment", "endList", "gap", "urlId", "decryptdata", "NONE", "identity", "getDecryptData", "keyFormats", "endProgramDateTime", "encrypted", "_this$_decryptdata", "len", "setKeyFormat", "keyFormat", "abortRequests", "_this$loader", "_this$keyLoader", "abort", "setElementaryStreamInfo", "partial", "min", "max", "clearElementaryStreamInfo", "Part", "partAttrs", "frag", "index", "fragOffset", "independent", "fragment", "audio", "video", "audiovideo", "DEFAULT_TARGET_DURATION", "LevelDetails", "baLine truncated
}
+1
View File
@@ -0,0 +1 @@
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/typescript/lib/lib.es2019.full.d.ts","../src/env.ts","../src/polyfills/index.ts","../../../node_modules/mux-embed/dist/types/mux-embed.d.ts","../../playback-core/dist/types/errors.d.ts","../../../node_modules/hls.js/dist/hls.js.d.ts","../../playback-core/dist/types/types.d.ts","../../playback-core/dist/types/hls.d.ts","../../playback-core/dist/types/text-tracks.d.ts","../../playback-core/dist/types/pdt.d.ts","../../playback-core/dist/types/util.d.ts","../../playback-core/dist/types/request-errors.d.ts","../../playback-core/dist/types/index.d.ts","../../../node_modules/custom-media-element/custom-media-element.d.ts","../../../node_modules/castable-video/castable-mixin.d.ts","../../../node_modules/media-tracks/dist/video-rendition.d.ts","../../../node_modules/media-tracks/dist/video-track.d.ts","../../../node_modules/media-tracks/dist/video-track-list.d.ts","../../../node_modules/media-tracks/dist/audio-rendition.d.ts","../../../node_modules/media-tracks/dist/audio-track.d.ts","../../../node_modules/media-tracks/dist/audio-track-list.d.ts","../../../node_modules/media-tracks/dist/video-rendition-list.d.ts","../../../node_modules/media-tracks/dist/audio-rendition-list.d.ts","../../../node_modules/media-tracks/dist/mixin.d.ts","../../../node_modules/media-tracks/dist/track-event.d.ts","../../../node_modules/media-tracks/dist/rendition-event.d.ts","../../../node_modules/media-tracks/dist/index.d.ts","../src/index.ts"],"fileIdsList":[[59,60],[60],[59],[56,57,58,59,60,61,62,63,64,65,66],[57,58,60,61,62,63],[56,59],[57,60],[56,57],[57],[56],[42,43,46,53,54,55,67],[46],[44,45,46,47,48,49,50,51,52],[47],[45,46,47],[47,48],[44,45,46]],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"9e8ca8ed051c2697578c023d9c29d6df689a083561feba5c14aedee895853999","affectsGlobalScope":true,"impliedFormat":1},{"version":"69e65d976bf166ce4a9e6f6c18f94d2424bf116e90837ace179610dbccad9b42","affectsGloLine truncated
+3
View File
@@ -0,0 +1,3 @@
export declare const isMaybeBrowser: () => boolean;
export declare const isMaybeServer: () => boolean;
export declare const getPlayerVersion: () => string;
+147
View File
@@ -0,0 +1,147 @@
import { MuxMediaProps, StreamTypes, PlaybackTypes, Metadata, MediaError, CmcdTypes } from '@mux/playback-core';
import { PlaybackEngine, Autoplay, ExtensionMimeTypeMap, ValueOf, MaxResolutionValue, MinResolutionValue, RenditionOrderValue, Chapter, CuePoint } from '@mux/playback-core';
import { CustomVideoElement, Events as VideoEvents } from 'custom-media-element';
import { HlsConfig } from 'hls.js';
export declare const Attributes: {
readonly BEACON_COLLECTION_DOMAIN: "beacon-collection-domain";
readonly CUSTOM_DOMAIN: "custom-domain";
readonly DEBUG: "debug";
readonly DISABLE_TRACKING: "disable-tracking";
readonly DISABLE_COOKIES: "disable-cookies";
readonly DRM_TOKEN: "drm-token";
readonly PLAYBACK_TOKEN: "playback-token";
readonly ENV_KEY: "env-key";
readonly MAX_RESOLUTION: "max-resolution";
readonly MIN_RESOLUTION: "min-resolution";
readonly RENDITION_ORDER: "rendition-order";
readonly PROGRAM_START_TIME: "program-start-time";
readonly PROGRAM_END_TIME: "program-end-time";
readonly ASSET_START_TIME: "asset-start-time";
readonly ASSET_END_TIME: "asset-end-time";
readonly METADATA_URL: "metadata-url";
readonly PLAYBACK_ID: "playback-id";
readonly PLAYER_SOFTWARE_NAME: "player-software-name";
readonly PLAYER_SOFTWARE_VERSION: "player-software-version";
readonly PREFER_CMCD: "prefer-cmcd";
readonly PREFER_PLAYBACK: "prefer-playback";
readonly START_TIME: "start-time";
readonly STREAM_TYPE: "stream-type";
readonly TARGET_LIVE_WINDOW: "target-live-window";
readonly LIVE_EDGE_OFFSET: "live-edge-offset";
readonly TYPE: "type";
};
declare class MuxVideoBaseElement extends CustomVideoElement implements Partial<MuxMediaProps> {
private "MuxVideoBaseElement.#private";
static readonly observedAttributes: string[];
constructor();
preferCmcd: ValueOf<CmcdTypes> | undefined;
readonly playerInitTime: number;
playerSoftwareName: string | undefined;
playerSoftwareVersion: string | undefined;
readonly _hls: PlaybackEngine | undefined;
readonly mux: Readonly<HTMLVideoElement['mux']> | undefined;
readonly error: globalThis.MediaError | null;
errorTranslator: ((errorEvent: any) => any) | undefined;
src: string;
type: ValueOf<ExtensionMimeTypeMap> | undefined;
/*@ts-ignore
@ts-ignore */
autoplay: Autoplay;
preload: "" | "none" | "metadata" | "auto";
debug: boolean;
disableTracking: boolean;
disableCookies: boolean;
startTime: number | undefined;
playbackId: string | undefined;
maxResolution: MaxResolutionValue | undefined;
minResolution: MinResolutionValue | undefined;
renditionOrder: RenditionOrderValue | undefined;
programStartTime: number | undefined;
programEndTime: number | undefined;
assetStartTime: number | undefined;
assetEndTime: number | undefined;
customDomain: string | undefined;
drmToken: string | undefined;
/*
* Get the playback token for signing the src URL.
* Set the playback token for signing the src URL.
*/
playbackToken: string | undefined;
tokens: {
drm?: string;
playback?: string;
thumbnail?: string;
storyboard?: string;
};
readonly ended: boolean;
envKey: string | undefined;
beaconCollectionDomain: string | undefined;
streamType: ValueOf<StreamTypes> | undefined;
targetLiveWindow: number | undefined;
readonly liveEdgeStart: number;
liveEdgeOffset: number | undefined;
readonly seekable: TimeRanges;
addCuePoints<T = any>(cuePoints: CuePoint<T>[]): Promise<TextTrack>;
readonly activeCuePoint: {
time: number;
value: any;
} | undefined;
readonly cuePoints: {
time: number;
value: any;
}[];
addChapters(chapters: Chapter[]): Promise<TextTrack>;
readonly activeChapter: {
startTime: number;
endTime: number;
value: string;
} | undefined;
readonly chapters: {
startTime: number;
endTime: number;
value: string;
}[];
getStartDate(): Date;
readonly currentPdt: Date;
preferPlayback: ValueOf<PlaybackTypes> | undefined;
metadata: Readonly<Metadata> | undefined;
_hlsConfig: Readonly<Partial<HlsConfig>> | undefined;
load(): void;
unload(): void;
attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string | null): void;
connectedCallback(): void;
disconnectedCallback(): void;
}
declare const MuxVideoElement_base: import("media-tracks").WithMediaTracks<typeof MuxVideoBaseElement>;
declare class MuxVideoElement extends MuxVideoElement_base {
private "MuxVideoElement.#private";
readonly muxCastCustomData: {
readonly mux: {
readonly playbackId: string | undefined;
readonly minResolution: MinResolutionValue | undefined;
readonly maxResolution: MaxResolutionValue | undefined;
readonly renditionOrder: "desc" | undefined;
readonly customDomain: string | undefined;
/** @TODO Add this.tokens to MuxVideoElement (CJP) */
readonly tokens: {
readonly drm: string | undefined;
};
readonly envKey: string | undefined;
readonly metadata: Readonly<Partial<import("mux-embed").Metadata>> | undefined;
readonly disableCookies: boolean;
readonly disableTracking: boolean;
readonly beaconCollectionDomain: string | undefined;
readonly startTime: number | undefined;
readonly preferCmcd: ValueOf<CmcdTypes> | undefined;
};
};
castCustomData: Record<string, any> | undefined;
}
type MuxVideoElementType = typeof MuxVideoElement;
declare global {
var MuxVideoElement: MuxVideoElementType;
}
export { PlaybackEngine, PlaybackEngine as Hls, ExtensionMimeTypeMap as MimeTypes, MediaError, VideoEvents };
export default MuxVideoElement;
@@ -0,0 +1,4 @@
type GlobalThis = typeof globalThis;
declare const internalGlobalThis: GlobalThis;
declare const internalDocument: Document;
export { internalGlobalThis as globalThis, internalDocument as document };
+3
View File
@@ -0,0 +1,3 @@
export declare const isMaybeBrowser: () => boolean;
export declare const isMaybeServer: () => boolean;
export declare const getPlayerVersion: () => string;
+185
View File
@@ -0,0 +1,185 @@
import { MuxMediaProps, StreamTypes, PlaybackTypes, Metadata, MediaError, CmcdTypes } from '@mux/playback-core';
import type { PlaybackEngine, Autoplay, ExtensionMimeTypeMap, ValueOf, MaxResolutionValue, MinResolutionValue, RenditionOrderValue, Chapter, CuePoint } from '@mux/playback-core';
import { CustomVideoElement, Events as VideoEvents } from 'custom-media-element';
import type { HlsConfig } from 'hls.js';
export declare const Attributes: {
readonly BEACON_COLLECTION_DOMAIN: "beacon-collection-domain";
readonly CUSTOM_DOMAIN: "custom-domain";
readonly DEBUG: "debug";
readonly DISABLE_TRACKING: "disable-tracking";
readonly DISABLE_COOKIES: "disable-cookies";
readonly DRM_TOKEN: "drm-token";
readonly PLAYBACK_TOKEN: "playback-token";
readonly ENV_KEY: "env-key";
readonly MAX_RESOLUTION: "max-resolution";
readonly MIN_RESOLUTION: "min-resolution";
readonly RENDITION_ORDER: "rendition-order";
readonly PROGRAM_START_TIME: "program-start-time";
readonly PROGRAM_END_TIME: "program-end-time";
readonly ASSET_START_TIME: "asset-start-time";
readonly ASSET_END_TIME: "asset-end-time";
readonly METADATA_URL: "metadata-url";
readonly PLAYBACK_ID: "playback-id";
readonly PLAYER_SOFTWARE_NAME: "player-software-name";
readonly PLAYER_SOFTWARE_VERSION: "player-software-version";
readonly PREFER_CMCD: "prefer-cmcd";
readonly PREFER_PLAYBACK: "prefer-playback";
readonly START_TIME: "start-time";
readonly STREAM_TYPE: "stream-type";
readonly TARGET_LIVE_WINDOW: "target-live-window";
readonly LIVE_EDGE_OFFSET: "live-edge-offset";
readonly TYPE: "type";
};
declare class MuxVideoBaseElement extends CustomVideoElement implements Partial<MuxMediaProps> {
#private;
static get observedAttributes(): string[];
constructor();
get preferCmcd(): ValueOf<CmcdTypes> | undefined;
set preferCmcd(value: ValueOf<CmcdTypes> | undefined);
get playerInitTime(): number;
get playerSoftwareName(): string | undefined;
set playerSoftwareName(value: string | undefined);
get playerSoftwareVersion(): string | undefined;
set playerSoftwareVersion(value: string | undefined);
get _hls(): PlaybackEngine | undefined;
get mux(): Readonly<HTMLVideoElement['mux']> | undefined;
get error(): globalThis.MediaError | null;
get errorTranslator(): ((errorEvent: any) => any) | undefined;
set errorTranslator(value: ((errorEvent: any) => any) | undefined);
get src(): string;
set src(val: string);
get type(): ValueOf<ExtensionMimeTypeMap> | undefined;
set type(val: ValueOf<ExtensionMimeTypeMap> | undefined);
/** @ts-ignore */
get autoplay(): Autoplay;
/** @ts-ignore */
set autoplay(val: Autoplay);
get preload(): "" | "none" | "metadata" | "auto";
set preload(val: "" | "none" | "metadata" | "auto");
get debug(): boolean;
set debug(val: boolean);
get disableTracking(): boolean;
set disableTracking(val: boolean);
get disableCookies(): boolean;
set disableCookies(val: boolean);
get startTime(): number | undefined;
set startTime(val: number | undefined);
get playbackId(): string | undefined;
set playbackId(val: string | undefined);
get maxResolution(): MaxResolutionValue | undefined;
set maxResolution(val: MaxResolutionValue | undefined);
get minResolution(): MinResolutionValue | undefined;
set minResolution(val: MinResolutionValue | undefined);
get renditionOrder(): RenditionOrderValue | undefined;
set renditionOrder(val: RenditionOrderValue | undefined);
get programStartTime(): number | undefined;
set programStartTime(val: number | undefined);
get programEndTime(): number | undefined;
set programEndTime(val: number | undefined);
get assetStartTime(): number | undefined;
set assetStartTime(val: number | undefined);
get assetEndTime(): number | undefined;
set assetEndTime(val: number | undefined);
get customDomain(): string | undefined;
set customDomain(val: string | undefined);
get drmToken(): string | undefined;
set drmToken(val: string | undefined);
/**
* Get the playback token for signing the src URL.
*/
get playbackToken(): string | undefined;
/**
* Set the playback token for signing the src URL.
*/
set playbackToken(val: string | undefined);
get tokens(): {
drm?: string;
playback?: string;
thumbnail?: string;
storyboard?: string;
};
set tokens(val: {
drm?: string;
playback?: string;
thumbnail?: string;
storyboard?: string;
});
get ended(): boolean;
get envKey(): string | undefined;
set envKey(val: string | undefined);
get beaconCollectionDomain(): string | undefined;
set beaconCollectionDomain(val: string | undefined);
get streamType(): ValueOf<StreamTypes> | undefined;
set streamType(val: ValueOf<StreamTypes> | undefined);
get targetLiveWindow(): number | undefined;
set targetLiveWindow(val: number | undefined);
get liveEdgeStart(): number;
get liveEdgeOffset(): number | undefined;
set liveEdgeOffset(val: number | undefined);
get seekable(): TimeRanges;
addCuePoints<T = any>(cuePoints: CuePoint<T>[]): Promise<TextTrack>;
get activeCuePoint(): {
time: number;
value: any;
} | undefined;
get cuePoints(): {
time: number;
value: any;
}[];
addChapters(chapters: Chapter[]): Promise<TextTrack>;
get activeChapter(): {
startTime: number;
endTime: number;
value: string;
} | undefined;
get chapters(): {
startTime: number;
endTime: number;
value: string;
}[];
getStartDate(): Date;
get currentPdt(): Date;
get preferPlayback(): ValueOf<PlaybackTypes> | undefined;
set preferPlayback(val: ValueOf<PlaybackTypes> | undefined);
get metadata(): Readonly<Metadata> | undefined;
set metadata(val: Readonly<Metadata> | undefined);
get _hlsConfig(): Readonly<Partial<HlsConfig>> | undefined;
set _hlsConfig(val: Readonly<Partial<HlsConfig>> | undefined);
load(): void;
unload(): void;
attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string | null): void;
connectedCallback(): void;
disconnectedCallback(): void;
}
declare const MuxVideoElement_base: import("media-tracks").WithMediaTracks<typeof MuxVideoBaseElement>;
declare class MuxVideoElement extends MuxVideoElement_base {
#private;
get muxCastCustomData(): {
readonly mux: {
readonly playbackId: string | undefined;
readonly minResolution: MinResolutionValue | undefined;
readonly maxResolution: MaxResolutionValue | undefined;
readonly renditionOrder: "desc" | undefined;
readonly customDomain: string | undefined;
/** @TODO Add this.tokens to MuxVideoElement (CJP) */
readonly tokens: {
readonly drm: string | undefined;
};
readonly envKey: string | undefined;
readonly metadata: Readonly<Partial<import("mux-embed").Metadata>> | undefined;
readonly disableCookies: boolean;
readonly disableTracking: boolean;
readonly beaconCollectionDomain: string | undefined;
readonly startTime: number | undefined;
readonly preferCmcd: ValueOf<CmcdTypes> | undefined;
};
};
get castCustomData(): Record<string, any> | undefined;
set castCustomData(val: Record<string, any> | undefined);
}
type MuxVideoElementType = typeof MuxVideoElement;
declare global {
var MuxVideoElement: MuxVideoElementType;
}
export { PlaybackEngine, PlaybackEngine as Hls, ExtensionMimeTypeMap as MimeTypes, MediaError, VideoEvents };
export default MuxVideoElement;
+4
View File
@@ -0,0 +1,4 @@
type GlobalThis = typeof globalThis;
declare const internalGlobalThis: GlobalThis;
declare const internalDocument: Document;
export { internalGlobalThis as globalThis, internalDocument as document };