Created
March 23, 2025 22:16
-
-
Save lluz/873f02f5ba2cdb2cc8b7b6841b165151 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! @license | |
* Shaka Player | |
* Copyright 2016 Google LLC | |
* SPDX-License-Identifier: Apache-2.0 | |
*/ | |
declare class GlobalError extends Error {} | |
//!! generated by clutz. | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka { | |
class Player extends shaka.util.FakeEventTarget implements shaka.util.IDestroyable { | |
private noStructuralTyping_shaka_Player : any; | |
constructor (mediaElement ? : HTMLMediaElement | null , videoContainer ? : HTMLElement | null , dependencyInjector ? : (a : shaka.Player | null ) => any ) ; | |
/** | |
* Adds the given chapters track to the loaded manifest. <code>load()</code> | |
* must resolve before calling. The presentation must have a duration. | |
* This returns the created track. | |
*/ | |
addChaptersTrack (uri : string , language : string , mimeType ? : string ) : Promise < shaka.extern.Track > ; | |
/** | |
* Load a new font on the page. If the font was already loaded, it does | |
* nothing. | |
*/ | |
addFont (name : string , url : string ) : any ; | |
/** | |
* Adds the given text track to the loaded manifest. <code>load()</code> must | |
* resolve before calling. The presentation must have a duration. | |
* This returns the created track, which can immediately be selected by the | |
* application. The track will not be automatically selected. | |
*/ | |
addTextTrackAsync (uri : string , language : string , kind : string , mimeType ? : string , codec ? : string , label ? : string , forced ? : boolean ) : Promise < shaka.extern.Track > ; | |
/** | |
* Adds the given thumbnails track to the loaded manifest. | |
* <code>load()</code> must resolve before calling. The presentation must | |
* have a duration. | |
* This returns the created track, which can immediately be used by the | |
* application. | |
*/ | |
addThumbnailsTrack (uri : string , mimeType ? : string ) : Promise < shaka.extern.Track > ; | |
/** | |
* Attaches the player to a media element. | |
* If the player was already attached to a media element, first detaches from | |
* that media element. | |
*/ | |
attach (mediaElement : HTMLMediaElement , initializeMediaSource ? : boolean ) : Promise < any > ; | |
/** | |
* Calling <code>attachCanvas</code> will tell the player to set canvas | |
* element for LCEVC decoding. | |
*/ | |
attachCanvas (canvas : HTMLCanvasElement | null ) : any ; | |
/** | |
* Cancel trick-play. If the player has not loaded content or is still loading | |
* content this will be a no-op. | |
*/ | |
cancelTrickPlay ( ) : any ; | |
/** | |
* Changes low latency configuration settings on the Player. | |
* @param config This object should follow the {@link shaka.extern.PlayerConfiguration} object. Not all fields need to be set; unset fields retain their old values. | |
*/ | |
configurationForLowLatency (config : object ) : any ; | |
/** | |
* Changes configuration settings on the Player. This checks the names of | |
* keys and the types of values to avoid coding errors. If there are errors, | |
* this logs them to the console and returns false. Correct fields are still | |
* applied even if there are other errors. You can pass an explicit | |
* <code>undefined</code> value to restore the default value. This has two | |
* modes of operation: | |
* <p> | |
* First, this can be passed a single "plain" object. This object should | |
* follow the {@link shaka.extern.PlayerConfiguration} object. Not all fields | |
* need to be set; unset fields retain their old values. | |
* <p> | |
* Second, this can be passed two arguments. The first is the name of the key | |
* to set. This should be a '.' separated path to the key. For example, | |
* <code>'streaming.alwaysStreamText'</code>. The second argument is the | |
* value to set. | |
* @param config This should either be a field name or an object. | |
* @param value In the second mode, this is the value to set. | |
*/ | |
configure (config : string | object , value ? : any ) : boolean ; | |
/** | |
* After destruction, a Player object cannot be used again. | |
*/ | |
destroy ( ) : Promise < any > ; | |
/** | |
* Calls |destroy| on each PreloadManager object this player has created. | |
*/ | |
destroyAllPreloads ( ) : any ; | |
/** | |
* Detach the player from the current media element. Leaves the player in a | |
* state where it cannot play media, until it has been attached to something | |
* else. | |
*/ | |
detach (keepAdManager ? : boolean ) : Promise < any > ; | |
/** | |
* Detach the player from the current media element, if any, and returns a | |
* PreloadManager that contains the loaded manifest of that asset, if any. | |
* Allows for the asset to be re-loaded by this player faster, in the future. | |
* When in src= mode, this detach but does not make a PreloadManager. | |
* Leaves the player in a state where it cannot play media, until it has been | |
* attached to something else. | |
*/ | |
detachAndSavePreload (keepAdManager ? : boolean , saveLivePosition ? : boolean ) : Promise < shaka.media.PreloadManager | null > ; | |
/** | |
* Get the drm info used to initialize EME. If EME is not being used, this | |
* will return <code>null</code>. If the player is idle or has not initialized | |
* EME yet, this will return <code>null</code>. | |
*/ | |
drmInfo ( ) : shaka.extern.DrmInfo | null ; | |
/** | |
* Returns the active sessions metadata | |
*/ | |
getActiveSessionsMetadata ( ) : shaka.extern.DrmSessionMetadata [] ; | |
/** | |
* Returns a shaka.ads.AdManager instance, responsible for Dynamic | |
* Ad Insertion functionality. | |
*/ | |
getAdManager ( ) : shaka.extern.IAdManager | null ; | |
/** | |
* Returns Thumbnail objects for each thumbnail for a given image track ID. | |
* If the player has not loaded content, this will return a null. | |
*/ | |
getAllThumbnails (trackId : number ) : Promise < shaka.extern.Thumbnail [] | null > ; | |
/** | |
* Get the uri to the asset that the player has loaded. If the player has not | |
* loaded content, this will return <code>null</code>. | |
*/ | |
getAssetUri ( ) : string | null ; | |
/** | |
* Return a list of audio languages available. If the player has not loaded | |
* any content, this will return an empty list. | |
*/ | |
getAudioLanguages ( ) : string [] ; | |
/** | |
* Return a list of audio language-role combinations available. If the | |
* player has not loaded any content, this will return an empty list. | |
*/ | |
getAudioLanguagesAndRoles ( ) : shaka.extern.LanguageRole [] ; | |
/** | |
* Returns the ratio of video length buffered compared to buffering Goal | |
*/ | |
getBufferFullness ( ) : number ; | |
/** | |
* Get information about what the player has buffered. If the player has not | |
* loaded content or is currently loading content, the buffered content will | |
* be empty. | |
*/ | |
getBufferedInfo ( ) : shaka.extern.BufferedInfo ; | |
/** | |
* This returns the list of chapters. | |
*/ | |
getChapters (language : string ) : shaka.extern.Chapter [] ; | |
/** | |
* Return a list of chapters tracks. | |
*/ | |
getChaptersTracks ( ) : shaka.extern.TrackList ; | |
/** | |
* Return a copy of the current configuration. Modifications of the returned | |
* value will not affect the Player's active configuration. You must call | |
* <code>player.configure()</code> to make changes. | |
*/ | |
getConfiguration ( ) : shaka.extern.PlayerConfiguration ; | |
/** | |
* Return a copy of the current configuration for low latency. | |
*/ | |
getConfigurationForLowLatency ( ) : object ; | |
/** | |
* Get the next known expiration time for any EME session. If the session | |
* never expires, this will return <code>Infinity</code>. If there are no EME | |
* sessions, this will return <code>Infinity</code>. If the player has not | |
* loaded content, this will return <code>Infinity</code>. | |
*/ | |
getExpiration ( ) : number ; | |
/** | |
* Gets information about the currently fetched video, audio, and text. | |
* In the case of a multi-codec or multi-mimeType manifest, this can let you | |
* determine the exact codecs and mimeTypes being fetched at the moment. | |
*/ | |
getFetchedPlaybackInfo ( ) : shaka.extern.PlaybackInfo ; | |
/** | |
* Return a list of image tracks that can be switched to. | |
* If the player has not loaded content, this will return an empty list. | |
*/ | |
getImageTracks ( ) : shaka.extern.TrackList ; | |
/** | |
* Gets a map of EME key ID to the current key status. | |
*/ | |
getKeyStatuses ( ) : { [ key: string ]: string } ; | |
/** | |
* Get the current load mode. | |
*/ | |
getLoadMode ( ) : shaka.Player.LoadMode ; | |
/** | |
* Get the manifest that the player has loaded. If the player has not loaded | |
* any content, this will return <code>null</code>. | |
* NOTE: This structure is NOT covered by semantic versioning compatibility | |
* guarantees. It may change at any time! | |
* This is marked as deprecated to warn Closure Compiler users at compile-time | |
* to avoid using this method. | |
*/ | |
getManifest ( ) : shaka.extern.Manifest | null ; | |
/** | |
* Get the type of manifest parser that the player is using. If the player has | |
* not loaded any content, this will return <code>null</code>. | |
*/ | |
getManifestParserFactory ( ) : ( shaka.extern.ManifestParser.Factory ) | null ; | |
/** | |
* Get the current manifest type. | |
*/ | |
getManifestType ( ) : string | null ; | |
/** | |
* Get the media element that the player is currently using to play loaded | |
* content. If the player has not loaded content, this will return | |
* <code>null</code>. | |
*/ | |
getMediaElement ( ) : HTMLMediaElement | null ; | |
getNetworkingEngine ( ) : shaka.net.NetworkingEngine | null ; | |
/** | |
* Return a copy of the current non default configuration. Modifications of | |
* the returned value will not affect the Player's active configuration. | |
* You must call <code>player.configure()</code> to make changes. | |
*/ | |
getNonDefaultConfiguration ( ) : object ; | |
/** | |
* Get the playback rate of what is playing right now. If we are using trick | |
* play, this will return the trick play rate. | |
* If no content is playing, this will return 0. | |
* If content is buffering, this will return the expected playback rate once | |
* the video starts playing. | |
* <p> | |
* If the player has not loaded content, this will return a playback rate of | |
* 0. | |
*/ | |
getPlaybackRate ( ) : number ; | |
/** | |
* Get the current playhead position as a date. | |
*/ | |
getPlayheadTimeAsDate ( ) : Date | null ; | |
/** | |
* Get the presentation start time as a date. | |
*/ | |
getPresentationStartTimeAsDate ( ) : Date | null ; | |
/** | |
* Get the presentation segment availability duration. This should only be | |
* called when the player has loaded a live stream. If the player has not | |
* loaded a live stream, this will return <code>null</code>. | |
*/ | |
getSegmentAvailabilityDuration ( ) : number | null ; | |
/** | |
* Get statistics for the current playback session. If the player is not | |
* playing content, this will return an empty stats object. | |
*/ | |
getStats ( ) : shaka.extern.Stats ; | |
/** | |
* Return a list of text languages available. If the player has not loaded | |
* any content, this will return an empty list. | |
*/ | |
getTextLanguages ( ) : string [] ; | |
/** | |
* Return a list of text language-role combinations available. If the player | |
* has not loaded any content, this will be return an empty list. | |
*/ | |
getTextLanguagesAndRoles ( ) : shaka.extern.LanguageRole [] ; | |
/** | |
* Return a list of text tracks that can be switched to. | |
* <p> | |
* If the player has not loaded content, this will return an empty list. | |
*/ | |
getTextTracks ( ) : shaka.extern.TrackList ; | |
/** | |
* Return a Thumbnail object from a image track Id and time. | |
* If the player has not loaded content, this will return a null. | |
*/ | |
getThumbnails (trackId : number , time : number ) : Promise < shaka.extern.Thumbnail | null > ; | |
/** | |
* Return a list of variant tracks that can be switched to. | |
* <p> | |
* If the player has not loaded content, this will return an empty list. | |
*/ | |
getVariantTracks ( ) : shaka.extern.TrackList ; | |
/** | |
* Go to live in a live stream. | |
*/ | |
goToLive ( ) : any ; | |
/** | |
* Check if the manifest contains only audio-only content. If the player has | |
* not loaded content, this will return <code>false</code>. | |
* <p> | |
* The player does not support content that contain more than one type of | |
* variants (i.e. mixing audio-only, video-only, audio-video). Content will be | |
* filtered to only contain one type of variant. | |
*/ | |
isAudioOnly ( ) : boolean ; | |
/** | |
* Check if the player is currently in a buffering state (has too little | |
* content to play smoothly). If the player has not loaded content, this will | |
* return <code>false</code>. | |
*/ | |
isBuffering ( ) : boolean ; | |
/** | |
* Indicate if the video has ended. | |
*/ | |
isEnded ( ) : boolean ; | |
/** | |
* Indicates if the player has fully loaded the stream. | |
*/ | |
isFullyLoaded ( ) : boolean ; | |
/** | |
* Get if the player is playing in-progress content. If the player has not | |
* loaded content, this will return <code>false</code>. | |
*/ | |
isInProgress ( ) : boolean ; | |
/** | |
* Get if the player is playing live content. If the player has not loaded | |
* content, this will return <code>false</code>. | |
*/ | |
isLive ( ) : boolean ; | |
/** | |
* Indicate if we are using remote playback. | |
*/ | |
isRemotePlayback ( ) : boolean ; | |
/** | |
* Check if the text displayer is enabled. | |
*/ | |
isTextTrackVisible ( ) : boolean ; | |
/** | |
* Get the key system currently used by EME. If EME is not being used, this | |
* will return an empty string. If the player has not loaded content, this | |
* will return an empty string. | |
*/ | |
keySystem ( ) : string ; | |
/** | |
* Loads a new stream. | |
* If another stream was already playing, first unloads that stream. | |
* @param startTime When <code>startTime</code> is <code>null</code> or <code>undefined</code>, playback will start at the default start time (0 for VOD and liveEdge for LIVE). | |
*/ | |
load (assetUriOrPreloader : string | shaka.media.PreloadManager | null , startTime ? : number | null , mimeType ? : string | null ) : Promise < any > ; | |
/** | |
* Starts to preload a given asset, and returns a PreloadManager object that | |
* represents that preloading process. | |
* The PreloadManager will load the manifest for that asset, as well as the | |
* initialization segment. It will not preload anything more than that; | |
* this feature is intended for reducing start-time latency, not for fully | |
* downloading assets before playing them (for that, use | |
* |shaka.offline.Storage|). | |
* You can pass that PreloadManager object in to the |load| method on this | |
* Player instance to finish loading that particular asset, or you can call | |
* the |destroy| method on the manager if the preload is no longer necessary. | |
* If this returns null rather than a PreloadManager, that indicates that the | |
* asset must be played with src=, which cannot be preloaded. | |
* @param startTime When <code>startTime</code> is <code>null</code> or <code>undefined</code>, playback will start at the default start time (0 for VOD and liveEdge for LIVE). | |
*/ | |
preload (assetUri : string , startTime ? : number | null , mimeType ? : string | null ) : Promise < shaka.media.PreloadManager | null > ; | |
/** | |
* Releases all of the mutexes of the player. Meant for use by the tests. | |
*/ | |
releaseAllMutexes ( ) : any ; | |
/** | |
* Reset configuration to default. | |
*/ | |
resetConfiguration ( ) : any ; | |
/** | |
* Retry streaming after a streaming failure has occurred. When the player has | |
* not loaded content or is loading content, this will be a no-op and will | |
* return <code>false</code>. | |
* <p> | |
* If the player has loaded content, and streaming has not seen an error, this | |
* will return <code>false</code>. | |
* <p> | |
* If the player has loaded content, and streaming seen an error, but the | |
* could not resume streaming, this will return <code>false</code>. | |
*/ | |
retryStreaming (retryDelaySeconds ? : number ) : boolean ; | |
/** | |
* Get the range of time (in seconds) that seeking is allowed. If the player | |
* has not loaded content and the manifest is HLS, this will return a range | |
* from 0 to 0. | |
*/ | |
seekRange ( ) : shaka.extern.BufferedRange ; | |
/** | |
* Sets the current audio language and current variant role to the selected | |
* language, role and channel count, and chooses a new variant if need be. | |
* If the player has not loaded any content, this will be a no-op. | |
*/ | |
selectAudioLanguage (language : string , role ? : string , channelsCount ? : number , safeMargin ? : number , codec ? : string , spatialAudio ? : boolean ) : any ; | |
/** | |
* Sets the current text language and current text role to the selected | |
* language and role, and chooses a new variant if need be. If the player has | |
* not loaded any content, this will be a no-op. | |
*/ | |
selectTextLanguage (language : string , role ? : string , forced ? : boolean ) : any ; | |
/** | |
* Select a specific text track. <code>track</code> should come from a call to | |
* <code>getTextTracks</code>. If the track is not found, this will be a | |
* no-op. If the player has not loaded content, this will be a no-op. | |
* <p> | |
* Note that <code>AdaptationEvents</code> are not fired for manual track | |
* selections. | |
*/ | |
selectTextTrack (track : shaka.extern.Track ) : any ; | |
/** | |
* Select a specific variant track to play. <code>track</code> should come | |
* from a call to <code>getVariantTracks</code>. If <code>track</code> cannot | |
* be found, this will be a no-op. If the player has not loaded content, this | |
* will be a no-op. | |
* <p> | |
* Changing variants will take effect once the currently buffered content has | |
* been played. To force the change to happen sooner, use | |
* <code>clearBuffer</code> with <code>safeMargin</code>. Setting | |
* <code>clearBuffer</code> to <code>true</code> will clear all buffered | |
* content after <code>safeMargin</code>, allowing the new variant to start | |
* playing sooner. | |
* <p> | |
* Note that <code>AdaptationEvents</code> are not fired for manual track | |
* selections. | |
* @param safeMargin Optional amount of buffer (in seconds) to retain when clearing the buffer. Useful for switching variant quickly without causing a buffering event. Defaults to 0 if not provided. Ignored if clearBuffer is false. Can cause hiccups on some browsers if chosen too small, e.g. The amount of two segments is a fair minimum to consider as safeMargin value. | |
*/ | |
selectVariantTrack (track : shaka.extern.Track , clearBuffer ? : boolean , safeMargin ? : number ) : any ; | |
/** | |
* Select variant tracks that have a given label. This assumes the | |
* label uniquely identifies an audio stream, so all the variants | |
* are expected to have the same variant.audio. | |
* @param clearBuffer Optional clear buffer or not when switch to new variant Defaults to true if not provided | |
* @param safeMargin Optional amount of buffer (in seconds) to retain when clearing the buffer. Defaults to 0 if not provided. Ignored if clearBuffer is false. | |
*/ | |
selectVariantsByLabel (label : string , clearBuffer ? : boolean , safeMargin ? : number ) : any ; | |
/** | |
* Set the maximum resolution that the platform's hardware can handle. | |
*/ | |
setMaxHardwareResolution (width : number , height : number ) : any ; | |
/** | |
* Enable or disable the text displayer. If the player is in an unloaded | |
* state, the request will be applied next time content is loaded. | |
*/ | |
setTextTrackVisibility (isVisible : boolean ) : any ; | |
/** | |
* Set the videoContainer to construct UITextDisplayer. | |
*/ | |
setVideoContainer (videoContainer : HTMLElement | null ) : any ; | |
/** | |
* Enable trick play to skip through content without playing by repeatedly | |
* seeking. For example, a rate of 2.5 would result in 2.5 seconds of content | |
* being skipped every second. A negative rate will result in moving | |
* backwards. | |
* <p> | |
* If the player has not loaded content or is still loading content this will | |
* be a no-op. Wait until <code>load</code> has completed before calling. | |
* <p> | |
* Trick play will be canceled automatically if the playhead hits the | |
* beginning or end of the seekable range for the content. | |
*/ | |
trickPlay (rate : number , useTrickPlayTrack ? : boolean ) : any ; | |
/** | |
* Unloads the currently playing stream, if any. | |
*/ | |
unload (initializeMediaSource ? : boolean , keepAdManager ? : boolean ) : Promise < any > ; | |
/** | |
* Unloads the currently playing stream, if any, and returns a PreloadManager | |
* that contains the loaded manifest of that asset, if any. | |
* Allows for the asset to be re-loaded by this player faster, in the future. | |
* When in src= mode, this unloads but does not make a PreloadManager. | |
*/ | |
unloadAndSavePreload (initializeMediaSource ? : boolean , keepAdManager ? : boolean ) : Promise < shaka.media.PreloadManager | null > ; | |
/** | |
* Provides a way to update the stream start position during the media loading | |
* process. Can for example be called from the <code>manifestparsed</code> | |
* event handler to update the start position based on information in the | |
* manifest. | |
*/ | |
updateStartTime (startTime : number ) : any ; | |
/** | |
* Return whether the browser provides basic support. If this returns false, | |
* Shaka Player cannot be used at all. In this case, do not construct a | |
* Player instance and do not use the library. | |
*/ | |
static isBrowserSupported ( ) : boolean ; | |
/** | |
* Probes the browser to determine what features are supported. This makes a | |
* number of requests to EME/MSE/etc which may result in user prompts. This | |
* should only be used for diagnostics. | |
* <p> | |
* NOTE: This may show a request to the user for permission. | |
*/ | |
static probeSupport (promptsOkay ? : boolean ) : Promise < shaka.extern.SupportType > ; | |
/** | |
* Registers a plugin callback that will be called with | |
* <code>support()</code>. The callback will return the value that will be | |
* stored in the return value from <code>support()</code>. | |
*/ | |
static registerSupportPlugin (name : string , callback : ( ) => any ) : any ; | |
/** | |
* Set a factory to create an ad manager during player construction time. | |
* This method needs to be called before instantiating the Player class. | |
*/ | |
static setAdManagerFactory (factory : shaka.extern.IAdManager.Factory ) : any ; | |
static version : string ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.Player { | |
/** | |
* In order to know what method of loading the player used for some content, we | |
* have this enum. It lets us know if content has not been loaded, loaded with | |
* media source, or loaded with src equals. | |
* This enum has a low resolution, because it is only meant to express the | |
* outer limits of the various states that the player is in. For example, when | |
* someone calls a public method on player, it should not matter if they have | |
* initialized drm engine, it should only matter if they finished loading | |
* content. | |
*/ | |
/** | |
* In order to know what method of loading the player used for some content, we | |
* have this enum. It lets us know if content has not been loaded, loaded with | |
* media source, or loaded with src equals. | |
* This enum has a low resolution, because it is only meant to express the | |
* outer limits of the various states that the player is in. For example, when | |
* someone calls a public method on player, it should not matter if they have | |
* initialized drm engine, it should only matter if they finished loading | |
* content. | |
*/ | |
enum LoadMode { | |
DESTROYED = 0.0 , | |
MEDIA_SOURCE = 2.0 , | |
NOT_LOADED = 1.0 , | |
SRC_EQUALS = 3.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.abr { | |
class SimpleAbrManager implements shaka.extern.AbrManager , shaka.util.IReleasable { | |
private noStructuralTyping_shaka_abr_SimpleAbrManager : any; | |
chooseVariant ( ) : shaka.extern.Variant ; | |
configure (config : any ) : any ; | |
disable ( ) : any ; | |
enable ( ) : any ; | |
getBandwidthEstimate ( ) : any ; | |
init (switchCallback : any ) : any ; | |
playbackRateChanged (rate : any ) : any ; | |
release ( ) : any ; | |
segmentDownloaded (deltaTimeMs : number , numBytes : number , allowSwitch : boolean , request ? : shaka.extern.Request ) : any ; | |
setCmsdManager (cmsdManager : any ) : any ; | |
setMediaElement (mediaElement : any ) : any ; | |
setVariants (variants : any ) : any ; | |
stop ( ) : any ; | |
trySuggestStreams ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ads { | |
/** | |
* A class responsible for ad-related interactions. | |
*/ | |
class AdManager extends shaka.util.FakeEventTarget implements shaka.extern.IAdManager , shaka.util.IReleasable { | |
private noStructuralTyping_shaka_ads_AdManager : any; | |
addAdUrlInterstitial (url : any ) : any ; | |
addCustomInterstitial (interstitial : any ) : any ; | |
addMediaTailorTrackingUrl (url : string ) : any ; | |
configure (config : any ) : any ; | |
getCuePoints ( ) : shaka.extern.AdCuePoint [] ; | |
getInterstitialPlayer ( ) : any ; | |
getServerSideCuePoints ( ) : shaka.extern.AdCuePoint [] ; | |
getStats ( ) : shaka.extern.AdsStats ; | |
initClientSide (adContainer : any , video : any , adsRenderingSettings : any ) : any ; | |
initInterstitial (adContainer : any , basePlayer : any , baseVideo : any ) : any ; | |
initMediaTailor (adContainer : any , networkingEngine : any , video : any ) : any ; | |
initServerSide (adContainer : any , video : any ) : any ; | |
onAssetUnload ( ) : any ; | |
onCueMetadataChange (value : any ) : any ; | |
onDASHInterstitialMetadata (basePlayer : any , baseVideo : any , region : any ) : any ; | |
onDashTimedMetadata (region : any ) : any ; | |
onHLSInterstitialMetadata (basePlayer : any , baseVideo : any , interstitial : any ) : any ; | |
onHlsTimedMetadata (metadata : any , timestamp : any ) : any ; | |
onManifestUpdated (isLive : any ) : any ; | |
release ( ) : any ; | |
replaceServerSideAdTagParameters (adTagParameters : any ) : any ; | |
requestClientSideAds (imaRequest : any ) : any ; | |
requestMediaTailorStream (url : string , adsParams : object | null , backupUrl ? : string ) : Promise < string > ; | |
requestServerSideStream (imaRequest : any , backupUrl ? : string ) : Promise < string > ; | |
setLocale (locale : any ) : any ; | |
updateClientSideAdsRenderingSettings (adsRenderingSettings : any ) : any ; | |
/** | |
* The event name for when a sequence of ads has been loaded. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static ADS_LOADED : string ; | |
/** | |
* The event name for when the client side SDK signalled its readiness | |
* to play a VPAID ad or an ad rule. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_BREAK_READY : string ; | |
/** | |
* The event name for when the ad is buffering. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_BUFFERING : string ; | |
/** | |
* The event name for when the ad was clicked. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_CLICKED : string ; | |
/** | |
* The event name for when the ad was closed by the user. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_CLOSED : string ; | |
/** | |
* The event name for when an ad has completed playing. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_COMPLETE : string ; | |
/** | |
* The name of the event for when an ad requires the video of the main content | |
* to be attached. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_CONTENT_ATTACH_REQUESTED : string ; | |
/** | |
* The name of the event for when an ad requires the main content to be paused. | |
* Fired when the platform does not support multiple media elements. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_CONTENT_PAUSE_REQUESTED : string ; | |
/** | |
* The name of the event for when an ad requires the main content to be resumed. | |
* Fired when the platform does not support multiple media elements. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_CONTENT_RESUME_REQUESTED : string ; | |
/** | |
* The event name for when the ad's duration changed. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_DURATION_CHANGED : string ; | |
/** | |
* The event name for when the ad manager dispatch errors. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_ERROR : string ; | |
/** | |
* The event name for when an ad playhead crosses first quartile. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_FIRST_QUARTILE : string ; | |
/** | |
* The event name for when the ad's URL was hit. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_IMPRESSION : string ; | |
/** | |
* The event name for when the interaction callback for the ad was | |
* triggered. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_INTERACTION : string ; | |
/** | |
* The event name for when the ad changes from or to linear. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_LINEAR_CHANGED : string ; | |
/** | |
* The event name for when the ad data becomes available. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_LOADED : string ; | |
/** | |
* The event name for when the ad's metadata becomes available. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_METADATA : string ; | |
/** | |
* The event name for when an ad playhead crosses midpoint. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_MIDPOINT : string ; | |
/** | |
* The event name for when the ad was muted. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_MUTED : string ; | |
/** | |
* The event name for when the ad was paused. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_PAUSED : string ; | |
/** | |
* The event name for when there is an update to the current ad's progress. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_PROGRESS : string ; | |
/** | |
* The event name for when the ad display encountered a recoverable | |
* error. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_RECOVERABLE_ERROR : string ; | |
/** | |
* The event name for when the ad was resumed after a pause. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_RESUMED : string ; | |
/** | |
* The event name for when an ad is skipped by the user. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_SKIPPED : string ; | |
/** | |
* The event name for when the ad's skip status changes | |
* (usually it becomes skippable when it wasn't before). | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_SKIP_STATE_CHANGED : string ; | |
/** | |
* The event name for when an ad has started playing. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_STARTED : string ; | |
/** | |
* The event name for when an ad has finished playing | |
* (played all the way through, was skipped, or was unable to proceed | |
* due to an error). | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_STOPPED : string ; | |
/** | |
* The event name for when an ad playhead crosses third quartile. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_THIRD_QUARTILE : string ; | |
/** | |
* The event name for when the ad volume has changed. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static AD_VOLUME_CHANGED : string ; | |
/** | |
* The event name for when all the ads were completed. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static ALL_ADS_COMPLETED : string ; | |
/** | |
* The event name for when the ad's cue points (start/end markers) | |
* have changed. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static CUEPOINTS_CHANGED : string ; | |
/** | |
* The event name for when the native IMA ad manager object has | |
* loaded and become available. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static IMA_AD_MANAGER_LOADED : string ; | |
/** | |
* The event name for when the native IMA stream manager object has | |
* loaded and become available. | |
* Deprecated, please use {@link shaka.ads.Utils} | |
*/ | |
static IMA_STREAM_MANAGER_LOADED : string ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ads { | |
class ClientSideAd implements shaka.extern.IAd { | |
private noStructuralTyping_shaka_ads_ClientSideAd : any; | |
constructor (imaAd : any , imaAdManager : any , video : HTMLMediaElement | null ) ; | |
canSkipNow ( ) : any ; | |
getAdId ( ) : any ; | |
getAdvertiserName ( ) : any ; | |
getCreativeAdId ( ) : any ; | |
getDescription ( ) : any ; | |
getDuration ( ) : any ; | |
getMediaUrl ( ) : any ; | |
getMinSuggestedDuration ( ) : any ; | |
getPodIndex ( ) : any ; | |
getPositionInSequence ( ) : any ; | |
getRemainingTime ( ) : any ; | |
getSequenceLength ( ) : any ; | |
getTimeOffset ( ) : any ; | |
getTimeUntilSkippable ( ) : any ; | |
getTitle ( ) : any ; | |
getVastMediaBitrate ( ) : any ; | |
getVastMediaHeight ( ) : any ; | |
getVastMediaWidth ( ) : any ; | |
getVolume ( ) : any ; | |
isClientRendering ( ) : any ; | |
isLinear ( ) : any ; | |
isMuted ( ) : any ; | |
isPaused ( ) : any ; | |
isSkippable ( ) : any ; | |
isUsingAnotherMediaElement ( ) : any ; | |
needsSkipUI ( ) : any ; | |
pause ( ) : any ; | |
play ( ) : any ; | |
release ( ) : any ; | |
resize (width : any , height : any ) : any ; | |
setMuted (muted : any ) : any ; | |
setVolume (volume : any ) : any ; | |
skip ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ads { | |
class InterstitialAd implements shaka.extern.IAd { | |
private noStructuralTyping_shaka_ads_InterstitialAd : any; | |
constructor (video : HTMLMediaElement | null , interstitial : shaka.extern.AdInterstitial , onSkip : ( ) => any , sequenceLength : number , adPosition : number , isUsingAnotherMediaElement : boolean ) ; | |
canSkipNow ( ) : any ; | |
getAdId ( ) : any ; | |
getAdvertiserName ( ) : any ; | |
getCreativeAdId ( ) : any ; | |
getDescription ( ) : any ; | |
getDuration ( ) : any ; | |
getMediaUrl ( ) : any ; | |
getMinSuggestedDuration ( ) : any ; | |
getPodIndex ( ) : any ; | |
getPositionInSequence ( ) : any ; | |
getRemainingTime ( ) : any ; | |
getSequenceLength ( ) : any ; | |
getTimeOffset ( ) : any ; | |
getTimeUntilSkippable ( ) : any ; | |
getTitle ( ) : any ; | |
getVastMediaBitrate ( ) : any ; | |
getVastMediaHeight ( ) : any ; | |
getVastMediaWidth ( ) : any ; | |
getVolume ( ) : any ; | |
isClientRendering ( ) : any ; | |
isLinear ( ) : any ; | |
isMuted ( ) : any ; | |
isPaused ( ) : any ; | |
isSkippable ( ) : any ; | |
isUsingAnotherMediaElement ( ) : any ; | |
needsSkipUI ( ) : any ; | |
pause ( ) : any ; | |
play ( ) : any ; | |
release ( ) : any ; | |
resize (width : any , height : any ) : any ; | |
setMuted (muted : any ) : any ; | |
setVolume (volume : any ) : any ; | |
skip ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ads { | |
class InterstitialStaticAd implements shaka.extern.IAd { | |
private noStructuralTyping_shaka_ads_InterstitialStaticAd : any; | |
constructor (interstitial : shaka.extern.AdInterstitial , sequenceLength : number , adPosition : number ) ; | |
canSkipNow ( ) : any ; | |
getAdId ( ) : any ; | |
getAdvertiserName ( ) : any ; | |
getCreativeAdId ( ) : any ; | |
getDescription ( ) : any ; | |
getDuration ( ) : any ; | |
getMediaUrl ( ) : any ; | |
getMinSuggestedDuration ( ) : any ; | |
getPodIndex ( ) : any ; | |
getPositionInSequence ( ) : any ; | |
getRemainingTime ( ) : any ; | |
getSequenceLength ( ) : any ; | |
getTimeOffset ( ) : any ; | |
getTimeUntilSkippable ( ) : any ; | |
getTitle ( ) : any ; | |
getVastMediaBitrate ( ) : any ; | |
getVastMediaHeight ( ) : any ; | |
getVastMediaWidth ( ) : any ; | |
getVolume ( ) : any ; | |
isClientRendering ( ) : any ; | |
isLinear ( ) : any ; | |
isMuted ( ) : any ; | |
isPaused ( ) : any ; | |
isSkippable ( ) : any ; | |
isUsingAnotherMediaElement ( ) : any ; | |
needsSkipUI ( ) : any ; | |
pause ( ) : any ; | |
play ( ) : any ; | |
release ( ) : any ; | |
resize (width : any , height : any ) : any ; | |
setMuted (muted : any ) : any ; | |
setVolume (volume : any ) : any ; | |
skip ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ads { | |
class MediaTailorAd implements shaka.extern.IAd { | |
private noStructuralTyping_shaka_ads_MediaTailorAd : any; | |
constructor (mediaTailorAd : any | null , adPosition : number , totalAds : number , isLinear : boolean , video : HTMLMediaElement | null ) ; | |
canSkipNow ( ) : any ; | |
getAdId ( ) : any ; | |
getAdvertiserName ( ) : any ; | |
getCreativeAdId ( ) : any ; | |
getDescription ( ) : any ; | |
getDuration ( ) : any ; | |
getMediaUrl ( ) : any ; | |
getMinSuggestedDuration ( ) : any ; | |
getPodIndex ( ) : any ; | |
getPositionInSequence ( ) : any ; | |
getRemainingTime ( ) : any ; | |
getSequenceLength ( ) : any ; | |
getTimeOffset ( ) : any ; | |
getTimeUntilSkippable ( ) : any ; | |
getTitle ( ) : any ; | |
getVastMediaBitrate ( ) : any ; | |
getVastMediaHeight ( ) : any ; | |
getVastMediaWidth ( ) : any ; | |
getVolume ( ) : any ; | |
isClientRendering ( ) : any ; | |
isLinear ( ) : any ; | |
isMuted ( ) : any ; | |
isPaused ( ) : any ; | |
isSkippable ( ) : any ; | |
isUsingAnotherMediaElement ( ) : any ; | |
needsSkipUI ( ) : any ; | |
pause ( ) : any ; | |
play ( ) : any ; | |
release ( ) : any ; | |
resize (width : any , height : any ) : any ; | |
setMuted (muted : any ) : any ; | |
setVolume (volume : any ) : any ; | |
skip ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ads { | |
class ServerSideAd implements shaka.extern.IAd { | |
private noStructuralTyping_shaka_ads_ServerSideAd : any; | |
constructor (imaAd : any | null , video : HTMLMediaElement | null ) ; | |
canSkipNow ( ) : any ; | |
getAdId ( ) : any ; | |
getAdvertiserName ( ) : any ; | |
getCreativeAdId ( ) : any ; | |
getDescription ( ) : any ; | |
getDuration ( ) : any ; | |
getMediaUrl ( ) : any ; | |
getMinSuggestedDuration ( ) : any ; | |
getPodIndex ( ) : any ; | |
getPositionInSequence ( ) : any ; | |
getRemainingTime ( ) : any ; | |
getSequenceLength ( ) : any ; | |
getTimeOffset ( ) : any ; | |
getTimeUntilSkippable ( ) : any ; | |
getTitle ( ) : any ; | |
getVastMediaBitrate ( ) : any ; | |
getVastMediaHeight ( ) : any ; | |
getVastMediaWidth ( ) : any ; | |
getVolume ( ) : any ; | |
isClientRendering ( ) : any ; | |
isLinear ( ) : any ; | |
isMuted ( ) : any ; | |
isPaused ( ) : any ; | |
isSkippable ( ) : any ; | |
isUsingAnotherMediaElement ( ) : any ; | |
needsSkipUI ( ) : any ; | |
pause ( ) : any ; | |
play ( ) : any ; | |
release ( ) : any ; | |
resize (width : any , height : any ) : any ; | |
setMuted (muted : any ) : any ; | |
setVolume (volume : any ) : any ; | |
skip ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ads { | |
/** | |
* A class responsible for ad utils. | |
*/ | |
class Utils { | |
private noStructuralTyping_shaka_ads_Utils : any; | |
/** | |
* The event name for when a sequence of ads has been loaded. | |
*/ | |
static ADS_LOADED : string ; | |
/** | |
* The event name for when the client side SDK signalled its readiness | |
* to play a VPAID ad or an ad rule. | |
*/ | |
static AD_BREAK_READY : string ; | |
/** | |
* The event name for when the ad is buffering. | |
*/ | |
static AD_BUFFERING : string ; | |
/** | |
* The event name for when the ad was clicked. | |
*/ | |
static AD_CLICKED : string ; | |
/** | |
* The event name for when the ad was closed by the user. | |
*/ | |
static AD_CLOSED : string ; | |
/** | |
* The event name for when an ad has completed playing. | |
*/ | |
static AD_COMPLETE : string ; | |
/** | |
* The name of the event for when an ad requires the video of the main content | |
* to be attached. | |
*/ | |
static AD_CONTENT_ATTACH_REQUESTED : string ; | |
/** | |
* The name of the event for when an ad requires the main content to be paused. | |
* Fired when the platform does not support multiple media elements. | |
*/ | |
static AD_CONTENT_PAUSE_REQUESTED : string ; | |
/** | |
* The name of the event for when an ad requires the main content to be resumed. | |
* Fired when the platform does not support multiple media elements. | |
*/ | |
static AD_CONTENT_RESUME_REQUESTED : string ; | |
/** | |
* The event name for when the ad's duration changed. | |
*/ | |
static AD_DURATION_CHANGED : string ; | |
/** | |
* The event name for when the ad manager dispatch errors. | |
*/ | |
static AD_ERROR : string ; | |
/** | |
* The event name for when an ad playhead crosses first quartile. | |
*/ | |
static AD_FIRST_QUARTILE : string ; | |
/** | |
* The event name for when the ad's URL was hit. | |
*/ | |
static AD_IMPRESSION : string ; | |
/** | |
* The event name for when the interaction callback for the ad was | |
* triggered. | |
*/ | |
static AD_INTERACTION : string ; | |
/** | |
* The event name for when the ad changes from or to linear. | |
*/ | |
static AD_LINEAR_CHANGED : string ; | |
/** | |
* The event name for when the ad data becomes available. | |
*/ | |
static AD_LOADED : string ; | |
/** | |
* The event name for when the ad's metadata becomes available. | |
*/ | |
static AD_METADATA : string ; | |
/** | |
* The event name for when an ad playhead crosses midpoint. | |
*/ | |
static AD_MIDPOINT : string ; | |
/** | |
* The event name for when the ad was muted. | |
*/ | |
static AD_MUTED : string ; | |
/** | |
* The event name for when the ad was paused. | |
*/ | |
static AD_PAUSED : string ; | |
/** | |
* The event name for when there is an update to the current ad's progress. | |
*/ | |
static AD_PROGRESS : string ; | |
/** | |
* The event name for when the ad display encountered a recoverable | |
* error. | |
*/ | |
static AD_RECOVERABLE_ERROR : string ; | |
/** | |
* The event name for when the ad was resumed after a pause. | |
*/ | |
static AD_RESUMED : string ; | |
/** | |
* The event name for when an ad is skipped by the user.. | |
*/ | |
static AD_SKIPPED : string ; | |
/** | |
* The event name for when the ad's skip status changes | |
* (usually it becomes skippable when it wasn't before). | |
*/ | |
static AD_SKIP_STATE_CHANGED : string ; | |
/** | |
* The event name for when an ad has started playing. | |
*/ | |
static AD_STARTED : string ; | |
/** | |
* The event name for when an ad has finished playing | |
* (played all the way through, was skipped, or was unable to proceed | |
* due to an error). | |
*/ | |
static AD_STOPPED : string ; | |
/** | |
* The event name for when an ad playhead crosses third quartile. | |
*/ | |
static AD_THIRD_QUARTILE : string ; | |
/** | |
* The event name for when the ad volume has changed. | |
*/ | |
static AD_VOLUME_CHANGED : string ; | |
/** | |
* The event name for when all the ads were completed. | |
*/ | |
static ALL_ADS_COMPLETED : string ; | |
/** | |
* The event name for when the ad's cue points (start/end markers) | |
* have changed. | |
*/ | |
static CUEPOINTS_CHANGED : string ; | |
/** | |
* The event name for when the native IMA ad manager object has | |
* loaded and become available. | |
*/ | |
static IMA_AD_MANAGER_LOADED : string ; | |
/** | |
* The event name for when the native IMA stream manager object has | |
* loaded and become available. | |
*/ | |
static IMA_STREAM_MANAGER_LOADED : string ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.cast { | |
class CastProxy extends shaka.util.FakeEventTarget implements shaka.util.IDestroyable { | |
private noStructuralTyping_shaka_cast_CastProxy : any; | |
constructor (video : HTMLMediaElement , player : shaka.Player , receiverAppId : string , androidReceiverCompatible : boolean ) ; | |
canCast ( ) : boolean ; | |
cast ( ) : Promise < any > ; | |
changeReceiverId (newAppId : string , newCastAndroidReceiver ? : boolean ) : any ; | |
/** | |
* Destroys the proxy and the underlying local Player. | |
* @param forceDisconnect If true, force the receiver app to shut down by disconnecting. Does nothing if not connected. | |
*/ | |
destroy (forceDisconnect ? : boolean ) : Promise < any > ; | |
/** | |
* Force the receiver app to shut down by disconnecting. | |
*/ | |
forceDisconnect ( ) : any ; | |
/** | |
* Get a proxy for the Player that delegates to local and remote Player | |
* objects as appropriate. | |
*/ | |
getPlayer ( ) : shaka.Player ; | |
/** | |
* Get a proxy for the video element that delegates to local and remote video | |
* elements as appropriate. | |
*/ | |
getVideo ( ) : HTMLMediaElement ; | |
isCasting ( ) : boolean ; | |
receiverName ( ) : string ; | |
/** | |
* Set application-specific data. | |
* @param appData Application-specific data to relay to the receiver. | |
*/ | |
setAppData (appData : object | null ) : any ; | |
/** | |
* Show a dialog where user can choose to disconnect from the cast connection. | |
*/ | |
suggestDisconnect ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.cast { | |
/** | |
* A receiver to communicate between the Chromecast-hosted player and the | |
* sender application. | |
*/ | |
class CastReceiver extends shaka.util.FakeEventTarget implements shaka.util.IDestroyable { | |
private noStructuralTyping_shaka_cast_CastReceiver : any; | |
/** | |
* A receiver to communicate between the Chromecast-hosted player and the | |
* sender application. | |
*/ | |
constructor (video : HTMLMediaElement , player : shaka.Player , appDataCallback ? : (a : object | null ) => any , contentIdCallback ? : (a : string ) => string ) ; | |
/** | |
* Clear all Cast content metadata. | |
* Should be called from an appDataCallback. | |
*/ | |
clearContentMetadata ( ) : any ; | |
/** | |
* Destroys the underlying Player, then terminates the cast receiver app. | |
*/ | |
destroy ( ) : Promise < any > ; | |
isConnected ( ) : boolean ; | |
isIdle ( ) : boolean ; | |
/** | |
* Set the Cast content's artist. | |
* Also sets the metadata type to music. | |
* Should be called from an appDataCallback. | |
*/ | |
setContentArtist (artist : string ) : any ; | |
/** | |
* Set the Cast content's thumbnail image. | |
* Should be called from an appDataCallback. | |
*/ | |
setContentImage (imageUrl : string ) : any ; | |
/** | |
* Set all Cast content metadata, as defined by the Cast SDK. | |
* Should be called from an appDataCallback. | |
* For a simpler way to set basic metadata, see: | |
* - setContentTitle() | |
* - setContentImage() | |
* - setContentArtist() | |
* @param metadata A Cast metadata object, one of: - https://developers.google.com/cast/docs/reference/messages#GenericMediaMetadata - https://developers.google.com/cast/docs/reference/messages#MovieMediaMetadata - https://developers.google.com/cast/docs/reference/messages#TvShowMediaMetadata - https://developers.google.com/cast/docs/reference/messages#MusicTrackMediaMetadata | |
*/ | |
setContentMetadata (metadata : object | null ) : any ; | |
/** | |
* Set the Cast content's title. | |
* Should be called from an appDataCallback. | |
*/ | |
setContentTitle (title : string ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.cea { | |
/** | |
* CEA-X08 captions decoder. | |
*/ | |
class CeaDecoder implements shaka.extern.ICaptionDecoder { | |
private noStructuralTyping_shaka_cea_CeaDecoder : any; | |
clear ( ) : any ; | |
decode ( ) : shaka.extern.ICaptionDecoder.ClosedCaption [] ; | |
extract (userDataSeiMessage : Uint8Array , pts : number ) : any ; | |
getStreams ( ) : string [] ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.cea { | |
/** | |
* MPEG4 stream parser used for extracting 708 closed captions data. | |
*/ | |
class Mp4CeaParser implements shaka.extern.ICeaParser { | |
private noStructuralTyping_shaka_cea_Mp4CeaParser : any; | |
init (initSegment : ArrayBuffer | ArrayBufferView ) : any ; | |
parse (mediaSegment : ArrayBuffer | ArrayBufferView ) : shaka.extern.ICeaParser.CaptionPacket [] ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.cea { | |
/** | |
* MPEG TS CEA parser. | |
*/ | |
class TsCeaParser implements shaka.extern.ICeaParser { | |
private noStructuralTyping_shaka_cea_TsCeaParser : any; | |
init (initSegment : ArrayBuffer | ArrayBufferView ) : any ; | |
parse (mediaSegment : ArrayBuffer | ArrayBufferView ) : shaka.extern.ICeaParser.CaptionPacket [] ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.config { | |
enum AutoShowText { | |
ALWAYS = 1.0 , | |
IF_PREFERRED_TEXT_LANGUAGE = 2.0 , | |
IF_SUBTITLES_MAY_BE_NEEDED = 3.0 , | |
NEVER = 0.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.config { | |
enum CodecSwitchingStrategy { | |
RELOAD = 'reload' , | |
SMOOTH = 'smooth' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.dash { | |
/** | |
* Creates a new DASH parser. | |
*/ | |
class DashParser implements shaka.extern.ManifestParser { | |
private noStructuralTyping_shaka_dash_DashParser : any; | |
banLocation (uri : any ) : any ; | |
configure (config : shaka.extern.ManifestConfiguration , isPreloadFn ? : ( ) => boolean ) : any ; | |
onExpirationUpdated (sessionId : any , expiration : any ) : any ; | |
onInitialVariantChosen (variant : any ) : any ; | |
setMediaElement (mediaElement : any ) : any ; | |
start (uri : any , playerInterface : any ) : any ; | |
stop ( ) : any ; | |
update ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka { | |
class dependencies { | |
private noStructuralTyping_shaka_dependencies : any; | |
/** | |
* Registers a new dependency. | |
* @param key which is used for retrieving a dependency | |
* @param dep a dependency | |
*/ | |
static add (key : shaka.dependencies.Allowed , dep : any ) : any ; | |
/** | |
* Check if we have a dependency for the key. | |
* @param key key | |
*/ | |
static has (key : shaka.dependencies.Allowed ) : boolean ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.dependencies { | |
enum Allowed { | |
ISOBoxer = 'ISOBoxer' , | |
muxjs = 'muxjs' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.hls { | |
/** | |
* HLS parser. | |
*/ | |
class HlsParser implements shaka.extern.ManifestParser { | |
private noStructuralTyping_shaka_hls_HlsParser : any; | |
banLocation (uri : any ) : any ; | |
configure (config : shaka.extern.ManifestConfiguration , isPreloadFn ? : ( ) => boolean ) : any ; | |
onExpirationUpdated (sessionId : any , expiration : any ) : any ; | |
onInitialVariantChosen (variant : any ) : any ; | |
setMediaElement (mediaElement : any ) : any ; | |
start (uri : any , playerInterface : any ) : any ; | |
stop ( ) : any ; | |
update ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.lcevc { | |
class Dec implements shaka.util.IReleasable { | |
private noStructuralTyping_shaka_lcevc_Dec : any; | |
constructor (media : HTMLVideoElement | null , canvas : HTMLCanvasElement | null , lcevcConfig : shaka.extern.LcevcConfiguration ) ; | |
/** | |
* Close LCEVC Decoder. | |
*/ | |
release ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media { | |
/** | |
* A set of variants that we want to adapt between. | |
*/ | |
class AdaptationSet { | |
private noStructuralTyping_shaka_media_AdaptationSet : any; | |
constructor (root : shaka.extern.Variant , candidates ? : Iterable < shaka.extern.Variant > , compareCodecs ? : boolean ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media { | |
/** | |
* An adaptation set criteria is a unit of logic that can take a set of | |
* variants and return a subset of variants that should (and can) be | |
* adapted between. | |
*/ | |
interface AdaptationSetCriteria { | |
/** | |
* Sets the AdaptationSetCriteria configuration. | |
*/ | |
configure (config : shaka.media.AdaptationSetCriteria.Configuration ) : any ; | |
/** | |
* Take a set of variants, and return a subset of variants that can be | |
* adapted between. | |
*/ | |
create (variants : shaka.extern.Variant [] ) : shaka.media.AdaptationSet ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media.AdaptationSetCriteria { | |
type Configuration = { audioCodec : string , audioLabel : string , channelCount : number , codecSwitchingStrategy : shaka.config.CodecSwitchingStrategy , hdrLevel : string , language : string , role : string , spatialAudio : boolean , videoLabel : string , videoLayout : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media.AdaptationSetCriteria { | |
/** | |
* A factory for creating the AdaptationSetCriteria. | |
*/ | |
type Factory = ( ) => shaka.media.AdaptationSetCriteria ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media { | |
/** | |
* Closed Caption Parser provides all operations for parsing the closed captions | |
* embedded in Dash videos streams. | |
*/ | |
class ClosedCaptionParser implements shaka.media.IClosedCaptionParser { | |
private noStructuralTyping_shaka_media_ClosedCaptionParser : any; | |
/** | |
* Closed Caption Parser provides all operations for parsing the closed captions | |
* embedded in Dash videos streams. | |
*/ | |
constructor (mimeType : string ) ; | |
static findDecoder ( ) : ( shaka.extern.CaptionDecoderPlugin ) | null ; | |
static findParser (mimeType : string ) : ( shaka.extern.CeaParserPlugin ) | null ; | |
static registerDecoder (plugin : shaka.extern.CaptionDecoderPlugin ) : any ; | |
static registerParser (mimeType : string , plugin : shaka.extern.CeaParserPlugin ) : any ; | |
static unregisterDecoder ( ) : any ; | |
static unregisterParser (mimeType : string ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media { | |
/** | |
* The IClosedCaptionParser defines the interface to provide all operations for | |
* parsing the closed captions embedded in Dash videos streams. | |
* TODO: Remove this interface and move method definitions | |
* directly to ClosedCaptionParser. | |
*/ | |
interface IClosedCaptionParser { | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media { | |
/** | |
* Creates an InitSegmentReference, which provides the location to an | |
* initialization segment. | |
*/ | |
class InitSegmentReference { | |
private noStructuralTyping_shaka_media_InitSegmentReference : any; | |
constructor (uris : ( ) => string [] , startByte : number , endByte : number | null , mediaQuality ? : null | shaka.extern.MediaQualityInfo , timescale ? : null | number , segmentData ? : null | ArrayBuffer | ArrayBufferView , aesKey ? : shaka.extern.aesKey | null ) ; | |
/** | |
* Returns the offset from the start of the resource to the end of the | |
* segment, inclusive. A value of null indicates that the segment extends | |
* to the end of the resource. | |
*/ | |
getEndByte ( ) : number | null ; | |
/** | |
* Returns the offset from the start of the resource to the | |
* start of the segment. | |
*/ | |
getStartByte ( ) : number ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media { | |
class ManifestParser { | |
private noStructuralTyping_shaka_media_ManifestParser : any; | |
/** | |
* Registers a manifest parser by file extension. | |
* @param extension The file extension of the manifest. | |
* @param parserFactory The factory used to create parser instances. | |
*/ | |
static registerParserByExtension (extension : string , parserFactory : shaka.extern.ManifestParser.Factory ) : any ; | |
/** | |
* Registers a manifest parser by MIME type. | |
* @param mimeType The MIME type of the manifest. | |
* @param parserFactory The factory used to create parser instances. | |
*/ | |
static registerParserByMime (mimeType : string , parserFactory : shaka.extern.ManifestParser.Factory ) : any ; | |
/** | |
* Unregisters a manifest parser by MIME type. | |
* @param mimeType The MIME type of the manifest. | |
*/ | |
static unregisterParserByMime (mimeType : string ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media.ManifestParser { | |
enum AccessibilityPurpose { | |
HARD_OF_HEARING = 'hard of hearing' , | |
VISUALLY_IMPAIRED = 'visually impaired' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media { | |
/** | |
* A meta-SegmentIndex composed of multiple other SegmentIndexes. | |
* Used in constructing multi-Period Streams for DASH. | |
*/ | |
class MetaSegmentIndex extends shaka.media.SegmentIndex implements Iterable < shaka.media.SegmentReference > { | |
private noStructuralTyping_shaka_media_MetaSegmentIndex : any; | |
/** | |
* A meta-SegmentIndex composed of multiple other SegmentIndexes. | |
* Used in constructing multi-Period Streams for DASH. | |
*/ | |
constructor ( ) ; | |
//!! Symbol.iterator inserted by Clutz for Iterable subtype | |
[Symbol.iterator](): Iterator < shaka.media.SegmentReference > ; | |
evict (time : number ) : any ; | |
find (time : any ) : any ; | |
fit (windowStart : number , windowEnd : number | null , c ? : boolean ) : any ; | |
forEachTopLevelReference (fn : any ) : any ; | |
get (position : any ) : any ; | |
merge (references : any ) : any ; | |
mergeAndEvict (references : shaka.media.SegmentReference [] , windowStart : number ) : any ; | |
offset (offset : number ) : any ; | |
release ( ) : any ; | |
updateEvery (interval : number , updateCallback : ( ) => ( shaka.media.SegmentReference | null ) [] | null ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media { | |
class PreloadManager extends shaka.util.FakeEventTarget implements shaka.util.IDestroyable { | |
private noStructuralTyping_shaka_media_PreloadManager : any; | |
constructor (assetUri : string , mimeType : string | null , startTime : number | null , playerInterface : any ) ; | |
/** | |
* Releases or stops all non-entrusted resources. | |
*/ | |
destroy ( ) : Promise < any > ; | |
/** | |
* Waits for the loading to be finished (or to fail with an error). | |
*/ | |
waitForFinish ( ) : Promise < any > ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media { | |
/** | |
* PresentationTimeline. | |
*/ | |
class PresentationTimeline { | |
private noStructuralTyping_shaka_media_PresentationTimeline : any; | |
constructor (presentationStartTime : number | null , presentationDelay : number , autoCorrectDrift ? : boolean ) ; | |
/** | |
* Gets the presentation's segment availability time offset. This should be | |
* only configured for Low Latency Dash. | |
*/ | |
getAvailabilityTimeOffset ( ) : number ; | |
/** | |
* Gets the presentation delay in seconds. | |
*/ | |
getDelay ( ) : number ; | |
getDuration ( ) : number ; | |
getInitialProgramDateTime ( ) : number | null ; | |
getMaxSegmentDuration ( ) : number ; | |
/** | |
* Gets the end time of the last available segment. | |
*/ | |
getMaxSegmentEndTime ( ) : number | null ; | |
getPresentationStartTime ( ) : number | null ; | |
/** | |
* Gets the seek range start time, offset by the given amount. This is used | |
* to ensure that we don't "fall" back out of the seek window while we are | |
* buffering. | |
* @param offset The offset to add to the start time for live streams. | |
*/ | |
getSafeSeekRangeStart (offset : number ) : number ; | |
/** | |
* Gets the seek range end. | |
*/ | |
getSeekRangeEnd ( ) : number ; | |
/** | |
* Gets the seek range start time. | |
*/ | |
getSeekRangeStart ( ) : number ; | |
/** | |
* Gets the presentation's segment availability duration. | |
*/ | |
getSegmentAvailabilityDuration ( ) : number ; | |
/** | |
* Gets the presentation's current segment availability end time. Segments | |
* starting after this time should be assumed to be unavailable. | |
*/ | |
getSegmentAvailabilityEnd ( ) : number ; | |
/** | |
* Gets the presentation's current segment availability start time. Segments | |
* ending at or before this time should be assumed to be unavailable. | |
*/ | |
getSegmentAvailabilityStart ( ) : number ; | |
isInProgress ( ) : boolean ; | |
isLive ( ) : boolean ; | |
/** | |
* Returns if the presentation timeline's start time is locked. | |
*/ | |
isStartTimeLocked ( ) : boolean ; | |
/** | |
* Lock the presentation timeline's start time. After this is called, no | |
* further adjustments to presentationStartTime_ will be permitted. | |
* This should be called after all Periods have been parsed, and all calls to | |
* notifySegments() from the initial manifest parse have been made. | |
* Without this, we can get assertion failures in SegmentIndex for certain | |
* DAI content. If DAI adds ad segments to the manifest faster than | |
* real-time, adjustments to presentationStartTime_ can cause availability | |
* windows to jump around on updates. | |
*/ | |
lockStartTime ( ) : any ; | |
/** | |
* Gives PresentationTimeline a Stream's maximum segment duration so it can | |
* size and position the segment availability window. This function should be | |
* called once for each Stream (no more, no less), but does not have to be | |
* called if notifySegments() is called instead for a particular stream. | |
* @param maxSegmentDuration The maximum segment duration for a particular stream. | |
*/ | |
notifyMaxSegmentDuration (maxSegmentDuration : number ) : any ; | |
/** | |
* Gives PresentationTimeline a Stream's minimum segment start time. | |
*/ | |
notifyMinSegmentStartTime (startTime : number ) : any ; | |
/** | |
* Gives PresentationTimeline an startTime and endTime of the period. | |
* This should be only set for Dash. | |
*/ | |
notifyPeriodDuration (startTime : number , endTime : number ) : any ; | |
/** | |
* Gives PresentationTimeline an array of segments so it can size and position | |
* the segment availability window, and account for missing segment | |
* information. These segments do not necessarily need to all be from the | |
* same stream. | |
*/ | |
notifySegments (references : shaka.media.SegmentReference [] ) : any ; | |
/** | |
* Gives PresentationTimeline a Stream's timeline so it can size and position | |
* the segment availability window, and account for missing segment | |
* information. | |
*/ | |
notifyTimeRange (timeline : shaka.media.PresentationTimeline.TimeRange [] , startOffset : number ) : any ; | |
/** | |
* Offsets the segment times by the given amount. | |
* @param offset The number of seconds to offset by. A positive number adjusts the segment times forward. | |
*/ | |
offset (offset : number ) : any ; | |
/** | |
* Sets the presentation's segment availability time offset. This should be | |
* only set for Low Latency Dash. | |
* The segments are available earlier for download than the availability start | |
* time, so we can move closer to the live edge. | |
*/ | |
setAvailabilityTimeOffset (offset : number ) : any ; | |
/** | |
* Sets the clock offset, which is the difference between the client's clock | |
* and the server's clock, in milliseconds (i.e., serverTime = Date.now() + | |
* clockOffset). | |
* @param offset The clock offset, in ms. | |
*/ | |
setClockOffset (offset : number ) : any ; | |
/** | |
* Sets the presentation delay in seconds. | |
*/ | |
setDelay (delay : number ) : any ; | |
/** | |
* Sets the presentation's duration. | |
* @param duration The presentation's duration in seconds. Infinity indicates that the presentation continues indefinitely. | |
*/ | |
setDuration (duration : number ) : any ; | |
/** | |
* Sets the initial program date time. | |
*/ | |
setInitialProgramDateTime (initialProgramDateTime : number ) : any ; | |
/** | |
* Sets the presentation's start time. | |
* @param presentationStartTime The wall-clock time, in seconds, when the presentation started or will start. Only required for live. | |
*/ | |
setPresentationStartTime (presentationStartTime : number ) : any ; | |
/** | |
* Sets the presentation's segment availability duration. The segment | |
* availability duration should only be set for live. | |
* @param segmentAvailabilityDuration The presentation's new segment availability duration in seconds. | |
*/ | |
setSegmentAvailabilityDuration (segmentAvailabilityDuration : number ) : any ; | |
/** | |
* Sets the presentation's static flag. | |
* @param isStatic If true, the presentation is static, meaning all segments are available at once. | |
*/ | |
setStatic (isStatic : boolean ) : any ; | |
/** | |
* Sets the start time of the user-defined seek range. This is only used for | |
* VOD content. | |
*/ | |
setUserSeekStart (time : number ) : any ; | |
/** | |
* True if the presentation start time is being used to calculate the live | |
* edge. | |
* Using the presentation start time means that the stream may be subject to | |
* encoder drift. At runtime, we will avoid using the presentation start time | |
* whenever possible. | |
*/ | |
usingPresentationStartTime ( ) : boolean ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media.PresentationTimeline { | |
type TimeRange = { end : number , partialSegments : number , segmentPosition : number , start : number , unscaledStart : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media { | |
/** | |
* SegmentIndex. | |
*/ | |
class SegmentIndex implements shaka.extern.SegmentIndex , shaka.util.IReleasable , Iterable < shaka.media.SegmentReference > { | |
private noStructuralTyping_shaka_media_SegmentIndex : any; | |
/** | |
* SegmentIndex. | |
*/ | |
constructor (references : shaka.media.SegmentReference [] ) ; | |
//!! Symbol.iterator inserted by Clutz for Iterable subtype | |
[Symbol.iterator](): Iterator < shaka.media.SegmentReference > ; | |
/** | |
* Removes all SegmentReferences that end before the given time. | |
* @param time The time in seconds. | |
*/ | |
evict (time : number ) : any ; | |
find (time : any ) : any ; | |
/** | |
* Drops references that start after windowEnd, or end before windowStart, | |
* and contracts the last reference so that it ends at windowEnd. | |
* Do not call on the last period of a live presentation (unknown duration). | |
* It is okay to call on the other periods of a live presentation, where the | |
* duration is known and another period has been added. | |
* @param isNew Whether this is a new SegmentIndex and we shouldn't update the number of evicted elements. | |
*/ | |
fit (windowStart : number , windowEnd : number | null , isNew ? : boolean ) : any ; | |
get (position : any ) : any ; | |
/** | |
* Returns a new iterator that initially points to the segment that contains | |
* the given time, or the nearest independent segment before it. | |
* Like the normal iterator, next() must be called first to get to the first | |
* element. Returns null if we do not find a segment at the | |
* requested time. | |
* The first segment returned by the iterator _MUST_ be an independent | |
* segment. Assumes that only partial references can be dependent, based on | |
* RFC 8216 rev 13, section 8.1: "Each (non-Partial) Media Segment in a Media | |
* Playlist will contain at least one independent frame." | |
*/ | |
getIteratorForTime (time : number , allowNonIndependent ? : boolean , reverse ? : boolean ) : shaka.media.SegmentIterator | null ; | |
getNumEvicted ( ) : any ; | |
getNumReferences ( ) : any ; | |
/** | |
* Marks the index as immutable. Segments cannot be added or removed after | |
* this point. This doesn't affect the references themselves. This also | |
* makes the destroy/release methods do nothing. | |
* This is mainly for testing. | |
*/ | |
markImmutable ( ) : any ; | |
/** | |
* Merges the given SegmentReferences and evicts the ones that end before the | |
* given time. Supports extending the original references only. | |
* Will not replace old references or interleave new ones. | |
* Used, for example, by the DASH and HLS parser, where manifests may not list | |
* all available references, so we must keep available references in memory to | |
* fill the availability window. | |
* @param references The list of SegmentReferences, which must be sorted first by their start times (ascending) and second by their end times (ascending). | |
* @param windowStart The start of the availability window to filter out the references that are no longer available. | |
*/ | |
mergeAndEvict (references : shaka.media.SegmentReference [] , windowStart : number ) : any ; | |
/** | |
* Offset all segment references by a fixed amount. | |
* @param offset The amount to add to each segment's start and end times. | |
*/ | |
offset (offset : number ) : any ; | |
release ( ) : any ; | |
/** | |
* Updates the references every so often. Stops when the references list | |
* returned by the callback is null. | |
* @param interval The interval in seconds. | |
*/ | |
updateEvery (interval : number , updateCallback : ( ) => ( shaka.media.SegmentReference | null ) [] | null ) : any ; | |
/** | |
* Create a SegmentIndex for a single segment of the given start time and | |
* duration at the given URIs. | |
*/ | |
static forSingleSegment (startTime : number , duration : number , uris : string [] ) : shaka.media.SegmentIndex ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media { | |
/** | |
* An iterator over a SegmentIndex's references. | |
*/ | |
class SegmentIterator implements Iterator < shaka.media.SegmentReference | null > { | |
private noStructuralTyping_shaka_media_SegmentIterator : any; | |
/** | |
* An iterator over a SegmentIndex's references. | |
*/ | |
constructor (segmentIndex : shaka.media.SegmentIndex | null , index : number , partialSegmentIndex : number , reverse : boolean ) ; | |
current ( ) : shaka.media.SegmentReference | null ; | |
currentPosition ( ) : number ; | |
next ( ) : any ; | |
resetToLastIndependent ( ) : any ; | |
setReverse (reverse : boolean ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media.SegmentPrefetch { | |
type FetchDispatcher = (a : shaka.media.InitSegmentReference | shaka.media.SegmentReference , b : shaka.extern.Stream , c ? : ( (a : ArrayBuffer | ArrayBufferView ) => Promise < any > ) | null ) => shaka.net.NetworkingEngine.PendingRequest ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media { | |
/** | |
* SegmentReference provides the start time, end time, and location to a media | |
* segment. | |
*/ | |
class SegmentReference { | |
private noStructuralTyping_shaka_media_SegmentReference : any; | |
constructor (startTime : number , endTime : number , uris : ( ) => string [] , startByte : number , endByte : number | null , initSegmentReference : shaka.media.InitSegmentReference | null , timestampOffset : number , appendWindowStart : number , appendWindowEnd : number , partialReferences ? : shaka.media.SegmentReference [] , tilesLayout ? : string | null , tileDuration ? : number | null , syncTime ? : number | null , status ? : shaka.media.SegmentReference.Status , aesKey ? : shaka.extern.aesKey | null , allPartialSegments ? : boolean ) ; | |
/** | |
* Returns the offset from the start of the resource to the end of the | |
* segment, inclusive. A value of null indicates that the segment extends to | |
* the end of the resource. | |
*/ | |
getEndByte ( ) : number | null ; | |
/** | |
* Returns the segment's end time in seconds. | |
*/ | |
getEndTime ( ) : number ; | |
/** | |
* Return the segment data. | |
*/ | |
getSegmentData ( ) : ArrayBuffer | ArrayBufferView | null ; | |
/** | |
* Returns the offset from the start of the resource to the | |
* start of the segment. | |
*/ | |
getStartByte ( ) : number ; | |
/** | |
* Returns the segment's start time in seconds. | |
*/ | |
getStartTime ( ) : number ; | |
/** | |
* Returns the segment's status. | |
*/ | |
getStatus ( ) : shaka.media.SegmentReference.Status ; | |
/** | |
* Returns the segment's thumbnail sprite. | |
*/ | |
getThumbnailSprite ( ) : shaka.media.SegmentReference.ThumbnailSprite | null ; | |
/** | |
* Returns the segment's explicit tile duration. | |
* Only defined in image segments. | |
*/ | |
getTileDuration ( ) : number | null ; | |
/** | |
* Returns the segment's tiles layout. Only defined in image segments. | |
*/ | |
getTilesLayout ( ) : string | null ; | |
/** | |
* Creates and returns the URIs of the resource containing the segment. | |
*/ | |
getUris ( ) : string [] ; | |
/** | |
* Returns true if the segment has a byterange optimization. | |
*/ | |
hasByterangeOptimization ( ) : boolean ; | |
/** | |
* Returns true if the segment is independent. | |
*/ | |
isIndependent ( ) : boolean ; | |
/** | |
* Returns true if reference as being the last part of the full segment. | |
*/ | |
isLastPartial ( ) : boolean ; | |
/** | |
* Returns true if the segment is partial. | |
*/ | |
isPartial ( ) : boolean ; | |
/** | |
* Returns true if the segment is preloaded. | |
*/ | |
isPreload ( ) : boolean ; | |
/** | |
* Mark the reference as byterange optimization. | |
* The "byterange optimization" means that it is playable using MP4 low | |
* latency streaming with chunked data. | |
*/ | |
markAsByterangeOptimization ( ) : any ; | |
/** | |
* Mark the reference as being the last part of the full segment | |
*/ | |
markAsLastPartial ( ) : any ; | |
/** | |
* Mark the reference as non-independent. | |
*/ | |
markAsNonIndependent ( ) : any ; | |
/** | |
* Mark the reference as partial. | |
*/ | |
markAsPartial ( ) : any ; | |
/** | |
* Mark the reference as preload. | |
*/ | |
markAsPreload ( ) : any ; | |
/** | |
* Mark the reference as unavailable. | |
*/ | |
markAsUnavailable ( ) : any ; | |
/** | |
* Offset the segment reference by a fixed amount. | |
* @param offset The amount to add to the segment's start and end times. | |
*/ | |
offset (offset : number ) : any ; | |
/** | |
* Set the segment data. | |
*/ | |
setSegmentData (segmentData : ArrayBuffer | ArrayBufferView ) : any ; | |
/** | |
* Set the segment's thumbnail sprite. | |
*/ | |
setThumbnailSprite (thumbnailSprite : shaka.media.SegmentReference.ThumbnailSprite ) : any ; | |
/** | |
* Sync this segment against a particular sync time that will serve as "0" in | |
* the presentation timeline. | |
*/ | |
syncAgainst (lowestSyncTime : number ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media.SegmentReference { | |
/** | |
* Rather than using booleans to communicate what the state of the reference, | |
* we have this enum. | |
*/ | |
/** | |
* Rather than using booleans to communicate what the state of the reference, | |
* we have this enum. | |
*/ | |
enum Status { | |
AVAILABLE = 0.0 , | |
MISSING = 2.0 , | |
UNAVAILABLE = 1.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.media.SegmentReference { | |
type ThumbnailSprite = { height : number , positionX : number , positionY : number , width : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.mss { | |
/** | |
* Creates a new MSS parser. | |
*/ | |
class MssParser implements shaka.extern.ManifestParser { | |
private noStructuralTyping_shaka_mss_MssParser : any; | |
banLocation (uri : any ) : any ; | |
configure (config : shaka.extern.ManifestConfiguration , isPreloadFn ? : ( ) => boolean ) : any ; | |
onExpirationUpdated (sessionId : any , expiration : any ) : any ; | |
onInitialVariantChosen (variant : any ) : any ; | |
setMediaElement (mediaElement : HTMLMediaElement | null ) : any ; | |
start (uri : any , playerInterface : any ) : any ; | |
stop ( ) : any ; | |
update ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net { | |
class DataUriPlugin { | |
private noStructuralTyping_shaka_net_DataUriPlugin : any; | |
static parse (uri : string , request : shaka.extern.Request , requestType : shaka.net.NetworkingEngine.RequestType , progressUpdated : shaka.extern.ProgressUpdated ) : shaka.extern.IAbortableOperation < any > ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net { | |
class HttpFetchPlugin { | |
private noStructuralTyping_shaka_net_HttpFetchPlugin : any; | |
/** | |
* Determine if the Fetch API is supported in the browser. Note: this is | |
* deliberately exposed as a method to allow the client app to use the same | |
* logic as Shaka when determining support. | |
*/ | |
static isSupported ( ) : boolean ; | |
static parse (uri : string , request : shaka.extern.Request , requestType : shaka.net.NetworkingEngine.RequestType , progressUpdated : shaka.extern.ProgressUpdated , headersReceived : shaka.extern.HeadersReceived , config : shaka.extern.SchemePluginConfig ) : shaka.extern.IAbortableOperation < any > ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net { | |
class HttpXHRPlugin { | |
private noStructuralTyping_shaka_net_HttpXHRPlugin : any; | |
static parse (uri : string , request : shaka.extern.Request , requestType : shaka.net.NetworkingEngine.RequestType , progressUpdated : shaka.extern.ProgressUpdated , headersReceived : shaka.extern.HeadersReceived , config : shaka.extern.SchemePluginConfig ) : shaka.extern.IAbortableOperation < any > ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net { | |
/** | |
* NetworkingEngine wraps all networking operations. This accepts plugins that | |
* handle the actual request. A plugin is registered using registerScheme. | |
* Each scheme has at most one plugin to handle the request. | |
*/ | |
class NetworkingEngine extends shaka.util.FakeEventTarget implements shaka.util.IDestroyable { | |
private noStructuralTyping_shaka_net_NetworkingEngine : any; | |
/** | |
* NetworkingEngine wraps all networking operations. This accepts plugins that | |
* handle the actual request. A plugin is registered using registerScheme. | |
* Each scheme has at most one plugin to handle the request. | |
*/ | |
constructor (onProgressUpdated ? : shaka.net.NetworkingEngine.onProgressUpdated , onHeadersReceived ? : shaka.net.NetworkingEngine.OnHeadersReceived , onDownloadCompleted ? : shaka.net.NetworkingEngine.OnDownloadCompleted , onDownloadFailed ? : shaka.net.NetworkingEngine.OnDownloadFailed , onRequest ? : shaka.net.NetworkingEngine.OnRequest , onRetry ? : shaka.net.NetworkingEngine.OnRetry , onResponse ? : shaka.net.NetworkingEngine.OnResponse ) ; | |
/** | |
* Clears all request filters. | |
*/ | |
clearAllRequestFilters ( ) : any ; | |
/** | |
* Clears all response filters. | |
*/ | |
clearAllResponseFilters ( ) : any ; | |
/** | |
* Clears Common Access Token map. | |
*/ | |
clearCommonAccessTokenMap ( ) : any ; | |
destroy ( ) : Promise < any > ; | |
/** | |
* Registers a new request filter. All filters are applied in the order they | |
* are registered. | |
*/ | |
registerRequestFilter (filter : shaka.extern.RequestFilter ) : any ; | |
/** | |
* Registers a new response filter. All filters are applied in the order they | |
* are registered. | |
*/ | |
registerResponseFilter (filter : shaka.extern.ResponseFilter ) : any ; | |
/** | |
* Makes a network request and returns the resulting data. | |
*/ | |
request (type : shaka.net.NetworkingEngine.RequestType , request : shaka.extern.Request , context ? : shaka.extern.RequestContext ) : shaka.net.NetworkingEngine.PendingRequest ; | |
setForceHTTP (forceHTTP : boolean ) : any ; | |
setForceHTTPS (forceHTTPS : boolean ) : any ; | |
/** | |
* Removes a request filter. | |
*/ | |
unregisterRequestFilter (filter : shaka.extern.RequestFilter ) : any ; | |
/** | |
* Removes a response filter. | |
*/ | |
unregisterResponseFilter (filter : shaka.extern.ResponseFilter ) : any ; | |
/** | |
* Gets a copy of the default retry parameters. | |
*/ | |
static defaultRetryParameters ( ) : shaka.extern.RetryParameters ; | |
/** | |
* Makes a simple network request for the given URIs. | |
*/ | |
static makeRequest (uris : string [] , retryParams : shaka.extern.RetryParameters , streamDataCallback ? : ( (a : ArrayBuffer | ArrayBufferView ) => Promise < any > ) | null ) : shaka.extern.Request ; | |
/** | |
* Registers a scheme plugin. This plugin will handle all requests with the | |
* given scheme. If a plugin with the same scheme already exists, it is | |
* replaced, unless the existing plugin is of higher priority. | |
* If no priority is provided, this defaults to the highest priority of | |
* APPLICATION. | |
*/ | |
static registerScheme (scheme : string , plugin : shaka.extern.SchemePlugin , priority ? : number , progressSupport ? : boolean ) : any ; | |
/** | |
* Removes a scheme plugin. | |
*/ | |
static unregisterScheme (scheme : string ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net.NetworkingEngine { | |
/** | |
* A more advanced form of the RequestType structure, meant to describe | |
* sub-types of basic request types. | |
* For example, an INIT_SEGMENT is a sub-type of SEGMENT. | |
* This is meant to allow for more specificity to be added to the request type | |
* data, without breaking backwards compatibility. | |
*/ | |
/** | |
* A more advanced form of the RequestType structure, meant to describe | |
* sub-types of basic request types. | |
* For example, an INIT_SEGMENT is a sub-type of SEGMENT. | |
* This is meant to allow for more specificity to be added to the request type | |
* data, without breaking backwards compatibility. | |
*/ | |
enum AdvancedRequestType { | |
INIT_SEGMENT = 0.0 , | |
INTERSTITIAL_AD_URL = 12.0 , | |
INTERSTITIAL_ASSET_LIST = 11.0 , | |
MASTER_PLAYLIST = 3.0 , | |
MEDIATAILOR_SESSION_INFO = 7.0 , | |
MEDIATAILOR_STATIC_RESOURCE = 9.0 , | |
MEDIATAILOR_TRACKING_EVENT = 10.0 , | |
MEDIATAILOR_TRACKING_INFO = 8.0 , | |
MEDIA_PLAYLIST = 2.0 , | |
MEDIA_SEGMENT = 1.0 , | |
MPD = 4.0 , | |
MPD_PATCH = 6.0 , | |
MSS = 5.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net.NetworkingEngine { | |
/** | |
* A wrapper class for the number of bytes remaining to be downloaded for the | |
* request. | |
* Instead of using PendingRequest directly, this class is needed to be sent to | |
* plugin as a parameter, and a Promise is returned, before PendingRequest is | |
* created. | |
*/ | |
class NumBytesRemainingClass { | |
private noStructuralTyping_shaka_net_NetworkingEngine_NumBytesRemainingClass : any; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net.NetworkingEngine { | |
type OnDownloadCompleted = (a : shaka.extern.Request , b : shaka.extern.Response ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net.NetworkingEngine { | |
type OnDownloadFailed = (a : shaka.extern.Request , b : shaka.util.Error | null , c : number , d : boolean ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net.NetworkingEngine { | |
type OnHeadersReceived = (a : { [ key: string ]: string } , b : shaka.extern.Request , c : shaka.net.NetworkingEngine.RequestType ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net.NetworkingEngine { | |
type OnRequest = (a : shaka.net.NetworkingEngine.RequestType , b : shaka.extern.Request , c : shaka.extern.RequestContext | undefined ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net.NetworkingEngine { | |
type OnResponse = (a : shaka.net.NetworkingEngine.RequestType , b : shaka.extern.Response , c : shaka.extern.RequestContext | undefined ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net.NetworkingEngine { | |
type OnRetry = (a : shaka.net.NetworkingEngine.RequestType , b : shaka.extern.RequestContext | undefined , c : string , d : string ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net.NetworkingEngine { | |
/** | |
* A pending network request. This can track the current progress of the | |
* download, and allows the request to be aborted if the network is slow. | |
*/ | |
class PendingRequest extends shaka.util.AbortableOperation < any > implements shaka.extern.IAbortableOperation < any > { | |
private noStructuralTyping_shaka_net_NetworkingEngine_PendingRequest : any; | |
/** | |
* A pending network request. This can track the current progress of the | |
* download, and allows the request to be aborted if the network is slow. | |
*/ | |
constructor (promise : Promise < any > , onAbort : shaka.extern.CreateSegmentIndexFunction , numBytesRemainingObj : shaka.net.NetworkingEngine.NumBytesRemainingClass | null ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net.NetworkingEngine { | |
/** | |
* Priority level for network scheme plugins. | |
* If multiple plugins are provided for the same scheme, only the | |
* highest-priority one is used. | |
*/ | |
/** | |
* Priority level for network scheme plugins. | |
* If multiple plugins are provided for the same scheme, only the | |
* highest-priority one is used. | |
*/ | |
enum PluginPriority { | |
APPLICATION = 3.0 , | |
FALLBACK = 1.0 , | |
PREFERRED = 2.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net.NetworkingEngine { | |
/** | |
* Request types. Allows a filter to decide which requests to read/alter. | |
*/ | |
/** | |
* Request types. Allows a filter to decide which requests to read/alter. | |
*/ | |
enum RequestType { | |
ADS = 7.0 , | |
APP = 3.0 , | |
CONTENT_STEERING = 8.0 , | |
KEY = 6.0 , | |
LICENSE = 2.0 , | |
MANIFEST = 0.0 , | |
SEGMENT = 1.0 , | |
SERVER_CERTIFICATE = 5.0 , | |
TIMING = 4.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.net.NetworkingEngine { | |
type onProgressUpdated = (a : number , b : number , c : boolean , d ? : shaka.extern.Request ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.offline { | |
class OfflineScheme { | |
private noStructuralTyping_shaka_offline_OfflineScheme : any; | |
static plugin (uri : string , request : shaka.extern.Request , requestType : shaka.net.NetworkingEngine.RequestType , progressUpdated : shaka.extern.ProgressUpdated ) : shaka.extern.IAbortableOperation < any > ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.offline { | |
class Storage implements shaka.util.IDestroyable { | |
private noStructuralTyping_shaka_offline_Storage : any; | |
constructor (player ? : shaka.Player ) ; | |
/** | |
* Sets configuration values for Storage. This is associated with | |
* Player.configure and will change the player instance given at | |
* initialization. | |
* @param config This should either be a field name or an object following the form of {@link shaka.extern.PlayerConfiguration}, where you may omit any field you do not wish to change. | |
* @param value This should be provided if the previous parameter was a string field name. | |
*/ | |
configure (config : string | object , value ? : any ) : boolean ; | |
destroy ( ) : Promise < any > ; | |
/** | |
* Return a copy of the current configuration. Modifications of the returned | |
* value will not affect the Storage instance's active configuration. You | |
* must call storage.configure() to make changes. | |
*/ | |
getConfiguration ( ) : shaka.extern.PlayerConfiguration ; | |
/** | |
* Return the networking engine that storage is using. If storage was | |
* initialized with a player instance, then the networking engine returned | |
* will be the same as |player.getNetworkingEngine()|. | |
* The returned value will only be null if |destroy| was called before | |
* |getNetworkingEngine|. | |
*/ | |
getNetworkingEngine ( ) : shaka.net.NetworkingEngine | null ; | |
/** | |
* Lists all the stored content available. | |
*/ | |
list ( ) : Promise < shaka.extern.StoredContent [] > ; | |
/** | |
* Removes the given stored content. This will also attempt to release the | |
* licenses, if any. | |
*/ | |
remove (contentUri : string ) : Promise < any > ; | |
/** | |
* Removes any EME sessions that were not successfully removed before. This | |
* returns whether all the sessions were successfully removed. | |
*/ | |
removeEmeSessions ( ) : Promise < boolean > ; | |
/** | |
* Stores the given manifest. If the content is encrypted, and encrypted | |
* content cannot be stored on this platform, the Promise will be rejected | |
* with error code 6001, REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE. | |
* Multiple assets can be downloaded at the same time, but note that since | |
* the storage instance has a single networking engine, multiple storage | |
* objects will be necessary if some assets require unique network filters. | |
* This snapshots the storage config at the time of the call, so it will not | |
* honor any changes to config mid-store operation. | |
* @param uri The URI of the manifest to store. | |
* @param appMetadata An arbitrary object from the application that will be stored along-side the offline content. Use this for any application-specific metadata you need associated with the stored content. For details on the data types that can be stored here, please refer to {@link https://bit.ly/StructClone} | |
* @param mimeType The mime type for the content |manifestUri| points to. | |
* @param externalThumbnails The external thumbnails to store along the main content. | |
* @param externalText The external text to store along the main content. | |
*/ | |
store (uri : string , appMetadata ? : object , mimeType ? : string | null , externalThumbnails ? : string [] | null , externalText ? : shaka.extern.ExtraText [] | null ) : shaka.extern.IAbortableOperation < any > ; | |
/** | |
* Delete the on-disk storage and all the content it contains. This should not | |
* be done in normal circumstances. Only do it when storage is rendered | |
* unusable, such as by a version mismatch. No business logic will be run, and | |
* licenses will not be released. | |
*/ | |
static deleteAll ( ) : Promise < any > ; | |
/** | |
* Gets whether offline storage is supported. Returns true if offline storage | |
* is supported for clear content. Support for offline storage of encrypted | |
* content will not be determined until storage is attempted. | |
*/ | |
static support ( ) : boolean ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.offline { | |
/** | |
* StorageMuxer is responsible for managing StorageMechanisms and addressing | |
* cells. The primary purpose of the muxer is to give the caller the correct | |
* cell for the operations they want to perform. | |
* |findActive| will be used when the caller wants a cell that supports | |
* add-operations. This will be used when saving new content to storage. | |
* |findAll| will be used when the caller want to look at all the content | |
* in storage. | |
* |resolvePath| will be used to convert a path (from |findActive| and | |
* |findAll|) into a cell, which it then returns. | |
*/ | |
class StorageMuxer implements shaka.util.IDestroyable { | |
private noStructuralTyping_shaka_offline_StorageMuxer : any; | |
/** | |
* Free all resources used by the muxer, mechanisms, and cells. This should | |
* not affect the stored content. | |
*/ | |
destroy ( ) : Promise < any > ; | |
/** | |
* Register a storage mechanism for use with the default storage muxer. This | |
* will have no effect on any storage muxer already in main memory. | |
*/ | |
static register (name : string , factory : ( ) => shaka.extern.StorageMechanism | null ) : any ; | |
/** | |
* Unregister a storage mechanism for use with the default storage muxer. This | |
* will have no effect on any storage muxer already in main memory. | |
* @param name The name that the storage mechanism was registered under. | |
*/ | |
static unregister (name : string ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka { | |
class polyfill { | |
private noStructuralTyping_shaka_polyfill : any; | |
/** | |
* Install all polyfills. | |
*/ | |
static installAll ( ) : any ; | |
/** | |
* Registers a new polyfill to be installed. | |
* @param priority An optional number priority. Higher priorities will be executed before lower priority ones. Default is 0. | |
*/ | |
static register (polyfill : ( ) => any , priority ? : number ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class Aria { | |
private noStructuralTyping_shaka_polyfill_Aria : any; | |
/** | |
* Install the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class EncryptionScheme { | |
private noStructuralTyping_shaka_polyfill_EncryptionScheme : any; | |
/** | |
* Install the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class Fullscreen { | |
private noStructuralTyping_shaka_polyfill_Fullscreen : any; | |
/** | |
* Install the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class MediaCapabilities { | |
private noStructuralTyping_shaka_polyfill_MediaCapabilities : any; | |
/** | |
* Install the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
/** | |
* A copy of the MediaCapabilities instance, to prevent Safari from | |
* garbage-collecting the polyfilled method on it. We make it public and export | |
* it to ensure that it is not stripped out by the compiler. | |
*/ | |
static originalMcap : any | null ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class MediaSource { | |
private noStructuralTyping_shaka_polyfill_MediaSource : any; | |
/** | |
* Install the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class Orientation { | |
private noStructuralTyping_shaka_polyfill_Orientation : any; | |
/** | |
* Install the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class PatchedMediaKeysApple { | |
private noStructuralTyping_shaka_polyfill_PatchedMediaKeysApple : any; | |
/** | |
* Installs the polyfill if needed. | |
* @param enableUninstall enables uninstalling the polyfill | |
*/ | |
static install (enableUninstall ? : boolean ) : any ; | |
/** | |
* Uninstalls the polyfill if needed and enabled. | |
*/ | |
static uninstall ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class PatchedMediaKeysCert { | |
private noStructuralTyping_shaka_polyfill_PatchedMediaKeysCert : any; | |
/** | |
* Installs the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class PatchedMediaKeysWebkit { | |
private noStructuralTyping_shaka_polyfill_PatchedMediaKeysWebkit : any; | |
/** | |
* Installs the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class PiPWebkit { | |
private noStructuralTyping_shaka_polyfill_PiPWebkit : any; | |
/** | |
* Install the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class RandomUUID { | |
private noStructuralTyping_shaka_polyfill_RandomUUID : any; | |
/** | |
* Install the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class Symbol { | |
private noStructuralTyping_shaka_polyfill_Symbol : any; | |
/** | |
* Install the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class VTTCue { | |
private noStructuralTyping_shaka_polyfill_VTTCue : any; | |
/** | |
* Install the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class VideoPlayPromise { | |
private noStructuralTyping_shaka_polyfill_VideoPlayPromise : any; | |
/** | |
* Install the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.polyfill { | |
class VideoPlaybackQuality { | |
private noStructuralTyping_shaka_polyfill_VideoPlaybackQuality : any; | |
/** | |
* Install the polyfill if needed. | |
*/ | |
static install ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
class Cue { | |
private noStructuralTyping_shaka_text_Cue : any; | |
constructor (startTime : number , endTime : number , payload : string ) ; | |
/** | |
* Text background color as a CSS color, e.g. "#FFFFFF" or "white". | |
*/ | |
backgroundColor : string ; | |
/** | |
* The URL of the background image, e.g. "data:[mime type];base64,[data]". | |
*/ | |
backgroundImage : string ; | |
/** | |
* The border around this cue as a CSS border. | |
*/ | |
border : string ; | |
/** | |
* The number of horizontal and vertical cells into which the Root Container | |
* Region area is divided. | |
*/ | |
cellResolution : { columns : number , rows : number } ; | |
/** | |
* Text color as a CSS color, e.g. "#FFFFFF" or "white". | |
*/ | |
color : string ; | |
/** | |
* Text direction of the cue. | |
*/ | |
direction : shaka.text.Cue.direction ; | |
/** | |
* Vertical alignments of the cues within their extents. | |
* 'BEFORE' means displaying the captions at the top of the text display | |
* container box, 'CENTER' means in the middle, 'AFTER' means at the bottom. | |
*/ | |
displayAlign : shaka.text.Cue.displayAlign ; | |
/** | |
* The end time of the cue in seconds, relative to the start of the | |
* presentation. | |
*/ | |
endTime : number ; | |
/** | |
* Text font family. | |
*/ | |
fontFamily : string ; | |
/** | |
* Text font size in px or em (e.g. '100px'/'100em'). | |
*/ | |
fontSize : string ; | |
/** | |
* Text font style. Normal, italic or oblique. | |
*/ | |
fontStyle : shaka.text.Cue.fontStyle ; | |
/** | |
* Text font weight. Either normal or bold. | |
*/ | |
fontWeight : shaka.text.Cue.fontWeight ; | |
/** | |
* Id of the cue. | |
*/ | |
id : string ; | |
/** | |
* If true, this represents a container element that is "above" the main | |
* cues. For example, the <body> and <div> tags that contain the <p> tags | |
* in a TTML file. This controls the flow of the final cues; any nested cues | |
* within an "isContainer" cue will be laid out as separate lines. | |
*/ | |
isContainer : boolean ; | |
/** | |
* Text letter spacing as a CSS letter-spacing value. | |
*/ | |
letterSpacing : string ; | |
/** | |
* The offset from the display box in either number of lines or | |
* percentage depending on the value of lineInterpretation. | |
*/ | |
line : number | null ; | |
/** | |
* Line alignment of the cue box. | |
* Start alignment means the cue box’s top side (for horizontal cues), left | |
* side (for vertical growing right), or right side (for vertical growing | |
* left) is aligned at the line. | |
* Center alignment means the cue box is centered at the line. | |
* End alignment The cue box’s bottom side (for horizontal cues), right side | |
* (for vertical growing right), or left side (for vertical growing left) is | |
* aligned at the line. | |
*/ | |
lineAlign : shaka.text.Cue.lineAlign ; | |
/** | |
* Whether or not the cue only acts as a line break between two nested cues. | |
* Should only appear in nested cues. | |
*/ | |
lineBreak : boolean ; | |
/** | |
* Separation between line areas inside the cue box in px or em | |
* (e.g. '100px'/'100em'). If not specified, this should be no less than | |
* the largest font size applied to the text in the cue. | |
*/ | |
lineHeight : string ; | |
/** | |
* The way to interpret line field. (Either as an integer line number or | |
* percentage from the display box). | |
*/ | |
lineInterpretation : shaka.text.Cue.lineInterpretation ; | |
/** | |
* Text line padding as a CSS line-padding value. | |
*/ | |
linePadding : string ; | |
/** | |
* Nested cues, which should be laid out horizontally in one block. | |
* Top-level cues are blocks, and nested cues are inline elements. | |
* Cues can be nested arbitrarily deeply. | |
*/ | |
nestedCues : shaka.text.Cue [] ; | |
/** | |
* Opacity of the cue element, from 0-1. | |
*/ | |
opacity : number ; | |
/** | |
* The text payload of the cue. If nestedCues is non-empty, this should be | |
* empty. Top-level block containers should have no payload of their own. | |
*/ | |
payload : string ; | |
/** | |
* The indent (in percent) of the cue box in the direction defined by the | |
* writing direction. | |
*/ | |
position : number | null ; | |
/** | |
* Position alignment of the cue. | |
*/ | |
positionAlign : shaka.text.Cue.positionAlign ; | |
/** | |
* The region to render the cue into. Only supported on top-level cues, | |
* because nested cues are inline elements. | |
*/ | |
region : shaka.text.CueRegion | null ; | |
/** | |
* Used to indicate the type of ruby tag that should be used when rendering | |
* the cue. Valid values: ruby, rp, rt. | |
*/ | |
rubyTag : string | null ; | |
/** | |
* Size of the cue box (in percents), where 0 means "auto". | |
*/ | |
size : number ; | |
/** | |
* The start time of the cue in seconds, relative to the start of the | |
* presentation. | |
*/ | |
startTime : number ; | |
/** | |
* Alignment of the text inside the cue box. | |
*/ | |
textAlign : shaka.text.Cue.textAlign ; | |
/** | |
* Text combine upright as a CSS text-combine-upright value. | |
*/ | |
textCombineUpright : string ; | |
/** | |
* Text decoration. A combination of underline, overline | |
* and line through. Empty array means no decoration. | |
*/ | |
textDecoration : shaka.text.Cue.textDecoration [] ; | |
/** | |
* Text shadow color as a CSS text-shadow value. | |
*/ | |
textShadow : string ; | |
/** | |
* Text stroke color as a CSS color, e.g. "#FFFFFF" or "white". | |
*/ | |
textStrokeColor : string ; | |
/** | |
* Text stroke width as a CSS stroke-width value. | |
*/ | |
textStrokeWidth : string ; | |
/** | |
* Whether or not line wrapping should be applied to the cue. | |
*/ | |
wrapLine : boolean ; | |
/** | |
* Text writing mode of the cue. | |
*/ | |
writingMode : shaka.text.Cue.writingMode ; | |
/** | |
* Parses cue payload, searches for styling entities and, if needed, | |
* modifies original payload and creates nested cues to better represent | |
* styling found in payload. All changes are done in-place. | |
*/ | |
static parseCuePayload (cue : shaka.text.Cue , styles ? : Map < string , shaka.text.Cue > ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.Cue { | |
/** | |
* Default text background color according to | |
* https://w3c.github.io/webvtt/#default-text-background | |
*/ | |
/** | |
* Default text background color according to | |
* https://w3c.github.io/webvtt/#default-text-background | |
*/ | |
enum defaultTextBackgroundColor { | |
bg_black = 'black' , | |
bg_blue = 'blue' , | |
bg_cyan = 'cyan' , | |
bg_lime = 'lime' , | |
bg_magenta = 'magenta' , | |
bg_red = 'red' , | |
bg_white = 'white' , | |
bg_yellow = 'yellow' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.Cue { | |
/** | |
* Default text color according to | |
* https://w3c.github.io/webvtt/#default-text-color | |
*/ | |
/** | |
* Default text color according to | |
* https://w3c.github.io/webvtt/#default-text-color | |
*/ | |
enum defaultTextColor { | |
black = 'black' , | |
blue = 'blue' , | |
cyan = 'cyan' , | |
lime = 'lime' , | |
magenta = 'magenta' , | |
red = 'red' , | |
white = 'white' , | |
yellow = 'yellow' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.Cue { | |
enum direction { | |
HORIZONTAL_LEFT_TO_RIGHT = 'ltr' , | |
HORIZONTAL_RIGHT_TO_LEFT = 'rtl' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.Cue { | |
/** | |
* Vertical alignments of the cues within their extents. | |
* 'BEFORE' means displaying at the top of the captions container box, 'CENTER' | |
* means in the middle, 'AFTER' means at the bottom. | |
*/ | |
/** | |
* Vertical alignments of the cues within their extents. | |
* 'BEFORE' means displaying at the top of the captions container box, 'CENTER' | |
* means in the middle, 'AFTER' means at the bottom. | |
*/ | |
enum displayAlign { | |
AFTER = 'after' , | |
BEFORE = 'before' , | |
CENTER = 'center' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.Cue { | |
enum fontStyle { | |
ITALIC = 'italic' , | |
NORMAL = 'normal' , | |
OBLIQUE = 'oblique' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.Cue { | |
/** | |
* In CSS font weight can be a number, where 400 is normal and 700 is bold. | |
* Use these values for the enum for consistency. | |
*/ | |
/** | |
* In CSS font weight can be a number, where 400 is normal and 700 is bold. | |
* Use these values for the enum for consistency. | |
*/ | |
enum fontWeight { | |
BOLD = 700.0 , | |
NORMAL = 400.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.Cue { | |
enum lineAlign { | |
CENTER = 'center' , | |
END = 'end' , | |
START = 'start' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.Cue { | |
enum lineInterpretation { | |
LINE_NUMBER = 0.0 , | |
PERCENTAGE = 1.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.Cue { | |
enum positionAlign { | |
AUTO = 'auto' , | |
CENTER = 'center' , | |
LEFT = 'line-left' , | |
RIGHT = 'line-right' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.Cue { | |
enum textAlign { | |
CENTER = 'center' , | |
END = 'end' , | |
LEFT = 'left' , | |
RIGHT = 'right' , | |
START = 'start' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.Cue { | |
enum textDecoration { | |
LINE_THROUGH = 'lineThrough' , | |
OVERLINE = 'overline' , | |
UNDERLINE = 'underline' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.Cue { | |
enum writingMode { | |
HORIZONTAL_TOP_TO_BOTTOM = 'horizontal-tb' , | |
VERTICAL_LEFT_TO_RIGHT = 'vertical-lr' , | |
VERTICAL_RIGHT_TO_LEFT = 'vertical-rl' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
class CueRegion { | |
private noStructuralTyping_shaka_text_CueRegion : any; | |
/** | |
* The width of the rendering area in heightUnits. | |
*/ | |
height : number ; | |
/** | |
* The units (percentage, pixels or lines) the region height is in. | |
*/ | |
heightUnits : shaka.text.CueRegion.units ; | |
/** | |
* Region identifier. | |
*/ | |
id : string ; | |
/** | |
* The X offset to start the rendering area in percentage (0-100) of this | |
* region width. | |
*/ | |
regionAnchorX : number ; | |
/** | |
* The Y offset to start the rendering area in percentage (0-100) of the | |
* region height. | |
*/ | |
regionAnchorY : number ; | |
/** | |
* If scroll=UP, it means that cues in the region will be added to the | |
* bottom of the region and will push any already displayed cues in the | |
* region up. Otherwise (scroll=NONE) cues will stay fixed at the location | |
* they were first painted in. | |
*/ | |
scroll : shaka.text.CueRegion.scrollMode ; | |
/** | |
* The units (percentage or pixels) the region viewportAnchors are in. | |
*/ | |
viewportAnchorUnits : shaka.text.CueRegion.units ; | |
/** | |
* The X offset to start the rendering area in viewportAnchorUnits of the | |
* video width. | |
*/ | |
viewportAnchorX : number ; | |
/** | |
* The X offset to start the rendering area in viewportAnchorUnits of the | |
* video height. | |
*/ | |
viewportAnchorY : number ; | |
/** | |
* The width of the rendering area in widthUnits. | |
*/ | |
width : number ; | |
/** | |
* The units (percentage or pixels) the region width is in. | |
*/ | |
widthUnits : shaka.text.CueRegion.units ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.CueRegion { | |
enum scrollMode { | |
NONE = '' , | |
UP = 'up' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text.CueRegion { | |
enum units { | |
LINES = 2.0 , | |
PERCENTAGE = 1.0 , | |
PX = 0.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
/** | |
* LRC file format: https://en.wikipedia.org/wiki/LRC_(file_format) | |
*/ | |
class LrcTextParser implements shaka.extern.TextParser { | |
private noStructuralTyping_shaka_text_LrcTextParser : any; | |
parseInit (data : any ) : any ; | |
parseMedia (data : any , time : any ) : any ; | |
setManifestType (manifestType : any ) : any ; | |
setSequenceMode (sequenceMode : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
class Mp4TtmlParser implements shaka.extern.TextParser { | |
private noStructuralTyping_shaka_text_Mp4TtmlParser : any; | |
parseInit (data : any ) : any ; | |
parseMedia (data : any , time : any , uri : any ) : any ; | |
setManifestType (manifestType : any ) : any ; | |
setSequenceMode (sequenceMode : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
class Mp4VttParser implements shaka.extern.TextParser { | |
private noStructuralTyping_shaka_text_Mp4VttParser : any; | |
parseInit (data : any ) : any ; | |
parseMedia (data : any , time : any ) : any ; | |
setManifestType (manifestType : any ) : any ; | |
setSequenceMode (sequenceMode : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
class SbvTextParser implements shaka.extern.TextParser { | |
private noStructuralTyping_shaka_text_SbvTextParser : any; | |
parseInit (data : any ) : any ; | |
parseMedia (data : any , time : any ) : any ; | |
setManifestType (manifestType : any ) : any ; | |
setSequenceMode (sequenceMode : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
/** | |
* A text displayer plugin using the browser's native VTTCue interface. | |
*/ | |
class SimpleTextDisplayer implements shaka.extern.TextDisplayer { | |
private noStructuralTyping_shaka_text_SimpleTextDisplayer : any; | |
/** | |
* A text displayer plugin using the browser's native VTTCue interface. | |
*/ | |
constructor (video : HTMLMediaElement | null , label : string ) ; | |
append (cues : any ) : any ; | |
configure (config : any ) : any ; | |
destroy ( ) : any ; | |
enableTextDisplayer ( ) : any ; | |
isTextVisible ( ) : any ; | |
remove (start : any , end : any ) : any ; | |
setTextLanguage (language : any ) : any ; | |
setTextVisibility (on : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
class SrtTextParser implements shaka.extern.TextParser { | |
private noStructuralTyping_shaka_text_SrtTextParser : any; | |
parseInit (data : any ) : any ; | |
parseMedia (data : any , time : any , uri : any ) : any ; | |
setManifestType (manifestType : any ) : any ; | |
setSequenceMode (sequenceMode : any ) : any ; | |
/** | |
* Convert a SRT format to WebVTT | |
*/ | |
static srt2webvtt (data : string ) : string ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
/** | |
* Documentation: http://moodub.free.fr/video/ass-specs.doc | |
* https://en.wikipedia.org/wiki/SubStation_Alpha | |
*/ | |
class SsaTextParser implements shaka.extern.TextParser { | |
private noStructuralTyping_shaka_text_SsaTextParser : any; | |
parseInit (data : any ) : any ; | |
parseMedia (data : any , time : any ) : any ; | |
setManifestType (manifestType : any ) : any ; | |
setSequenceMode (sequenceMode : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
/** | |
* A stub text displayer plugin that does nothing | |
*/ | |
class StubTextDisplayer implements shaka.extern.TextDisplayer { | |
private noStructuralTyping_shaka_text_StubTextDisplayer : any; | |
append (cues : any ) : any ; | |
configure (config : any ) : any ; | |
destroy ( ) : any ; | |
enableTextDisplayer ( ) : any ; | |
isTextVisible ( ) : any ; | |
remove (start : any , end : any ) : any ; | |
setTextLanguage (language : any ) : any ; | |
setTextVisibility (on : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
class TextEngine implements shaka.util.IDestroyable { | |
private noStructuralTyping_shaka_text_TextEngine : any; | |
constructor (displayer : shaka.extern.TextDisplayer | null ) ; | |
destroy ( ) : Promise < any > ; | |
static findParser (mimeType : any ) : ( shaka.extern.TextParserPlugin ) | null ; | |
static registerParser (mimeType : string , plugin : shaka.extern.TextParserPlugin ) : any ; | |
static unregisterParser (mimeType : string ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
class TtmlTextParser implements shaka.extern.TextParser { | |
private noStructuralTyping_shaka_text_TtmlTextParser : any; | |
parseInit (data : any ) : any ; | |
parseMedia (data : any , time : any , uri : any , images : any ) : any ; | |
setManifestType (manifestType : any ) : any ; | |
setSequenceMode (sequenceMode : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
/** | |
* The text displayer plugin for the Shaka Player UI. Can also be used directly | |
* by providing an appropriate container element. | |
*/ | |
class UITextDisplayer implements shaka.extern.TextDisplayer { | |
private noStructuralTyping_shaka_text_UITextDisplayer : any; | |
/** | |
* The text displayer plugin for the Shaka Player UI. Can also be used directly | |
* by providing an appropriate container element. | |
*/ | |
constructor (video : HTMLMediaElement | null , videoContainer : HTMLElement | null ) ; | |
append (cues : any ) : any ; | |
configure (config : any ) : any ; | |
destroy ( ) : any ; | |
enableTextDisplayer ( ) : any ; | |
isTextVisible ( ) : any ; | |
remove (start : any , end : any ) : any ; | |
setTextLanguage (language : any ) : any ; | |
setTextVisibility (on : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
class VttTextParser implements shaka.extern.TextParser { | |
private noStructuralTyping_shaka_text_VttTextParser : any; | |
parseInit (data : any ) : any ; | |
parseMedia (data : any , time : any ) : any ; | |
setManifestType (manifestType : any ) : any ; | |
setSequenceMode (sequenceMode : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.text { | |
class WebVttGenerator { | |
private noStructuralTyping_shaka_text_WebVttGenerator : any; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.transmuxer { | |
class AacTransmuxer implements shaka.extern.Transmuxer { | |
private noStructuralTyping_shaka_transmuxer_AacTransmuxer : any; | |
constructor (mimeType : string ) ; | |
convertCodecs (contentType : any , mimeType : any ) : any ; | |
destroy ( ) : any ; | |
getOriginalMimeType ( ) : any ; | |
/** | |
* Check if the mime type and the content type is supported. | |
*/ | |
isSupported (mimeType : string , contentType ? : string ) : boolean ; | |
transmux (data : any , stream : any , reference : any , duration : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.transmuxer { | |
class Ac3Transmuxer implements shaka.extern.Transmuxer { | |
private noStructuralTyping_shaka_transmuxer_Ac3Transmuxer : any; | |
constructor (mimeType : string ) ; | |
convertCodecs (contentType : any , mimeType : any ) : any ; | |
destroy ( ) : any ; | |
getOriginalMimeType ( ) : any ; | |
/** | |
* Check if the mime type and the content type is supported. | |
*/ | |
isSupported (mimeType : string , contentType ? : string ) : boolean ; | |
transmux (data : any , stream : any , reference : any , duration : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.transmuxer { | |
class Ec3Transmuxer implements shaka.extern.Transmuxer { | |
private noStructuralTyping_shaka_transmuxer_Ec3Transmuxer : any; | |
constructor (mimeType : string ) ; | |
convertCodecs (contentType : any , mimeType : any ) : any ; | |
destroy ( ) : any ; | |
getOriginalMimeType ( ) : any ; | |
/** | |
* Check if the mime type and the content type is supported. | |
*/ | |
isSupported (mimeType : string , contentType ? : string ) : boolean ; | |
transmux (data : any , stream : any , reference : any , duration : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.transmuxer { | |
class Mp3Transmuxer implements shaka.extern.Transmuxer { | |
private noStructuralTyping_shaka_transmuxer_Mp3Transmuxer : any; | |
constructor (mimeType : string ) ; | |
convertCodecs (contentType : any , mimeType : any ) : any ; | |
destroy ( ) : any ; | |
getOriginalMimeType ( ) : any ; | |
/** | |
* Check if the mime type and the content type is supported. | |
*/ | |
isSupported (mimeType : string , contentType ? : string ) : boolean ; | |
transmux (data : any , stream : any , reference : any , duration : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.transmuxer { | |
class MpegTsTransmuxer implements shaka.extern.Transmuxer { | |
private noStructuralTyping_shaka_transmuxer_MpegTsTransmuxer : any; | |
constructor (mimeType : string ) ; | |
convertCodecs (contentType : any , mimeType : any ) : any ; | |
destroy ( ) : any ; | |
getOriginalMimeType ( ) : any ; | |
/** | |
* Check if the mime type and the content type is supported. | |
*/ | |
isSupported (mimeType : string , contentType ? : string ) : boolean ; | |
transmux (data : any , stream : any , reference : any , duration : any , contentType : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.transmuxer { | |
class MssTransmuxer implements shaka.extern.Transmuxer { | |
private noStructuralTyping_shaka_transmuxer_MssTransmuxer : any; | |
constructor (mimeType : string ) ; | |
convertCodecs (contentType : any , mimeType : any ) : any ; | |
destroy ( ) : any ; | |
getOriginalMimeType ( ) : any ; | |
/** | |
* Check if the mime type and the content type is supported. | |
*/ | |
isSupported (mimeType : string , contentType ? : string ) : boolean ; | |
transmux (data : any , stream : any , reference : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.transmuxer { | |
class TransmuxerEngine implements shaka.util.IDestroyable { | |
private noStructuralTyping_shaka_transmuxer_TransmuxerEngine : any; | |
destroy ( ) : Promise < any > ; | |
static findTransmuxer (mimeType : string , contentType ? : string ) : ( shaka.extern.TransmuxerPlugin ) | null ; | |
static registerTransmuxer (mimeType : string , plugin : shaka.extern.TransmuxerPlugin , priority : number ) : any ; | |
static unregisterTransmuxer (mimeType : string , priority : number ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.transmuxer.TransmuxerEngine { | |
/** | |
* Priority level for transmuxer plugins. | |
* If multiple plugins are provided for the same mime type, only the | |
* highest-priority one is used. | |
*/ | |
/** | |
* Priority level for transmuxer plugins. | |
* If multiple plugins are provided for the same mime type, only the | |
* highest-priority one is used. | |
*/ | |
enum PluginPriority { | |
APPLICATION = 4.0 , | |
FALLBACK = 1.0 , | |
PREFERRED = 3.0 , | |
PREFERRED_SECONDARY = 2.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.transmuxer { | |
class TsTransmuxer implements shaka.extern.Transmuxer { | |
private noStructuralTyping_shaka_transmuxer_TsTransmuxer : any; | |
constructor (mimeType : string ) ; | |
convertCodecs (contentType : any , mimeType : any ) : any ; | |
destroy ( ) : any ; | |
getOriginalMimeType ( ) : any ; | |
/** | |
* Check if the mime type and the content type is supported. | |
*/ | |
isSupported (mimeType : string , contentType ? : string ) : boolean ; | |
transmux (data : any , stream : any , reference : any , duration : any , contentType : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class AdCounter extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_AdCounter : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class AdPosition extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_AdPosition : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class AdStatisticsButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_AdStatisticsButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class AirPlayButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_AirPlayButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class AudioLanguageSelection extends shaka.ui.SettingsMenu { | |
private noStructuralTyping_shaka_ui_AudioLanguageSelection : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class BigPlayButton extends shaka.ui.PlayButton { | |
private noStructuralTyping_shaka_ui_BigPlayButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class CastButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_CastButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class ChapterSelection extends shaka.ui.SettingsMenu { | |
private noStructuralTyping_shaka_ui_ChapterSelection : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class ContextMenu extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_ContextMenu : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
static registerElement (name : string , factory : shaka.extern.IUIElement.Factory ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
/** | |
* A container for custom video controls. | |
*/ | |
class Controls extends shaka.util.FakeEventTarget implements shaka.util.IDestroyable { | |
private noStructuralTyping_shaka_ui_Controls : any; | |
/** | |
* A container for custom video controls. | |
*/ | |
constructor (player : shaka.Player , videoContainer : HTMLElement , video : HTMLMediaElement , vrCanvas : HTMLCanvasElement | null , config : shaka.extern.UIConfiguration ) ; | |
/** | |
* This allows the application to inhibit casting. | |
*/ | |
allowCast (allow : boolean ) : any ; | |
anySettingsMenusAreOpen ( ) : boolean ; | |
/** | |
* Returns if a VR is capable. | |
*/ | |
canPlayVR ( ) : boolean ; | |
configure (config : shaka.extern.UIConfiguration ) : any ; | |
destroy ( ) : Promise < any > ; | |
getAd ( ) : shaka.extern.IAd | null ; | |
getCastProxy ( ) : shaka.cast.CastProxy | null ; | |
getClientSideAdContainer ( ) : HTMLElement ; | |
getConfig ( ) : shaka.extern.UIConfiguration ; | |
getControlsContainer ( ) : HTMLElement ; | |
getDisplayTime ( ) : number ; | |
getLocalPlayer ( ) : shaka.Player | null ; | |
getLocalVideo ( ) : HTMLMediaElement | null ; | |
getLocalization ( ) : shaka.ui.Localization | null ; | |
getPlayer ( ) : shaka.Player | null ; | |
getServerSideAdContainer ( ) : HTMLElement ; | |
/** | |
* Returns the angle of the current field of view displayed in degrees. | |
*/ | |
getVRFieldOfView ( ) : number | null ; | |
/** | |
* Get the angle of the north. | |
*/ | |
getVRNorth ( ) : number | null ; | |
getVideo ( ) : HTMLMediaElement | null ; | |
getVideoContainer ( ) : HTMLElement ; | |
hideAdUI ( ) : any ; | |
hideSettingsMenus ( ) : any ; | |
hideUI ( ) : any ; | |
/** | |
* Increment the pitch in X angle in degrees. | |
* @param angle In degrees | |
*/ | |
incrementPitch (angle : number ) : any ; | |
/** | |
* Increment the roll in X angle in degrees. | |
* @param angle In degrees | |
*/ | |
incrementRoll (angle : number ) : any ; | |
/** | |
* Increment the yaw in X angle in degrees. | |
* @param angle In degrees | |
*/ | |
incrementYaw (angle : number ) : any ; | |
isCastAllowed ( ) : boolean ; | |
isFullScreenEnabled ( ) : boolean ; | |
isFullScreenSupported ( ) : boolean ; | |
isOpaque ( ) : boolean ; | |
isPiPAllowed ( ) : boolean ; | |
isPiPEnabled ( ) : boolean ; | |
/** | |
* Returns if a VR is supported. | |
*/ | |
isPlayingVR ( ) : boolean ; | |
isSeeking ( ) : boolean ; | |
/** | |
* Used by the application to notify the controls that a load operation is | |
* complete. This allows the controls to recalculate play/paused state, which | |
* is important for platforms like Android where autoplay is disabled. | |
*/ | |
loadComplete ( ) : any ; | |
/** | |
* Enable or disable native browser controls. Enabling disables shaka | |
* controls. | |
*/ | |
setEnabledNativeControls (enabled : boolean ) : any ; | |
/** | |
* Enable or disable the custom controls. Enabling disables native | |
* browser controls. | |
*/ | |
setEnabledShakaControls (enabled : boolean ) : any ; | |
setLastTouchEventTime (time : number | null ) : any ; | |
setSeeking (seeking : boolean ) : any ; | |
/** | |
* Changing the field of view increases or decreases the portion of the video | |
* that is viewed at one time. If the field of view is decreased, a small | |
* part of the video will be seen, but with more detail. If the field of view | |
* is increased, a larger part of the video will be seen, but with less | |
* detail. | |
* @param fieldOfView In degrees | |
*/ | |
setVRFieldOfView (fieldOfView : number ) : any ; | |
showAdUI ( ) : any ; | |
showUI ( ) : any ; | |
toggleFullScreen ( ) : any ; | |
togglePiP ( ) : any ; | |
/** | |
* Toggle stereoscopic mode. | |
*/ | |
toggleStereoscopicMode ( ) : any ; | |
static registerElement (name : string , factory : shaka.extern.IUIElement.Factory ) : any ; | |
static registerSeekBar (factory : shaka.extern.IUISeekBar.Factory ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
abstract class Element implements shaka.extern.IUIElement { | |
private noStructuralTyping_shaka_ui_Element : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
ad : shaka.extern.IAd | null ; | |
adManager : shaka.extern.IAdManager | null ; | |
controls : shaka.ui.Controls | null ; | |
eventManager : shaka.util.EventManager | null ; | |
localization : shaka.ui.Localization | null ; | |
parent : HTMLElement | null ; | |
player : shaka.Player | null ; | |
release ( ) : any ; | |
video : HTMLMediaElement | null ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class FastForwardButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_FastForwardButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class FullscreenButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_FullscreenButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class HiddenFastForwardButton extends shaka.ui.HiddenSeekButton { | |
private noStructuralTyping_shaka_ui_HiddenFastForwardButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class HiddenRewindButton extends shaka.ui.HiddenSeekButton { | |
private noStructuralTyping_shaka_ui_HiddenRewindButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class HiddenSeekButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_HiddenSeekButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
/** | |
* Localization system provided by the shaka ui library. | |
* It can be used to store the various localized forms of | |
* strings that are expected to be displayed to the user. | |
* If a string is not available, it will return the localized | |
* form in the closest related locale. | |
*/ | |
class Localization extends shaka.util.FakeEventTarget { | |
private noStructuralTyping_shaka_ui_Localization : any; | |
constructor (fallbackLocale : string ) ; | |
/** | |
* Request the localization system to change which locale it serves. If any of | |
* of the preferred locales cannot be found, the localization system will fire | |
* an event identifying which locales it does not know. The localization | |
* system will then continue to operate using the closest matches it has. | |
* @param locales The locale codes for the requested locales in order of preference. | |
*/ | |
changeLocale (locales : Iterable < string > ) : any ; | |
/** | |
* The locales currently used. An empty set means "no preference". | |
*/ | |
getCurrentLocales ( ) : Set < string > ; | |
/** | |
* Insert a set of localizations for a single locale. This will amend the | |
* existing localizations for the given locale. | |
* @param locale The locale that the localizations should be added to. | |
* @param localizations A mapping of id to localized text that should used to modify the internal collection of localizations. | |
* @param conflictResolution The strategy used to resolve conflicts when the id of an existing entry matches the id of a new entry. Default to |USE_NEW|, where the new entry will replace the old entry. | |
*/ | |
insert (locale : string , localizations : Map < string , string > , conflictResolution ? : shaka.ui.Localization.ConflictResolution ) : shaka.ui.Localization ; | |
release ( ) : any ; | |
/** | |
* Request the localized string under the given id. If there is no localized | |
* version of the string, then the fallback localization will be given | |
* ("en" version). If there is no fallback localization, a non-null empty | |
* string will be returned. | |
* @param id The id for the localization entry. | |
*/ | |
resolve (id : string ) : string ; | |
/** | |
* Set the value under each key in |dictionary| to the resolved value. | |
* Convenient for apps with some kind of data binding system. | |
* Equivalent to: | |
* for (const key of dictionary.keys()) { | |
* dictionary.set(key, localization.resolve(key)); | |
* } | |
*/ | |
resolveDictionary (dictionary : Map < string , string > ) : any ; | |
/** | |
* The event name for when a new locale has been requested and any previously | |
* resolved values should be updated. | |
*/ | |
static LOCALE_CHANGED : string ; | |
/** | |
* The event name for when |insert| was called and it changed entries that could | |
* affect previously resolved values. | |
*/ | |
static LOCALE_UPDATED : string ; | |
/** | |
* The event name for when entries are missing from the user's preferred | |
* locale, but we were able to find an entry in a related locale or the fallback | |
* locale. | |
*/ | |
static MISSING_LOCALIZATIONS : string ; | |
/** | |
* The event name for when locales were requested, but we could not find any | |
* entries for them. The localization system will continue to use the closest | |
* matches it has. | |
*/ | |
static UNKNOWN_LOCALES : string ; | |
/** | |
* The event name for when an entry could not be found in the preferred locale, | |
* related locales, or the fallback locale. | |
*/ | |
static UNKNOWN_LOCALIZATION : string ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui.Localization { | |
/** | |
* An enum for how the localization system should resolve conflicts between old | |
* translations and new translations. | |
*/ | |
/** | |
* An enum for how the localization system should resolve conflicts between old | |
* translations and new translations. | |
*/ | |
enum ConflictResolution { | |
USE_NEW = 1.0 , | |
USE_OLD = 0.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class LoopButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_LoopButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class MuteButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_MuteButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class OverflowMenu extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_OverflowMenu : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
static registerElement (name : string , factory : shaka.extern.IUIElement.Factory ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class Overlay implements shaka.util.IDestroyable { | |
private noStructuralTyping_shaka_ui_Overlay : any; | |
constructor (player : shaka.Player , videoContainer : HTMLElement , video : HTMLMediaElement , vrCanvas ? : HTMLCanvasElement | null ) ; | |
configure (config : string | object , value ? : any ) : any ; | |
destroy ( ) : Promise < any > ; | |
getConfiguration ( ) : shaka.extern.UIConfiguration ; | |
getControls ( ) : shaka.ui.Controls | null ; | |
/** | |
* Detects if this is a mobile platform, in case you want to choose a | |
* different UI configuration on mobile devices. | |
*/ | |
isMobile ( ) : boolean ; | |
removeWatermark ( ) : any ; | |
/** | |
* Enable or disable the custom controls. | |
*/ | |
setEnabled (enabled : boolean ) : any ; | |
setTextWatermark (text : string , options ? : shaka.ui.Watermark.Options | null ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui.Overlay { | |
/** | |
* Describes the possible reasons that the UI might fail to load. | |
*/ | |
/** | |
* Describes the possible reasons that the UI might fail to load. | |
*/ | |
enum FailReasonCode { | |
NO_BROWSER_SUPPORT = 0.0 , | |
PLAYER_FAILED_TO_LOAD = 1.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui.Overlay { | |
/** | |
* Describes what information should show up in labels for selecting audio | |
* variants and text tracks. | |
*/ | |
/** | |
* Describes what information should show up in labels for selecting audio | |
* variants and text tracks. | |
*/ | |
enum TrackLabelFormat { | |
LABEL = 3.0 , | |
LANGUAGE = 0.0 , | |
LANGUAGE_ROLE = 2.0 , | |
ROLE = 1.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class PipButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_PipButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class PlayButton extends shaka.ui.Element implements shaka.extern.IUIPlayButton { | |
private noStructuralTyping_shaka_ui_PlayButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
button : HTMLButtonElement ; | |
isEnded ( ) : boolean ; | |
isPaused ( ) : boolean ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class PlaybackRateSelection extends shaka.ui.SettingsMenu { | |
private noStructuralTyping_shaka_ui_PlaybackRateSelection : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class PresentationTimeTracker extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_PresentationTimeTracker : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
/** | |
* A range element, built to work across browsers. | |
* In particular, getting styles to work right on IE requires a specific | |
* structure. | |
* This also handles the case where the range element is being manipulated and | |
* updated at the same time. This can happen when seeking during playback or | |
* when casting. | |
*/ | |
class RangeElement extends shaka.ui.Element implements shaka.extern.IUIRangeElement { | |
private noStructuralTyping_shaka_ui_RangeElement : any; | |
/** | |
* A range element, built to work across browsers. | |
* In particular, getting styles to work right on IE requires a specific | |
* structure. | |
* This also handles the case where the range element is being manipulated and | |
* updated at the same time. This can happen when seeking during playback or | |
* when casting. | |
*/ | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls , containerClassNames : string [] , barClassNames : string [] ) ; | |
bar : HTMLInputElement ; | |
/** | |
* Called to implement keyboard-based changes, where this is no clear "end". | |
* This will simulate events like onChangeStart(), onChange(), and | |
* onChangeEnd() as appropriate. | |
*/ | |
changeTo (value : any ) : any ; | |
container : HTMLElement ; | |
getValue ( ) : any ; | |
/** | |
* Called when a new value is set by user interaction. | |
* To be overridden by subclasses. | |
*/ | |
onChange ( ) : any ; | |
/** | |
* Called when user interaction ends. | |
* To be overridden by subclasses. | |
*/ | |
onChangeEnd ( ) : any ; | |
/** | |
* Called when user interaction begins. | |
* To be overridden by subclasses. | |
*/ | |
onChangeStart ( ) : any ; | |
setRange (min : any , max : any ) : any ; | |
setValue (value : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class RecenterVRButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_RecenterVRButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class RemoteButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_RemoteButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class ResolutionSelection extends shaka.ui.SettingsMenu { | |
private noStructuralTyping_shaka_ui_ResolutionSelection : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class RewindButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_RewindButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class SaveVideoFrameButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_SaveVideoFrameButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class SeekBar extends shaka.ui.RangeElement implements shaka.extern.IUISeekBar { | |
private noStructuralTyping_shaka_ui_SeekBar : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
isShowing ( ) : boolean ; | |
update ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui.SeekBar { | |
class Factory implements shaka.extern.IUISeekBar.Factory { | |
private noStructuralTyping_shaka_ui_SeekBar_Factory : any; | |
create (rootElement : HTMLElement , controls : shaka.ui.Controls ) : shaka.extern.IUISeekBar ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class SettingsMenu extends shaka.ui.Element implements shaka.extern.IUISettingsMenu { | |
private noStructuralTyping_shaka_ui_SettingsMenu : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls , iconText : string ) ; | |
backButton : HTMLButtonElement ; | |
backSpan : HTMLElement ; | |
button : HTMLButtonElement ; | |
currentSelection : HTMLElement ; | |
icon : HTMLElement ; | |
menu : HTMLElement ; | |
nameSpan : HTMLElement ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class SkipAdButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_SkipAdButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class SmallPlayButton extends shaka.ui.PlayButton { | |
private noStructuralTyping_shaka_ui_SmallPlayButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class Spacer extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_Spacer : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class StatisticsButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_StatisticsButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class TextSelection extends shaka.ui.SettingsMenu { | |
private noStructuralTyping_shaka_ui_TextSelection : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class ToggleStereoscopicButton extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_ToggleStereoscopicButton : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
class VolumeBar extends shaka.ui.RangeElement { | |
private noStructuralTyping_shaka_ui_VolumeBar : any; | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.ui { | |
/** | |
* A UI component that adds watermark functionality to the Shaka Player. | |
* Allows adding text watermarks with various customization options. | |
*/ | |
class Watermark extends shaka.ui.Element { | |
private noStructuralTyping_shaka_ui_Watermark : any; | |
/** | |
* A UI component that adds watermark functionality to the Shaka Player. | |
* Allows adding text watermarks with various customization options. | |
*/ | |
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ; | |
/** | |
* Removes the current watermark from the video and stops any animations. | |
*/ | |
removeWatermark ( ) : any ; | |
/** | |
* Sets a text watermark on the video with customizable options. | |
* The watermark can be either static (fixed position) or dynamic (moving). | |
* @param text The text to display as watermark | |
* @param options configuration options | |
*/ | |
setTextWatermark (text : string , options ? : shaka.ui.Watermark.Options | null ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
/** | |
* A utility to wrap abortable operations. Note that these are not cancelable. | |
* Cancellation implies undoing what has been done so far, whereas aborting only | |
* means that further work is stopped. | |
*/ | |
class AbortableOperation < T > implements shaka.extern.IAbortableOperation < T > { | |
private noStructuralTyping_shaka_util_AbortableOperation : any; | |
/** | |
* A utility to wrap abortable operations. Note that these are not cancelable. | |
* Cancellation implies undoing what has been done so far, whereas aborting only | |
* means that further work is stopped. | |
*/ | |
constructor (promise : Promise < T > , onAbort : shaka.extern.CreateSegmentIndexFunction ) ; | |
abort ( ) : any ; | |
aborted ( ) : boolean ; | |
chain < U > (onSuccess : undefined | Function , onError ? : (a : any ) => any ) : shaka.util.AbortableOperation < U > ; | |
finally (onFinal : any ) : any ; | |
promise : Promise < T > ; | |
static aborted ( ) : shaka.util.AbortableOperation < any > ; | |
static all (operations : shaka.util.AbortableOperation < any > [] ) : shaka.util.AbortableOperation < any > ; | |
static completed < U > (value : U ) : shaka.util.AbortableOperation < U > ; | |
static failed (error : shaka.util.Error ) : shaka.util.AbortableOperation < any > ; | |
static notAbortable < U > (promise : Promise < U > ) : shaka.util.AbortableOperation < U > ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class BufferUtils { | |
private noStructuralTyping_shaka_util_BufferUtils : any; | |
/** | |
* Compare two buffers for equality. For buffers of different types, this | |
* compares the underlying buffers as binary data. | |
*/ | |
static equal (arr1 : ArrayBuffer | ArrayBufferView | null , arr2 : ArrayBuffer | ArrayBufferView | null ) : boolean ; | |
/** | |
* Gets an ArrayBuffer that contains the data from the given TypedArray. Note | |
* this will allocate a new ArrayBuffer if the object is a partial view of | |
* the data. | |
*/ | |
static toArrayBuffer (view : ArrayBuffer | ArrayBufferView ) : ArrayBuffer ; | |
/** | |
* Creates a DataView over the given buffer. | |
*/ | |
static toDataView (buffer : ArrayBuffer | ArrayBufferView , offset ? : number , length ? : number ) : DataView ; | |
/** | |
* Creates a new Uint16Array view on the same buffer. This clamps the values | |
* to be within the same view (i.e. you can't use this to move past the end | |
* of the view, even if the underlying buffer is larger). However, you can | |
* pass a negative offset to access the data before the view. | |
* @param offset The offset from the beginning of this data's view to start the new view at. | |
* @param length The byte length of the new view. | |
*/ | |
static toUint16 (data : ArrayBuffer | ArrayBufferView , offset ? : number , length ? : number ) : Uint16Array ; | |
/** | |
* Creates a new Uint8Array view on the same buffer. This clamps the values | |
* to be within the same view (i.e. you can't use this to move past the end | |
* of the view, even if the underlying buffer is larger). However, you can | |
* pass a negative offset to access the data before the view. | |
* @param offset The offset from the beginning of this data's view to start the new view at. | |
* @param length The byte length of the new view. | |
*/ | |
static toUint8 (data : ArrayBuffer | ArrayBufferView , offset ? : number , length ? : number ) : Uint8Array ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util.CmcdManager { | |
enum StreamingFormat { | |
DASH = 'd' , | |
HLS = 'h' , | |
LOW_LATENCY_DASH = 'ld' , | |
LOW_LATENCY_HLS = 'lh' , | |
OTHER = 'o' , | |
SMOOTH = 's' , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class CmsdManager { | |
private noStructuralTyping_shaka_util_CmsdManager : any; | |
constructor (config : shaka.extern.CmsdConfiguration ) ; | |
/** | |
* Gets the current bandwidth estimate. | |
*/ | |
getBandwidthEstimate (defaultEstimate : number ) : number ; | |
/** | |
* Returns the estimated throughput in bits per second. If there is no | |
* estimated throughput or it's not enabled, it returns null. | |
*/ | |
getEstimatedThroughput ( ) : number | null ; | |
/** | |
* Returns the max bitrate in bits per second. If there is no max bitrate or | |
* it's not enabled, it returns null. | |
*/ | |
getMaxBitrate ( ) : number | null ; | |
/** | |
* Returns the response delay in milliseconds. If there is no response delay | |
* or it's not enabled, it returns null. | |
*/ | |
getResponseDelay ( ) : number | null ; | |
/** | |
* Returns the RTT in milliseconds. If there is no RTT or it's not enabled, | |
* it returns null. | |
*/ | |
getRoundTripTime ( ) : number | null ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class ConfigUtils { | |
private noStructuralTyping_shaka_util_ConfigUtils : any; | |
/** | |
* Convert config from ('fieldName', value) format to a partial config object. | |
* E. g. from ('manifest.retryParameters.maxAttempts', 1) to | |
* { manifest: { retryParameters: { maxAttempts: 1 }}}. | |
*/ | |
static convertToConfigObject (fieldName : string , value : any ) : object ; | |
static getDifferenceFromConfigObjects (object : object , base : object ) : object ; | |
static mergeConfigObjects (destination : object , source : object , template : object , overrides : object , path : string ) : boolean ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class DataViewReader { | |
private noStructuralTyping_shaka_util_DataViewReader : any; | |
constructor (data : ArrayBuffer | ArrayBufferView , endianness : shaka.util.DataViewReader.Endianness ) ; | |
/** | |
* Gets the byte length of the DataView. | |
*/ | |
getLength ( ) : number ; | |
/** | |
* Gets the current byte position. | |
*/ | |
getPosition ( ) : number ; | |
hasMoreData ( ) : boolean ; | |
/** | |
* Reads the specified number of raw bytes. | |
* @param bytes The number of bytes to read. | |
*/ | |
readBytes (bytes : number ) : Uint8Array ; | |
/** | |
* Reads a signed 32 bit integer, and advances the reader. | |
*/ | |
readInt32 ( ) : number ; | |
/** | |
* Keeps reading until it reaches a byte that equals to zero. The text is | |
* assumed to be UTF-8. | |
*/ | |
readTerminatedString ( ) : string ; | |
/** | |
* Reads an unsigned 16 bit integer, and advances the reader. | |
*/ | |
readUint16 ( ) : number ; | |
/** | |
* Reads an unsigned 32 bit integer, and advances the reader. | |
*/ | |
readUint32 ( ) : number ; | |
/** | |
* Reads an unsigned 64 bit integer, and advances the reader. | |
*/ | |
readUint64 ( ) : number ; | |
/** | |
* Reads an unsigned 8 bit integer, and advances the reader. | |
*/ | |
readUint8 ( ) : number ; | |
/** | |
* Rewinds the specified number of bytes. | |
* @param bytes The number of bytes to rewind. | |
*/ | |
rewind (bytes : number ) : any ; | |
/** | |
* Seeks to a specified position. | |
* @param position The desired byte position within the DataView. | |
*/ | |
seek (position : number ) : any ; | |
/** | |
* Skips the specified number of bytes. | |
* @param bytes The number of bytes to skip. | |
*/ | |
skip (bytes : number ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util.DataViewReader { | |
/** | |
* Endianness. | |
*/ | |
/** | |
* Endianness. | |
*/ | |
enum Endianness { | |
BIG_ENDIAN = 0.0 , | |
LITTLE_ENDIAN = 1.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class Dom { | |
private noStructuralTyping_shaka_util_Dom : any; | |
/** | |
* Remove all of the child nodes of an element. | |
*/ | |
static removeAllChildren (element : Element ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class Error extends GlobalError implements shaka.extern.Error { | |
private noStructuralTyping_shaka_util_Error : any; | |
constructor (severity : shaka.util.Error.Severity , category : shaka.util.Error.Category , code : shaka.util.Error.Code , ...varArgs : any [] ) ; | |
category : any ; | |
code : any ; | |
data : any ; | |
handled : any ; | |
severity : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util.Error { | |
enum Category { | |
ADS = 10.0 , | |
CAST = 8.0 , | |
DRM = 6.0 , | |
MANIFEST = 4.0 , | |
MEDIA = 3.0 , | |
NETWORK = 1.0 , | |
PLAYER = 7.0 , | |
STORAGE = 9.0 , | |
STREAMING = 5.0 , | |
TEXT = 2.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util.Error { | |
enum Code { | |
AES_128_INVALID_IV_LENGTH = 4048.0 , | |
AES_128_INVALID_KEY_LENGTH = 4049.0 , | |
ALREADY_CASTING = 8002.0 , | |
ATTEMPTS_EXHAUSTED = 1010.0 , | |
BAD_ENCODING = 2004.0 , | |
BAD_HTTP_STATUS = 1001.0 , | |
BUFFER_READ_OUT_OF_BOUNDS = 3000.0 , | |
CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM = 4033.0 , | |
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS = 2012.0 , | |
CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM = 4045.0 , | |
CANNOT_STORE_LIVE_OFFLINE = 9005.0 , | |
CAST_API_UNAVAILABLE = 8000.0 , | |
CAST_CANCELED_BY_USER = 8004.0 , | |
CAST_CONNECTION_TIMED_OUT = 8005.0 , | |
CAST_RECEIVER_APP_UNAVAILABLE = 8006.0 , | |
CHAPTERS_TRACK_FAILED = 2015.0 , | |
CONTENT_NOT_LOADED = 7004.0 , | |
CONTENT_TRANSFORMATION_FAILED = 3019.0 , | |
CONTENT_UNSUPPORTED_BY_BROWSER = 4032.0 , | |
CS_AD_MANAGER_NOT_INITIALIZED = 10001.0 , | |
CS_IMA_SDK_MISSING = 10000.0 , | |
CURRENT_DAI_REQUEST_NOT_FINISHED = 10004.0 , | |
DASH_CONFLICTING_AES_128 = 4050.0 , | |
DASH_CONFLICTING_KEY_IDS = 4010.0 , | |
DASH_DUPLICATE_REPRESENTATION_ID = 4018.0 , | |
DASH_EMPTY_ADAPTATION_SET = 4003.0 , | |
DASH_EMPTY_PERIOD = 4004.0 , | |
DASH_INVALID_PATCH = 4052.0 , | |
DASH_INVALID_XML = 4001.0 , | |
DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED = 4054.0 , | |
DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED = 4009.0 , | |
DASH_NO_COMMON_KEY_SYSTEM = 4008.0 , | |
DASH_NO_SEGMENT_INFO = 4002.0 , | |
DASH_PSSH_BAD_ENCODING = 4007.0 , | |
DASH_UNSUPPORTED_AES_128 = 4051.0 , | |
DASH_UNSUPPORTED_CONTAINER = 4006.0 , | |
DASH_UNSUPPORTED_XLINK_ACTUATE = 4027.0 , | |
DASH_WEBM_MISSING_INIT = 4005.0 , | |
DASH_XLINK_DEPTH_LIMIT = 4028.0 , | |
DEPRECATED_OPERATION_ABORTED = 9002.0 , | |
DOWNLOAD_SIZE_CALLBACK_ERROR = 9015.0 , | |
EBML_BAD_FLOATING_POINT_SIZE = 3003.0 , | |
EBML_OVERFLOW = 3002.0 , | |
ENCRYPTED_CONTENT_WITHOUT_DRM_INFO = 6010.0 , | |
ERROR_CHECKING_HDCP_VERSION = 6019.0 , | |
EXPIRED = 6014.0 , | |
FAILED_TO_ATTACH_TO_VIDEO = 6003.0 , | |
FAILED_TO_CREATE_CDM = 6002.0 , | |
FAILED_TO_CREATE_SESSION = 6005.0 , | |
FAILED_TO_GENERATE_LICENSE_REQUEST = 6006.0 , | |
HLS_COULD_NOT_GUESS_CODECS = 4025.0 , | |
HLS_EMPTY_MEDIA_PLAYLIST = 4053.0 , | |
HLS_INVALID_PLAYLIST_HIERARCHY = 4017.0 , | |
HLS_KEYFORMATS_NOT_SUPPORTED = 4026.0 , | |
HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED = 4041.0 , | |
HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED = 4040.0 , | |
HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND = 4020.0 , | |
HLS_PLAYLIST_HEADER_MISSING = 4015.0 , | |
HLS_REQUIRED_ATTRIBUTE_MISSING = 4023.0 , | |
HLS_REQUIRED_TAG_MISSING = 4024.0 , | |
HLS_VARIABLE_NOT_FOUND = 4039.0 , | |
HTTP_ERROR = 1002.0 , | |
INCONSISTENT_DRM_ACROSS_PERIODS = 4038.0 , | |
INDEXED_DB_ERROR = 9001.0 , | |
INDEXED_DB_INIT_TIMED_OUT = 9017.0 , | |
INIT_DATA_TRANSFORM_ERROR = 6016.0 , | |
INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED = 10006.0 , | |
INVALID_HLS_TAG = 4016.0 , | |
INVALID_MP4_CEA = 2010.0 , | |
INVALID_MP4_TTML = 2007.0 , | |
INVALID_MP4_VTT = 2008.0 , | |
INVALID_SERVER_CERTIFICATE = 6004.0 , | |
INVALID_TEXT_CUE = 2001.0 , | |
INVALID_TEXT_HEADER = 2000.0 , | |
INVALID_XML = 2005.0 , | |
JS_INTEGER_OVERFLOW = 3001.0 , | |
KEY_NOT_FOUND = 9012.0 , | |
LICENSE_REQUEST_FAILED = 6007.0 , | |
LICENSE_RESPONSE_REJECTED = 6008.0 , | |
LOAD_INTERRUPTED = 7000.0 , | |
LOCAL_PLAYER_INSTANCE_REQUIRED = 9008.0 , | |
MALFORMED_DATA_URI = 1004.0 , | |
MALFORMED_OFFLINE_URI = 9004.0 , | |
MALFORMED_TEST_URI = 1008.0 , | |
MEDIA_SOURCE_OPERATION_FAILED = 3014.0 , | |
MEDIA_SOURCE_OPERATION_THREW = 3015.0 , | |
MIN_HDCP_VERSION_NOT_MATCH = 6018.0 , | |
MISSING_EME_SUPPORT = 6020.0 , | |
MISSING_STORAGE_CELL = 9013.0 , | |
MISSING_TEXT_PLUGIN = 2014.0 , | |
MODIFY_OPERATION_NOT_SUPPORTED = 9016.0 , | |
MP4_SIDX_INVALID_TIMESCALE = 3005.0 , | |
MP4_SIDX_TYPE_NOT_SUPPORTED = 3006.0 , | |
MP4_SIDX_WRONG_BOX_TYPE = 3004.0 , | |
MSS_INVALID_XML = 4046.0 , | |
MSS_LIVE_CONTENT_NOT_SUPPORTED = 4047.0 , | |
MSS_MISSING_DATA_FOR_TRANSMUXING = 3020.0 , | |
MSS_TRANSMUXING_FAILED = 3022.0 , | |
MT_AD_MANAGER_NOT_INITIALIZED = 10005.0 , | |
NEW_KEY_OPERATION_NOT_SUPPORTED = 9011.0 , | |
NO_CAST_RECEIVERS = 8001.0 , | |
NO_INIT_DATA_FOR_OFFLINE = 9007.0 , | |
NO_LICENSE_SERVER_GIVEN = 6012.0 , | |
NO_RECOGNIZED_KEY_SYSTEMS = 6000.0 , | |
NO_VARIANTS = 4036.0 , | |
NO_VIDEO_ELEMENT = 7002.0 , | |
NO_WEB_CRYPTO_API = 4042.0 , | |
OBJECT_DESTROYED = 7003.0 , | |
OFFLINE_SESSION_REMOVED = 6013.0 , | |
OPERATION_ABORTED = 7001.0 , | |
PERIOD_FLATTENING_FAILED = 4037.0 , | |
QUOTA_EXCEEDED_ERROR = 3017.0 , | |
REQUESTED_ITEM_NOT_FOUND = 9003.0 , | |
REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE = 6001.0 , | |
REQUEST_FILTER_ERROR = 1006.0 , | |
RESPONSE_FILTER_ERROR = 1007.0 , | |
RESTRICTIONS_CANNOT_BE_MET = 4012.0 , | |
SEGMENT_MISSING = 1011.0 , | |
SERVER_CERTIFICATE_REQUEST_FAILED = 6017.0 , | |
SERVER_CERTIFICATE_REQUIRED = 6015.0 , | |
SRC_EQUALS_PRELOAD_NOT_SUPPORTED = 7005.0 , | |
SS_AD_MANAGER_NOT_INITIALIZED = 10003.0 , | |
SS_IMA_SDK_MISSING = 10002.0 , | |
STORAGE_LIMIT_REACHED = 9014.0 , | |
STORAGE_NOT_SUPPORTED = 9000.0 , | |
STREAMING_ENGINE_STARTUP_INVALID_STATE = 5006.0 , | |
TEXT_COULD_NOT_GUESS_MIME_TYPE = 2011.0 , | |
TEXT_ONLY_WEBVTT_SRC_EQUALS = 2013.0 , | |
TIMEOUT = 1003.0 , | |
TRANSMUXING_FAILED = 3018.0 , | |
TRANSMUXING_NO_VIDEO_DATA = 3023.0 , | |
UNABLE_TO_DETECT_ENCODING = 2003.0 , | |
UNABLE_TO_EXTRACT_CUE_START_TIME = 2009.0 , | |
UNABLE_TO_GUESS_MANIFEST_TYPE = 4000.0 , | |
UNEXPECTED_CAST_ERROR = 8003.0 , | |
UNEXPECTED_TEST_REQUEST = 1009.0 , | |
UNSUPPORTED_EXTERNAL_THUMBNAILS_URI = 2017.0 , | |
UNSUPPORTED_SCHEME = 1000.0 , | |
VAST_INVALID_XML = 10007.0 , | |
VIDEO_ERROR = 3016.0 , | |
WEBM_CUES_ELEMENT_MISSING = 3007.0 , | |
WEBM_CUE_TIME_ELEMENT_MISSING = 3013.0 , | |
WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING = 3012.0 , | |
WEBM_DURATION_ELEMENT_MISSING = 3011.0 , | |
WEBM_EBML_HEADER_ELEMENT_MISSING = 3008.0 , | |
WEBM_INFO_ELEMENT_MISSING = 3010.0 , | |
WEBM_SEGMENT_ELEMENT_MISSING = 3009.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util.Error { | |
enum Severity { | |
CRITICAL = 2.0 , | |
RECOVERABLE = 1.0 , | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class EventManager implements shaka.util.IReleasable { | |
private noStructuralTyping_shaka_util_EventManager : any; | |
/** | |
* Attaches an event listener to an event target. | |
* @param target The event target. | |
* @param type The event type. | |
* @param listener The event listener. | |
* @param options An object that specifies characteristics about the event listener. The passive option, if true, indicates that this function will never call preventDefault(), which improves scrolling performance. | |
*/ | |
listen (target : EventTarget | null , type : string , listener : shaka.util.EventManager.ListenerType , options ? : boolean | AddEventListenerOptions ) : any ; | |
/** | |
* Attaches an event listener to an event target. The listener will be | |
* removed when the first instance of the event is fired. | |
* @param target The event target. | |
* @param type The event type. | |
* @param listener The event listener. | |
* @param options An object that specifies characteristics about the event listener. The passive option, if true, indicates that this function will never call preventDefault(), which improves scrolling performance. | |
*/ | |
listenOnce (target : EventTarget | null , type : string , listener : shaka.util.EventManager.ListenerType , options ? : boolean | AddEventListenerOptions ) : any ; | |
/** | |
* Detaches all event listeners. | |
*/ | |
release ( ) : any ; | |
/** | |
* Detaches all event listeners from all targets. | |
*/ | |
removeAll ( ) : any ; | |
/** | |
* Detaches an event listener from an event target. | |
* @param target The event target. | |
* @param type The event type. | |
* @param listener The event listener. | |
*/ | |
unlisten (target : EventTarget | null , type : string , listener ? : shaka.util.EventManager.ListenerType ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util.EventManager { | |
type ListenerType = (a : Event ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class ExpGolomb { | |
private noStructuralTyping_shaka_util_ExpGolomb : any; | |
constructor (data : Uint8Array , convertEbsp2rbsp ? : boolean ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class FairPlayUtils { | |
private noStructuralTyping_shaka_util_FairPlayUtils : any; | |
/** | |
* Common FairPlay response transform for some DRMs providers. | |
*/ | |
static commonFairPlayResponse (type : shaka.net.NetworkingEngine.RequestType , response : shaka.extern.Response , context ? : shaka.extern.RequestContext ) : any ; | |
/** | |
* Conax FairPlay request. | |
*/ | |
static conaxFairPlayRequest (type : shaka.net.NetworkingEngine.RequestType , request : shaka.extern.Request , context ? : shaka.extern.RequestContext ) : any ; | |
/** | |
* Conax initDataTransform configuration. | |
*/ | |
static conaxInitDataTransform (initData : Uint8Array , initDataType : string , drmInfo : shaka.extern.DrmInfo | null ) : Uint8Array ; | |
/** | |
* Using the default method, extract a content ID from the init data. This is | |
* based on the FairPlay example documentation. | |
*/ | |
static defaultGetContentId (initData : ArrayBuffer | ArrayBufferView ) : string ; | |
/** | |
* ExpressPlay FairPlay request. | |
*/ | |
static expressplayFairPlayRequest (type : shaka.net.NetworkingEngine.RequestType , request : shaka.extern.Request , context ? : shaka.extern.RequestContext ) : any ; | |
/** | |
* ExpressPlay initDataTransform configuration. | |
*/ | |
static expressplayInitDataTransform (initData : Uint8Array , initDataType : string , drmInfo : shaka.extern.DrmInfo | null ) : Uint8Array ; | |
/** | |
* EZDRM FairPlay request. | |
*/ | |
static ezdrmFairPlayRequest (type : shaka.net.NetworkingEngine.RequestType , request : shaka.extern.Request , context ? : shaka.extern.RequestContext ) : any ; | |
/** | |
* EZDRM initDataTransform configuration. | |
*/ | |
static ezdrmInitDataTransform (initData : Uint8Array , initDataType : string , drmInfo : shaka.extern.DrmInfo | null ) : Uint8Array ; | |
/** | |
* Transforms the init data buffer using the given data. The format is: | |
* <pre> | |
* [4 bytes] initDataSize | |
* [initDataSize bytes] initData | |
* [4 bytes] contentIdSize | |
* [contentIdSize bytes] contentId | |
* [4 bytes] certSize | |
* [certSize bytes] cert | |
* </pre> | |
* @param cert The server certificate; this will throw if not provided. | |
*/ | |
static initDataTransform (initData : ArrayBuffer | ArrayBufferView , contentId : ArrayBuffer | ArrayBufferView | string , cert : ArrayBuffer | ArrayBufferView | null ) : Uint8Array ; | |
/** | |
* Check if FairPlay is supported. | |
*/ | |
static isFairPlaySupported ( ) : Promise < boolean > ; | |
/** | |
* Verimatrix FairPlay request. | |
*/ | |
static verimatrixFairPlayRequest (type : shaka.net.NetworkingEngine.RequestType , request : shaka.extern.Request , context ? : shaka.extern.RequestContext ) : any ; | |
/** | |
* Verimatrix initDataTransform configuration. | |
*/ | |
static verimatrixInitDataTransform (initData : Uint8Array , initDataType : string , drmInfo : shaka.extern.DrmInfo | null ) : Uint8Array ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class FakeEvent extends Event { | |
private noStructuralTyping_shaka_util_FakeEvent : any; | |
constructor (type : string , dict ? : Map < string , object | null > | null ) ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class FakeEventTarget implements EventTarget , shaka.util.IReleasable { | |
private noStructuralTyping_shaka_util_FakeEventTarget : any; | |
/** | |
* Add an event listener to this object. | |
* @param type The event type to listen for. | |
* @param listener The callback or listener object to invoke. | |
* @param options Ignored. | |
*/ | |
addEventListener (type : string , listener : EventListener | null | ( (a : Event ) => any ) , options ? : AddEventListenerOptions | boolean ) : any ; | |
/** | |
* Dispatch an event from this object. | |
* @param event The event to be dispatched from this object. | |
*/ | |
dispatchEvent (event : Event ) : boolean ; | |
/** | |
* Add an event listener to this object that is invoked for all events types | |
* the object fires. | |
* @param listener The callback or listener object to invoke. | |
*/ | |
listenToAllEvents (listener : EventListener | null | ( (a : Event ) => any ) ) : any ; | |
release ( ) : any ; | |
/** | |
* Remove an event listener from this object. | |
* @param type The event type for which you wish to remove a listener. | |
* @param listener The callback or listener object to remove. | |
* @param options Ignored. | |
*/ | |
removeEventListener (type : string , listener : EventListener | null | ( (a : Event ) => any ) , options ? : EventListenerOptions | null | boolean ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util.FakeEventTarget { | |
/** | |
* These are the listener types defined in the closure extern for EventTarget. | |
*/ | |
type ListenerType = EventListener | null | ( (a : Event ) => any ) ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
/** | |
* An interface to standardize how objects are destroyed. | |
*/ | |
interface IDestroyable { | |
/** | |
* Request that this object be destroyed, releasing all resources and shutting | |
* down all operations. Returns a Promise which is resolved when destruction | |
* is complete. This Promise should never be rejected. | |
*/ | |
destroy ( ) : Promise < any > ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
/** | |
* An interface to standardize how objects release internal references | |
* synchronously. If an object needs to asynchronously release references, then | |
* it should use 'shaka.util.IDestroyable'. | |
*/ | |
interface IReleasable { | |
/** | |
* Request that this object release all internal references. | |
*/ | |
release ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class Id3Utils { | |
private noStructuralTyping_shaka_util_Id3Utils : any; | |
/** | |
* Returns any adjacent ID3 tags found in data starting at offset, as one | |
* block of data | |
* @param id3Data - The ID3 data containing one or more ID3 tags | |
* @param offset - The offset at which to start searching | |
*/ | |
static getID3Data (id3Data : Uint8Array | null , offset ? : number ) : Uint8Array ; | |
/** | |
* Returns an array of ID3 frames found in all the ID3 tags in the id3Data | |
* @param id3Data - The ID3 data containing one or more ID3 tags | |
*/ | |
static getID3Frames (id3Data : Uint8Array | null ) : shaka.extern.MetadataFrame [] ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class LanguageUtils { | |
private noStructuralTyping_shaka_util_LanguageUtils : any; | |
/** | |
* Check if |locale1| and |locale2| are language-compatible. | |
* Language compatible is when the language component of each locale matches. | |
* This means that no matter what region they have (or don't have) as long as | |
* the language components match, they are language-compatible. | |
* Examples: | |
* Locale A | Locale B | Language-Compatible | |
* ----------------------------------------- | |
* en-US | en-US | true | |
* en-US | en | true | |
* en-US | en-CA | true | |
* en-CA | fr-CA | false | |
*/ | |
static areLanguageCompatible (locale1 : string , locale2 : string ) : boolean ; | |
/** | |
* Check if |locale1| and |locale2| are locale-compatible. | |
* Locale-compatible is defined as all components in each locale match. Since | |
* we only respect the language and region components, we only check that | |
* the language and region components match. | |
* Examples: | |
* Locale A | Locale B | Locale Compatible | |
* --------------------------------------- | |
* en-US | en-US | true | |
* en | en-US | false | |
* en-US | en-CA | false | |
*/ | |
static areLocaleCompatible (locale1 : string , locale2 : string ) : boolean ; | |
/** | |
* Check if two language codes are siblings. Language codes are siblings if | |
* they share the same base language while neither one is the base language. | |
* For example, "en-US" and "en-CA" are siblings but "en-US" and "en" are not | |
* siblings. | |
*/ | |
static areSiblings (a : string , b : string ) : boolean ; | |
/** | |
* Find the locale in |searchSpace| that comes closest to |target|. If no | |
* locale is found to be close to |target|, then |null| will be returned. | |
*/ | |
static findClosestLocale (target : string , searchSpace : Iterable < string > ) : string | null ; | |
/** | |
* Get the normalized base language for a language code. | |
*/ | |
static getBase (lang : string ) : string ; | |
/** | |
* Get the normalized language of the given text stream. Will return 'und' if | |
* a language is not found on the text stream. | |
* This should always be used to get the language from a text stream. | |
*/ | |
static getLocaleForText (stream : shaka.extern.Stream ) : string ; | |
/** | |
* Get the normalized locale for the given variant. This will look through | |
* the variant to find the locale that represents the content in the variant. | |
* This will return 'und' if no language can be found. | |
* This should always be used to get the locale from a variant. | |
*/ | |
static getLocaleForVariant (variant : shaka.extern.Variant ) : string ; | |
/** | |
* Check if |possibleParent| is the parent locale of |possibleChild|. Because | |
* we do not support dialects, the parent-child relationship is a lot simpler. | |
* In a parent child relationship: | |
* - The parent and child have the same language-component | |
* - The parent has no region-component | |
* - The child has a region-component | |
* Example: | |
* Locale A | Locale B | Is A The parent of B? | |
* -------------------------------------------- | |
* en-US | en-US | no | |
* en-US | en | no | |
* en | en-US | yes | |
* en | en | no | |
* en | fr | no | |
*/ | |
static isParentOf (possibleParent : string , possibleChild : string ) : boolean ; | |
/** | |
* Check if |localeA| shares the same parent with |localeB|. Since we don't | |
* support dialect, we will only look at language and region. For two locales | |
* to be siblings: | |
* - Both must have language-components | |
* - Both must have region-components | |
* - Both must have the same language-component | |
* Example: | |
* Locale A | Locale B | Siblings? | |
* -------------------------------------------- | |
* en-US | en-US | yes | |
* en-US | en-CA | yes | |
* en-US | en | no | |
* en | en-US | no | |
* en | en | no | |
* en | fr | no | |
*/ | |
static isSiblingOf (localeA : string , localeB : string ) : boolean ; | |
/** | |
* Normalize a locale. This will take a locale and canonicalize it to a state | |
* that we are prepared to work with. | |
* We only support with: | |
* - language | |
* - language-REGION | |
* If given a dialect, we will discard it. We will convert any 3-character | |
* codes to 2-character codes. We will force language codes to lowercase and | |
* region codes to uppercase. | |
*/ | |
static normalize (locale : string ) : string ; | |
/** | |
* Compute a numerical relatedness for language codes. Language codes with a | |
* higher relatedness are a better match. Unrelated language codes have a | |
* relatedness score of 0. | |
*/ | |
static relatedness (target : string , candidate : string ) : number ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class MimeUtils { | |
private noStructuralTyping_shaka_util_MimeUtils : any; | |
/** | |
* Takes a MIME type and optional codecs string and produces the full MIME | |
* type. Also remove the codecs for raw formats. | |
*/ | |
static getFullType (mimeType : string , codecs ? : string ) : string ; | |
/** | |
* Takes a MIME type and optional codecs string and produces the full MIME | |
* type. | |
*/ | |
static getFullTypeWithAllCodecs (mimeType : string , codecs ? : string ) : string ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class Mp4Parser { | |
private noStructuralTyping_shaka_util_Mp4Parser : any; | |
/** | |
* Declare a box type as a Box. | |
*/ | |
box (type : string , definition : shaka.util.Mp4Parser.CallbackType ) : shaka.util.Mp4Parser ; | |
/** | |
* Declare a box type as a Full Box. | |
*/ | |
fullBox (type : string , definition : shaka.util.Mp4Parser.CallbackType ) : shaka.util.Mp4Parser ; | |
/** | |
* Parse the given data using the added callbacks. | |
* @param partialOkay If true, allow reading partial payloads from some boxes. If the goal is a child box, we can sometimes find it without enough data to find all child boxes. | |
* @param stopOnPartial If true, stop reading if an incomplete box is detected. | |
*/ | |
parse (data : ArrayBuffer | ArrayBufferView , partialOkay ? : boolean , stopOnPartial ? : boolean ) : any ; | |
/** | |
* Parse the next box on the current level. | |
* @param absStart The absolute start position in the original byte array. | |
* @param partialOkay If true, allow reading partial payloads from some boxes. If the goal is a child box, we can sometimes find it without enough data to find all child boxes. | |
* @param stopOnPartial If true, stop reading if an incomplete box is detected. | |
*/ | |
parseNext (absStart : number , reader : shaka.util.DataViewReader , partialOkay ? : boolean , stopOnPartial ? : boolean ) : any ; | |
/** | |
* Stop parsing. Useful for extracting information from partial segments and | |
* avoiding an out-of-bounds error once you find what you are looking for. | |
*/ | |
stop ( ) : any ; | |
/** | |
* Create a callback that tells the Mp4 parser to treat the body of a box as a | |
* binary blob and to parse the body's contents using the provided callback. | |
*/ | |
static allData (callback : (a : Uint8Array ) => any ) : shaka.util.Mp4Parser.CallbackType ; | |
/** | |
* A callback that tells the Mp4 parser to treat the body of a box as a audio | |
* sample entry. A audio sample entry has some fixed-sized fields | |
* describing the audio codec parameters, followed by an arbitrary number of | |
* appended children. Each child is a box. | |
*/ | |
static audioSampleEntry (box : shaka.extern.ParsedBox ) : any ; | |
/** | |
* A callback that tells the Mp4 parser to treat the body of a box as a series | |
* of boxes. The number of boxes is limited by the size of the parent box. | |
*/ | |
static children (box : shaka.extern.ParsedBox ) : any ; | |
/** | |
* Find the header size of the box. | |
* Useful for modifying boxes in place or finding the exact offset of a field. | |
*/ | |
static headerSize (box : shaka.extern.ParsedBox ) : number ; | |
/** | |
* A callback that tells the Mp4 parser to treat the body of a box as a sample | |
* description. A sample description box has a fixed number of children. The | |
* number of children is represented by a 4 byte unsigned integer. Each child | |
* is a box. | |
*/ | |
static sampleDescription (box : shaka.extern.ParsedBox ) : any ; | |
/** | |
* Convert an integer type from a box into an ascii string name. | |
* Useful for debugging. | |
* @param type The type of the box, a uint32. | |
*/ | |
static typeToString (type : number ) : string ; | |
/** | |
* A callback that tells the Mp4 parser to treat the body of a box as a visual | |
* sample entry. A visual sample entry has some fixed-sized fields | |
* describing the video codec parameters, followed by an arbitrary number of | |
* appended children. Each child is a box. | |
*/ | |
static visualSampleEntry (box : shaka.extern.ParsedBox ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util.Mp4Parser { | |
type CallbackType = (a : shaka.extern.ParsedBox ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
/** | |
* A utility to combine streams across periods. | |
*/ | |
class PeriodCombiner implements shaka.util.IReleasable { | |
private noStructuralTyping_shaka_util_PeriodCombiner : any; | |
combinePeriods (periods : shaka.extern.Period [] , isDynamic : boolean , isPatchUpdate ? : boolean ) : Promise < any > ; | |
/** | |
* Deletes a stream from matchedStreams because it is no longer needed | |
*/ | |
deleteStream (stream : shaka.extern.Stream | null , periodId : string ) : any ; | |
getImageStreams ( ) : shaka.extern.Stream [] ; | |
getTextStreams ( ) : shaka.extern.Stream [] ; | |
getVariants ( ) : shaka.extern.Variant [] ; | |
release ( ) : any ; | |
setAllowMultiTypeVariants (allowed : boolean ) : any ; | |
setUseStreamOnce (useOnce : boolean ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class PlayerConfiguration { | |
private noStructuralTyping_shaka_util_PlayerConfiguration : any; | |
static createDefault ( ) : shaka.extern.PlayerConfiguration ; | |
static createDefaultForLL ( ) : object ; | |
/** | |
* Merges the given configuration changes into the given destination. This | |
* uses the default Player configurations as the template. | |
*/ | |
static mergeConfigObjects (destination : shaka.extern.PlayerConfiguration , updates : object , template ? : shaka.extern.PlayerConfiguration ) : boolean ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class StreamUtils { | |
private noStructuralTyping_shaka_util_StreamUtils : any; | |
static meetsRestrictions (variant : shaka.extern.Variant , restrictions : shaka.extern.Restrictions , maxHwRes : shaka.extern.Resolution ) : boolean ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class StringUtils { | |
private noStructuralTyping_shaka_util_StringUtils : any; | |
/** | |
* Creates a string from the given buffer, auto-detecting the encoding that is | |
* being used. If it cannot detect the encoding, it will throw an exception. | |
*/ | |
static fromBytesAutoDetect (data : ArrayBuffer | ArrayBufferView | null ) : string ; | |
/** | |
* Creates a string from the given buffer as UTF-16 encoding. | |
* @param littleEndian true to read little endian, false to read big. | |
* @param noThrow true to avoid throwing in cases where we may expect invalid input. If noThrow is true and the data has an odd length,it will be truncated. | |
*/ | |
static fromUTF16 (data : ArrayBuffer | ArrayBufferView | null , littleEndian : boolean , noThrow ? : boolean ) : string ; | |
/** | |
* Creates a string from the given buffer as UTF-8 encoding. | |
*/ | |
static fromUTF8 (data : ArrayBuffer | ArrayBufferView | null ) : string ; | |
/** | |
* Resets the fromCharCode method's implementation. | |
* For debug use. | |
*/ | |
static resetFromCharCode ( ) : any ; | |
/** | |
* Creates a ArrayBuffer from the given string, converting to UTF-16 encoding. | |
*/ | |
static toUTF16 (str : string , littleEndian : boolean ) : ArrayBuffer ; | |
/** | |
* Creates a ArrayBuffer from the given string, converting to UTF-8 encoding. | |
*/ | |
static toUTF8 (str : string ) : ArrayBuffer ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
/** | |
* A timer allows a single function to be executed at a later time or at | |
* regular intervals. | |
*/ | |
class Timer { | |
private noStructuralTyping_shaka_util_Timer : any; | |
constructor (onTick : ( ) => any ) ; | |
/** | |
* Stop the timer and clear the previous behaviour. The timer is still usable | |
* after calling |stop|. | |
*/ | |
stop ( ) : any ; | |
/** | |
* Have the timer call |onTick| after |seconds| has elapsed unless |stop| is | |
* called first. | |
*/ | |
tickAfter (seconds : number ) : shaka.util.Timer ; | |
/** | |
* Have the timer call |onTick| every |seconds| until |stop| is called. | |
*/ | |
tickEvery (seconds : number ) : shaka.util.Timer ; | |
/** | |
* Have the timer call |onTick| now. | |
*/ | |
tickNow ( ) : shaka.util.Timer ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class TsParser { | |
private noStructuralTyping_shaka_util_TsParser : any; | |
/** | |
* Clear previous data | |
*/ | |
clearData ( ) : any ; | |
/** | |
* Return the audio data | |
*/ | |
getAudioData ( ) : shaka.extern.MPEG_PES [] ; | |
/** | |
* Return the audio and video codecs | |
*/ | |
getCodecs ( ) : { audio : string | null , video : string | null } ; | |
/** | |
* Return the ID3 metadata | |
*/ | |
getMetadata ( ) : shaka.extern.ID3Metadata [] ; | |
/** | |
* Return the start time for the audio and video | |
*/ | |
getStartTime (contentType : string ) : number | null ; | |
/** | |
* Return the video data | |
*/ | |
getVideoData (naluProcessing ? : boolean ) : shaka.extern.MPEG_PES [] ; | |
/** | |
* Return the video information | |
*/ | |
getVideoInfo ( ) : { codec : string | null , frameRate : string | null , height : string | null , width : string | null } ; | |
/** | |
* Return the video data | |
*/ | |
getVideoNalus ( ) : shaka.extern.VideoNalu [] ; | |
/** | |
* Return the video resolution | |
*/ | |
getVideoResolution ( ) : { height : string | null , width : string | null } ; | |
/** | |
* Parse the given data | |
*/ | |
parse (data : Uint8Array | null ) : shaka.util.TsParser ; | |
/** | |
* Parse AVC Nalus | |
* The code is based on hls.js | |
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts | |
*/ | |
parseAvcNalus (pes : shaka.extern.MPEG_PES , nextPes ? : shaka.extern.MPEG_PES | null ) : shaka.extern.VideoNalu [] ; | |
/** | |
* Parse AVC and HVC Nalus | |
* The code is based on hls.js | |
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts | |
*/ | |
parseNalus (pes : shaka.extern.MPEG_PES , lastInfo : { nalu : shaka.extern.VideoNalu | null , state : number | null } ) : shaka.extern.VideoNalu [] ; | |
static Timescale : number ; | |
/** | |
* Check if the passed data corresponds to an MPEG2-TS | |
*/ | |
static probe (data : Uint8Array | null ) : boolean ; | |
/** | |
* Returns the synchronization offset | |
*/ | |
static syncOffset (data : Uint8Array | null ) : number ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js | |
declare namespace shaka.util { | |
class Uint8ArrayUtils { | |
private noStructuralTyping_shaka_util_Uint8ArrayUtils : any; | |
/** | |
* Concatenate buffers. | |
*/ | |
static concat ( ...varArgs : ( ArrayBuffer | ArrayBufferView ) [] ) : Uint8Array ; | |
/** | |
* Convert a base64 string to a Uint8Array. Accepts either the standard | |
* alphabet or the alternate "base64url" alphabet. | |
*/ | |
static fromBase64 (str : string ) : Uint8Array ; | |
/** | |
* Convert a hex string to a Uint8Array. | |
*/ | |
static fromHex (str : string ) : Uint8Array ; | |
/** | |
* Convert a buffer to a base64 string. The output will always use the | |
* alternate encoding/alphabet also known as "base64url". | |
* @param padding If true, pad the output with equals signs. Defaults to true. | |
*/ | |
static toBase64 (data : ArrayBuffer | ArrayBufferView , padding ? : boolean ) : string ; | |
/** | |
* Convert a buffer to a hex string. | |
*/ | |
static toHex (data : ArrayBuffer | ArrayBufferView ) : string ; | |
/** | |
* Convert a buffer to a base64 string. The output will be standard | |
* alphabet as opposed to base64url safe alphabet. | |
*/ | |
static toStandardBase64 (data : ArrayBuffer | ArrayBufferView ) : string ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/abortable.js | |
declare namespace shaka.extern { | |
/** | |
* A representation of an abortable operation. Note that these are not | |
* cancelable. Cancellation implies undoing what has been done so far, | |
* whereas aborting only means that further work is stopped. | |
*/ | |
interface IAbortableOperation < T > { | |
/** | |
* A Promise which represents the underlying operation. It is resolved when | |
* the operation is complete, and rejected if the operation fails or is | |
* aborted. Aborted operations should be rejected with a shaka.util.Error | |
* object using the error code OPERATION_ABORTED. | |
*/ | |
promise : Promise < T > ; | |
/** | |
* Can be called by anyone holding this object to abort the underlying | |
* operation. This is not cancellation, and will not necessarily result in | |
* any work being undone. abort() should return a Promise which is resolved | |
* when the underlying operation has been aborted. The returned Promise | |
* should never be rejected. | |
*/ | |
abort ( ) : Promise < any > ; | |
finally (onFinal : (a : boolean ) => any ) : shaka.extern.IAbortableOperation < T > ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/abr_manager.js | |
declare namespace shaka.extern { | |
/** | |
* An object which selects Streams from a set of possible choices. This also | |
* watches for system changes to automatically adapt for the current streaming | |
* requirements. For example, when the network slows down, this class is in | |
* charge of telling the Player which streams to switch to in order to reduce | |
* the required bandwidth. | |
* | |
* This class is given a set of streams to choose from when the Player starts | |
* up. This class should store these and use them to make future decisions | |
* about ABR. It is up to this class how those decisions are made. All the | |
* Player will do is tell this class what streams to choose from. | |
*/ | |
interface AbrManager { | |
/** | |
* Chooses one variant to switch to. Called by the Player. | |
*/ | |
chooseVariant ( ) : shaka.extern.Variant ; | |
/** | |
* Sets the ABR configuration. | |
* | |
* It is the responsibility of the AbrManager implementation to implement the | |
* restrictions behavior described in shaka.extern.AbrConfiguration. | |
*/ | |
configure (config : shaka.extern.AbrConfiguration ) : any ; | |
/** | |
* Disables automatic Stream suggestions. After this, the AbrManager may not | |
* call switchCallback(). | |
*/ | |
disable ( ) : any ; | |
/** | |
* Enables automatic Variant choices from the last ones passed to setVariants. | |
* After this, the AbrManager may call switchCallback() at any time. | |
*/ | |
enable ( ) : any ; | |
/** | |
* Gets an estimate of the current bandwidth in bit/sec. This is used by the | |
* Player to generate stats. | |
*/ | |
getBandwidthEstimate ( ) : number ; | |
/** | |
* Initializes the AbrManager. | |
*/ | |
init (switchCallback : shaka.extern.AbrManager.SwitchCallback ) : any ; | |
/** | |
* Updates manager playback rate. | |
*/ | |
playbackRateChanged (rate : number ) : any ; | |
/** | |
* Request that this object release all internal references. | |
*/ | |
release ( ) : any ; | |
/** | |
* Notifies the AbrManager that a segment has been downloaded (includes MP4 | |
* SIDX data, WebM Cues data, initialization segments, and media segments). | |
* @param deltaTimeMs The duration, in milliseconds, that the request took to complete. | |
* @param numBytes The total number of bytes transferred. | |
* @param allowSwitch Indicate if the segment is allowed to switch to another stream. | |
* @param request A reference to the request | |
*/ | |
segmentDownloaded (deltaTimeMs : number , numBytes : number , allowSwitch : boolean , request ? : shaka.extern.Request ) : any ; | |
/** | |
* Set CMSD manager. | |
*/ | |
setCmsdManager (cmsdManager : shaka.util.CmsdManager | null ) : any ; | |
/** | |
* Set media element. | |
*/ | |
setMediaElement (mediaElement : HTMLMediaElement | null ) : any ; | |
/** | |
* Updates manager's variants collection. | |
*/ | |
setVariants (variants : shaka.extern.Variant [] ) : any ; | |
/** | |
* Stops any background timers and frees any objects held by this instance. | |
* This will only be called after a call to init. | |
*/ | |
stop ( ) : any ; | |
/** | |
* Notifies the ABR that it is a time to suggest new streams. This is used by | |
* the Player when it finishes adding the last partial segment of a fast | |
* switching stream. | |
*/ | |
trySuggestStreams ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/abr_manager.js | |
declare namespace shaka.extern.AbrManager { | |
/** | |
* A factory for creating the abr manager. | |
*/ | |
type Factory = ( ) => shaka.extern.AbrManager ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/abr_manager.js | |
declare namespace shaka.extern.AbrManager { | |
/** | |
* A callback into the Player that should be called when the AbrManager decides | |
* it's time to change to a different variant. | |
* | |
* The first argument is a variant to switch to. | |
* | |
* The second argument is an optional boolean. If true, all data will be removed | |
* from the buffer, which will result in a buffering event. Unless a third | |
* argument is passed. | |
* | |
* The third argument in an optional number that specifies how much data (in | |
* seconds) should be retained when clearing the buffer. This can help achieve | |
* a fast switch that doesn't involve a buffering event. A minimum of two video | |
* segments should always be kept buffered to avoid temporary hiccups. | |
*/ | |
type SwitchCallback = (a : shaka.extern.Variant , b ? : boolean , c ? : number ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/ads.js | |
declare namespace shaka.extern { | |
type AdCuePoint = { end : number | null , start : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/ads.js | |
declare namespace shaka.extern { | |
type AdInterstitial = { canJump : boolean , endTime : number | null , groupId : string | null , id : string | null , isSkippable : boolean , loop : boolean , mimeType : string | null , once : boolean , overlay : shaka.extern.AdInterstitialOverlay | null , playoutLimit : number | null , post : boolean , pre : boolean , resumeOffset : number | null , skipFor : number | null , skipOffset : number | null , startTime : number , timelineRange : boolean , uri : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/ads.js | |
declare namespace shaka.extern { | |
type AdInterstitialOverlay = { size : { x : number , y : number } , topLeft : { x : number , y : number } , viewport : { x : number , y : number } } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/ads.js | |
declare namespace shaka.extern { | |
type AdsStats = { averageLoadTime : number , errors : number , loadTimes : number [] , playedCompletely : number , skipped : number , started : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/ads.js | |
declare namespace shaka.extern { | |
/** | |
* Interface for Ad objects. | |
*/ | |
interface IAd extends shaka.util.IReleasable { | |
canSkipNow ( ) : boolean ; | |
getAdId ( ) : string ; | |
getAdvertiserName ( ) : string ; | |
getCreativeAdId ( ) : string ; | |
getDescription ( ) : string ; | |
getDuration ( ) : number ; | |
getMediaUrl ( ) : string | null ; | |
/** | |
* Gets the minimum suggested duration. Defaults to being equivalent to | |
* getDuration() for server-side ads. | |
*/ | |
getMinSuggestedDuration ( ) : number ; | |
getPodIndex ( ) : number ; | |
getPositionInSequence ( ) : number ; | |
getRemainingTime ( ) : number ; | |
getSequenceLength ( ) : number ; | |
getTimeOffset ( ) : number ; | |
getTimeUntilSkippable ( ) : number ; | |
getTitle ( ) : string ; | |
getVastMediaBitrate ( ) : number ; | |
getVastMediaHeight ( ) : number ; | |
getVastMediaWidth ( ) : number ; | |
getVolume ( ) : number ; | |
isClientRendering ( ) : boolean ; | |
isLinear ( ) : boolean ; | |
isMuted ( ) : boolean ; | |
isPaused ( ) : boolean ; | |
isSkippable ( ) : boolean ; | |
isUsingAnotherMediaElement ( ) : boolean ; | |
needsSkipUI ( ) : boolean ; | |
pause ( ) : any ; | |
play ( ) : any ; | |
resize (width : number , height : number ) : any ; | |
setMuted (muted : boolean ) : any ; | |
setVolume (volume : number ) : any ; | |
skip ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/ads.js | |
declare namespace shaka.extern { | |
/** | |
* An object that's responsible for all the ad-related logic | |
* in the player. | |
*/ | |
interface IAdManager extends EventTarget { | |
addAdUrlInterstitial (url : string ) : Promise < any > ; | |
addCustomInterstitial (interstitial : shaka.extern.AdInterstitial ) : any ; | |
addMediaTailorTrackingUrl (url : string ) : any ; | |
/** | |
* Called by the Player to provide an updated configuration any time it | |
* changes. | |
* Must be called at least once before init*(). | |
*/ | |
configure (config : shaka.extern.AdsConfiguration ) : any ; | |
getCuePoints ( ) : shaka.extern.AdCuePoint [] ; | |
getInterstitialPlayer ( ) : shaka.Player | null ; | |
getServerSideCuePoints ( ) : shaka.extern.AdCuePoint [] ; | |
/** | |
* Get statistics for the current playback session. If the player is not | |
* playing content, this will return an empty stats object. | |
*/ | |
getStats ( ) : any ; | |
initClientSide (adContainer : HTMLElement , video : HTMLMediaElement , adsRenderingSettings : any | null ) : any ; | |
initInterstitial (adContainer : HTMLElement | null , basePlayer : shaka.Player , baseVideo : HTMLMediaElement ) : any ; | |
initMediaTailor (adContainer : HTMLElement , networkingEngine : shaka.net.NetworkingEngine , video : HTMLMediaElement ) : any ; | |
initServerSide (adContainer : HTMLElement , video : HTMLMediaElement ) : any ; | |
onAssetUnload ( ) : any ; | |
onCueMetadataChange (value : shaka.extern.MetadataFrame ) : any ; | |
onDASHInterstitialMetadata (basePlayer : shaka.Player , baseVideo : HTMLMediaElement , region : shaka.extern.TimelineRegionInfo ) : any ; | |
onDashTimedMetadata (region : shaka.extern.TimelineRegionInfo ) : any ; | |
onHLSInterstitialMetadata (basePlayer : shaka.Player , baseVideo : HTMLMediaElement , interstitial : shaka.extern.HLSInterstitial ) : any ; | |
onHlsTimedMetadata (metadata : shaka.extern.ID3Metadata , timestampOffset : number ) : any ; | |
/** | |
* Fired when the manifest is updated. | |
*/ | |
onManifestUpdated (isLive : boolean ) : any ; | |
release ( ) : any ; | |
replaceServerSideAdTagParameters (adTagParameters : object | null ) : any ; | |
requestClientSideAds (imaRequest : any ) : any ; | |
requestMediaTailorStream (url : string , adsParams : object | null , backupUrl ? : string ) : Promise < string > ; | |
requestServerSideStream (imaRequest : any , backupUrl ? : string ) : Promise < string > ; | |
setLocale (locale : string ) : any ; | |
updateClientSideAdsRenderingSettings (adsRenderingSettings : any ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/ads.js | |
declare namespace shaka.extern.IAdManager { | |
/** | |
* A factory for creating the ad manager. | |
*/ | |
type Factory = ( ) => shaka.extern.IAdManager ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/cea.js | |
declare namespace shaka.extern { | |
type CaptionDecoderPlugin = ( ) => shaka.extern.ICaptionDecoder ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/cea.js | |
declare namespace shaka.extern { | |
type CeaParserPlugin = ( ) => shaka.extern.ICeaParser ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/cea.js | |
declare namespace shaka.extern { | |
/** | |
* Interface for decoding inband closed captions from packets. | |
*/ | |
interface ICaptionDecoder { | |
/** | |
* Clears the decoder state completely. | |
* Should be used when an action renders the decoder state invalid, | |
* e.g. unbuffered seeks. | |
*/ | |
clear ( ) : any ; | |
/** | |
* Decodes all currently extracted packets and then clears them. | |
* This should be called once for a set of extracts (see comment on extract). | |
*/ | |
decode ( ) : shaka.extern.ICaptionDecoder.ClosedCaption [] ; | |
/** | |
* Extracts packets and prepares them for decoding. In a given media fragment, | |
* all the caption packets found in its SEI messages should be extracted by | |
* successive calls to extract(), followed by a single call to decode(). | |
* @param userDataSeiMessage This is a User Data registered by Rec.ITU-T T.35 SEI message. It is described in sections D.1.6 and D.2.6 of Rec. ITU-T H.264 (06/2019). | |
* @param pts PTS when this packet was received, in seconds. | |
*/ | |
extract (userDataSeiMessage : Uint8Array , pts : number ) : any ; | |
/** | |
* Returns the streams that the CEA decoder found. | |
*/ | |
getStreams ( ) : string [] ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/cea.js | |
declare namespace shaka.extern.ICaptionDecoder { | |
/** | |
* Parsed Cue. | |
*/ | |
type ClosedCaption = { cue : shaka.text.Cue , stream : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/cea.js | |
declare namespace shaka.extern { | |
/** | |
* Interface for parsing inband closed caption data from MP4 streams. | |
*/ | |
interface ICeaParser { | |
/** | |
* Initializes the parser with init segment data. | |
* @param initSegment init segment to parse. | |
*/ | |
init (initSegment : ArrayBuffer | ArrayBufferView ) : any ; | |
/** | |
* Parses the stream and extracts closed captions packets. | |
* @param mediaSegment media segment to parse. | |
*/ | |
parse (mediaSegment : ArrayBuffer | ArrayBufferView ) : shaka.extern.ICeaParser.CaptionPacket [] ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/cea.js | |
declare namespace shaka.extern.ICeaParser { | |
type CaptionPacket = { packet : Uint8Array , pts : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/codecs.js | |
declare namespace shaka.extern { | |
type MPEG_PES = { data : Uint8Array , dts : number | null , nalus : shaka.extern.VideoNalu [] , packetLength : number , pts : number | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/codecs.js | |
declare namespace shaka.extern { | |
type SpatialVideoInfo = { hfov : number | null , projection : string | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/codecs.js | |
declare namespace shaka.extern { | |
type VideoNalu = { data : Uint8Array , fullData : Uint8Array , time : number | null , type : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/codecs.js | |
declare namespace shaka.extern { | |
type VideoSample = { data : Uint8Array , dts : number | null , frame : boolean , isKeyframe : boolean , nalus : shaka.extern.VideoNalu [] , pts : number | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/drm_info.js | |
declare namespace shaka.extern { | |
type DrmInfo = { audioRobustness : string , distinctiveIdentifierRequired : boolean , encryptionScheme : string , initData : shaka.extern.InitDataOverride [] | null , keyIds : Set < string > | null , keySystem : string , keySystemUris ? : Set < string > | null , licenseServerUri : string , persistentStateRequired : boolean , serverCertificate : Uint8Array | null , serverCertificateUri : string , sessionType : string , videoRobustness : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/drm_info.js | |
declare namespace shaka.extern { | |
type InitDataOverride = { initData : Uint8Array , initDataType : string , keyId : string | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/error.js | |
declare namespace shaka.extern { | |
interface Error { | |
category : shaka.util.Error.Category ; | |
code : shaka.util.Error.Code ; | |
data : any [] ; | |
handled : boolean ; | |
severity : shaka.util.Error.Severity ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/error.js | |
declare namespace shaka.extern { | |
type RestrictionInfo = { hasAppRestrictions : boolean , missingKeys : string [] , restrictedKeyStatuses : string [] } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest.js | |
declare namespace shaka.extern { | |
/** | |
* Creates a SegmentIndex; returns a Promise that resolves after the | |
* SegmentIndex has been created. | |
*/ | |
type CreateSegmentIndexFunction = ( ) => Promise < any > ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest.js | |
declare namespace shaka.extern { | |
/** | |
* A function that fetches the crypto keys for AES-128. | |
* Returns a promise that resolves when the keys have been fetched. | |
*/ | |
type FetchCryptoKeysFunction = ( ) => Promise < any > ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest.js | |
declare namespace shaka.extern { | |
type Manifest = { gapCount : number , ignoreManifestTimestampsInSegmentsMode : boolean , imageStreams : shaka.extern.Stream [] , isLowLatency : boolean , nextUrl : string | null , offlineSessionIds : string [] , periodCount : number , presentationTimeline : shaka.media.PresentationTimeline , sequenceMode : boolean , serviceDescription : shaka.extern.ServiceDescription | null , startTime : number | null , textStreams : shaka.extern.Stream [] , type : string , variants : shaka.extern.Variant [] } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest.js | |
declare namespace shaka.extern { | |
type MssPrivateData = { codecPrivateData : string | null , duration : number , timescale : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest.js | |
declare namespace shaka.extern { | |
type Period = { audioStreams : shaka.extern.Stream [] , id : string , imageStreams : shaka.extern.Stream [] , textStreams : shaka.extern.Stream [] , videoStreams : shaka.extern.Stream [] } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest.js | |
declare namespace shaka.extern { | |
/** | |
* SegmentIndex minimal API. | |
*/ | |
interface SegmentIndex { | |
/** | |
* Finds the position of the segment for the given time, in seconds, relative | |
* to the start of the presentation. Returns the position of the segment | |
* with the largest end time if more than one segment is known for the given | |
* time. | |
*/ | |
find (time : number ) : number | null ; | |
/** | |
* Gets the SegmentReference for the segment at the given position. | |
* @param position The position of the segment as returned by find(). | |
*/ | |
get (position : number ) : shaka.media.SegmentReference | null ; | |
/** | |
* Gets number of already evicted segments. | |
*/ | |
getNumEvicted ( ) : number ; | |
/** | |
* Get number of references. | |
*/ | |
getNumReferences ( ) : number ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest.js | |
declare namespace shaka.extern { | |
type ServiceDescription = { maxLatency : number | null , maxPlaybackRate : number | null , minLatency : number | null , minPlaybackRate : number | null , targetLatency : number | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest.js | |
declare namespace shaka.extern { | |
type Stream = { accessibilityPurpose : shaka.media.ManifestParser.AccessibilityPurpose | null , audioSamplingRate : number | null , bandwidth ? : number , channelsCount : number | null , closeSegmentIndex ? : ( ) => any , closedCaptions : Map < string , string > | null , codecs : string , colorGamut ? : string , createSegmentIndex : shaka.extern.CreateSegmentIndexFunction , drmInfos : shaka.extern.DrmInfo [] , emsgSchemeIdUris : string [] | null , encrypted : boolean , external : boolean , fastSwitching : boolean , forced : boolean , frameRate ? : number , fullMimeTypes : Set < string > , groupId : string | null , hdr ? : string , height ? : number , id : number , isAudioMuxedInVideo : boolean , keyIds : Set < string > , kind ? : string , label : string | null , language : string , matchedStreams ? : any [] , mimeType : string , mssPrivateData ? : shaka.extern.MssPrivateData , originalId : string | null , originalLanguage : string | null , pixelAspectRatio ? : string , primary : boolean , roles : string [] , segmentIndex : shaka.media.SegmentIndex | null , spatialAudio : boolean , tilesLayout ? : string , trickModeVideo : any , type : string , videoLayout ? : string , width ? : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest.js | |
declare namespace shaka.extern { | |
type ThumbnailSprite = { height : number , positionX : number , positionY : number , width : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest.js | |
declare namespace shaka.extern { | |
type Variant = { allowedByApplication : boolean , allowedByKeySystem : boolean , audio : shaka.extern.Stream | null , bandwidth : number , decodingInfos : ( any | null ) [] , disabledUntilTime : number , id : number , language : string , primary : boolean , video : shaka.extern.Stream | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest.js | |
declare namespace shaka.extern { | |
type aesKey = { bitsKey : number , blockCipherMode : string , cryptoKey ? : webCrypto.CryptoKey | null , fetchKey ? : shaka.extern.CreateSegmentIndexFunction , firstMediaSequenceNumber : number , iv ? : Uint8Array } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest_parser.js | |
declare namespace shaka.extern { | |
/** | |
* Parses media manifests and handles manifest updates. | |
* | |
* Given a URI where the initial manifest is found, a parser will request the | |
* manifest, parse it, and return the resulting Manifest object. | |
* | |
* If the manifest requires updates (e.g. for live media), the parser will use | |
* background timers to update the same Manifest object. | |
* | |
* There are many ways for |start| and |stop| to be called. Implementations | |
* should support all cases: | |
* | |
* BASIC | |
* await parser.start(uri, playerInterface); | |
* await parser.stop(); | |
* | |
* INTERRUPTING | |
* const p = parser.start(uri, playerInterface); | |
* await parser.stop(); | |
* await p; | |
* | |
* |p| should be rejected with an OPERATION_ABORTED error. | |
* | |
* STOPPED BEFORE STARTING | |
* await parser.stop(); | |
*/ | |
interface ManifestParser { | |
/** | |
* Tells the parser that a location should be banned. This is called on | |
* retry. | |
*/ | |
banLocation (uri : string ) : any ; | |
/** | |
* Called by the Player to provide an updated configuration any time the | |
* configuration changes. Will be called at least once before start(). | |
*/ | |
configure (config : shaka.extern.ManifestConfiguration , isPreloadFn ? : ( ) => boolean ) : any ; | |
/** | |
* Tells the parser that the expiration time of an EME session has changed. | |
* Implementing this is optional. | |
*/ | |
onExpirationUpdated (sessionId : string , expiration : number ) : any ; | |
/** | |
* Tells the parser that the initial variant has been chosen. | |
*/ | |
onInitialVariantChosen (variant : shaka.extern.Variant ) : any ; | |
/** | |
* Set media element. | |
*/ | |
setMediaElement (mediaElement : HTMLMediaElement | null ) : any ; | |
/** | |
* Initialize and start the parser. When |start| resolves, it should return | |
* the initial version of the manifest. |start| will only be called once. If | |
* |stop| is called while |start| is pending, |start| should reject. | |
* @param uri The URI of the manifest. | |
* @param playerInterface The player interface contains the callbacks and members that the parser can use to communicate with the player and outside world. | |
*/ | |
start (uri : string , playerInterface : shaka.extern.ManifestParser.PlayerInterface ) : Promise < shaka.extern.Manifest > ; | |
/** | |
* Tell the parser that it must stop and free all internal resources as soon | |
* as possible. Only once all internal resources are stopped and freed will | |
* the promise resolve. Once stopped a parser will not be started again. | |
* | |
* The parser should support having |stop| called multiple times and the | |
* promise should always resolve. | |
*/ | |
stop ( ) : Promise < any > ; | |
/** | |
* Tells the parser to do a manual manifest update. Implementing this is | |
* optional. This is only called when 'emsg' boxes are present. | |
*/ | |
update ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest_parser.js | |
declare namespace shaka.extern.ManifestParser { | |
/** | |
* A factory for creating the manifest parser. This function is registered with | |
* shaka.media.ManifestParser to create parser instances. | |
*/ | |
type Factory = ( ) => shaka.extern.ManifestParser ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/manifest_parser.js | |
declare namespace shaka.extern.ManifestParser { | |
type PlayerInterface = { addFont : (a : string , b : string ) => any , disableStream : (a : shaka.extern.Stream ) => any , filter : (a : shaka.extern.Manifest ) => Promise < any > , getBandwidthEstimate : ( ) => number , isLowLatencyMode : ( ) => boolean , makeTextStreamsForClosedCaptions : (a : shaka.extern.Manifest ) => any , networkingEngine : shaka.net.NetworkingEngine , newDrmInfo : (a : shaka.extern.Stream ) => any , onError : (a : shaka.util.Error ) => any , onEvent : shaka.util.EventManager.ListenerType , onManifestUpdated : ( ) => any , onMetadata : (a : string , b : number , c : number | null , d : shaka.extern.MetadataFrame [] ) => any , onTimelineRegionAdded : (a : shaka.extern.TimelineRegionInfo ) => any , updateDuration : ( ) => any } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/mp4_parser.js | |
declare namespace shaka.extern { | |
type ParsedBox = { flags : number | null , has64BitSize : boolean , name : string , parser : shaka.util.Mp4Parser , partialOkay : boolean , reader : shaka.util.DataViewReader , size : number , start : number , version : number | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/net.js | |
declare namespace shaka.extern { | |
type HeadersReceived = (a : { [ key: string ]: string } ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/net.js | |
declare namespace shaka.extern { | |
type ProgressUpdated = (a : number , b : number , c : number ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/net.js | |
declare namespace shaka.extern { | |
type Request = { allowCrossSiteCredentials : boolean , body : ArrayBuffer | ArrayBufferView | null , contentType ? : string | null , drmInfo : shaka.extern.DrmInfo | null , headers : { [ key: string ]: string } , initData : Uint8Array | null , initDataType : string | null , licenseRequestType : string | null , method : string , packetNumber ? : number | null , requestStartTime ? : number | null , retryParameters : shaka.extern.RetryParameters , sessionId : string | null , streamDataCallback : ( (a : ArrayBuffer | ArrayBufferView ) => Promise < any > ) | null , timeToFirstByte ? : number | null , uris : string [] } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/net.js | |
declare namespace shaka.extern { | |
type RequestContext = { isPreload ? : boolean , segment ? : shaka.media.SegmentReference | null , stream ? : shaka.extern.Stream , type ? : shaka.net.NetworkingEngine.AdvancedRequestType } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/net.js | |
declare namespace shaka.extern { | |
/** | |
* Defines a filter for requests. This filter takes the request and modifies | |
* it before it is sent to the scheme plugin. | |
* The RequestType describes the basic type of the request (manifest, segment, | |
* etc). The optional RequestContext will be provided where applicable to | |
* provide additional information about the request. A request filter can run | |
* asynchronously by returning a promise; in this case, the request will not be | |
* sent until the promise is resolved. | |
*/ | |
type RequestFilter = (a : shaka.net.NetworkingEngine.RequestType , b : shaka.extern.Request , c ? : shaka.extern.RequestContext ) => Promise < any > | void ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/net.js | |
declare namespace shaka.extern { | |
type Response = { data : ArrayBuffer | ArrayBufferView , fromCache ? : boolean , headers : { [ key: string ]: string } , originalRequest : shaka.extern.Request , originalUri : string , status ? : number , timeMs ? : number , uri : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/net.js | |
declare namespace shaka.extern { | |
/** | |
* Defines a filter for responses. This filter takes the response and modifies | |
* it before it is returned. | |
* The RequestType describes the basic type of the request (manifest, segment, | |
* etc). The optional RequestContext will be provided where applicable to | |
* provide additional information about the request. A response filter can run | |
* asynchronously by returning a promise. | |
*/ | |
type ResponseFilter = (a : shaka.net.NetworkingEngine.RequestType , b : shaka.extern.Response , c ? : shaka.extern.RequestContext ) => Promise < any > | void ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/net.js | |
declare namespace shaka.extern { | |
type RetryParameters = { backoffFactor : number , baseDelay : number , connectionTimeout : number , fuzzFactor : number , maxAttempts : number , stallTimeout : number , timeout : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/net.js | |
declare namespace shaka.extern { | |
type SchemePlugin = (a : string , b : shaka.extern.Request , c : shaka.net.NetworkingEngine.RequestType , d : shaka.extern.ProgressUpdated , e : shaka.extern.HeadersReceived , f : shaka.extern.SchemePluginConfig ) => shaka.extern.IAbortableOperation < shaka.extern.Response > ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/net.js | |
declare namespace shaka.extern { | |
type SchemePluginConfig = { minBytesForProgressEvents ? : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js | |
declare namespace shaka.extern { | |
type EmeSessionDB = { audioCapabilities : { contentType : string , robustness : string } [] , keySystem : string , licenseUri : string , serverCertificate : Uint8Array | null , sessionId : string , videoCapabilities : { contentType : string , robustness : string } [] } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js | |
declare namespace shaka.extern { | |
/** | |
* Similar to storage cells (shaka.extern.StorageCell), an EmeSessionStorageCell | |
* stores data persistently. This only stores the license's session info, not | |
* the license itself. The license itself is stored using EME. | |
*/ | |
interface EmeSessionStorageCell { | |
/** | |
* Adds the given sessions to the store. | |
*/ | |
add (sessions : shaka.extern.EmeSessionDB [] ) : Promise < any > ; | |
/** | |
* Free all resources used by this cell. This won't affect the stored content. | |
*/ | |
destroy ( ) : Promise < any > ; | |
/** | |
* Gets the currently stored sessions. | |
*/ | |
getAll ( ) : Promise < shaka.extern.EmeSessionDB [] > ; | |
/** | |
* Removes the given session IDs from the store. | |
*/ | |
remove (sessionIds : string [] ) : Promise < any > ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js | |
declare namespace shaka.extern { | |
type ManifestDB = { appMetadata : object | null , creationTime : number , drmInfo : shaka.extern.DrmInfo | null , duration : number , expiration : number , isIncomplete ? : boolean , originalManifestUri : string , sequenceMode ? : boolean , sessionIds : string [] , size : number , streams : shaka.extern.StreamDB [] , type ? : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js | |
declare namespace shaka.extern { | |
type OfflineSupport = { basic : boolean , encrypted : { [ key: string ]: boolean } } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js | |
declare namespace shaka.extern { | |
type SegmentDB = { appendWindowEnd : number , appendWindowStart : number , codecs : string | null , dataKey : number , endTime : number , initSegmentKey : number | null , mimeType : string | null , pendingInitSegmentRefId ? : string , pendingSegmentRefId ? : string , startTime : number , thumbnailSprite : shaka.media.SegmentReference.ThumbnailSprite | null , tilesLayout : string | null , timestampOffset : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js | |
declare namespace shaka.extern { | |
type SegmentDataDB = { data : ArrayBuffer } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js | |
declare namespace shaka.extern { | |
/** | |
* An interface that defines access to collection of segments and manifests. All | |
* methods are designed to be batched operations allowing the implementations to | |
* optimize their operations based on how they store data. | |
* | |
* The storage cell is one of two exposed APIs used to control where and how | |
* offline content is saved. The storage cell is responsible for converting | |
* information between its internal structures and the external (library) | |
* structures. | |
*/ | |
interface StorageCell { | |
/** | |
* Add a group of manifests. Will return a promise that resolves with a list | |
* of keys for each manifest. If one manifest fails to be added, all manifests | |
* should fail to be added. | |
*/ | |
addManifests (manifests : shaka.extern.ManifestDB [] ) : Promise < number [] > ; | |
/** | |
* Add a group of segments. Will return a promise that resolves with a list | |
* of keys for each segment. If one segment fails to be added, all segments | |
* should fail to be added. | |
*/ | |
addSegments (segments : shaka.extern.SegmentDataDB [] ) : Promise < number [] > ; | |
/** | |
* Free all resources used by this cell. This should not affect the stored | |
* content. | |
*/ | |
destroy ( ) : Promise < any > ; | |
/** | |
* Get all manifests stored in this cell. Since manifests are small compared | |
* to the asset they describe, it is assumed that it is feasible to have them | |
* all in main memory at one time. | |
*/ | |
getAllManifests ( ) : Promise < Map < number , shaka.extern.ManifestDB > > ; | |
/** | |
* Get a group of manifests using their keys to identify them. If any key is | |
* not found, the promise chain will be rejected. | |
*/ | |
getManifests (keys : number [] ) : Promise < shaka.extern.ManifestDB [] > ; | |
/** | |
* Get a group of segments using their keys to identify them. If any key is | |
* not found, the promise chain will be rejected. | |
*/ | |
getSegments (keys : number [] ) : Promise < shaka.extern.SegmentDataDB [] > ; | |
/** | |
* Check if the cell can support new keys. If a cell has a fixed key space, | |
* then all add-operations will fail as no new keys can be added. All | |
* remove-operations and update-operations should still work. | |
*/ | |
hasFixedKeySpace ( ) : boolean ; | |
/** | |
* Remove a group of manifests using their keys to identify them. If a key | |
* is not found, then that removal should be considered successful. | |
* @param onRemove A callback for when a manifest is removed from the cell. The key of the manifest will be passed to the callback. | |
*/ | |
removeManifests (keys : number [] , onRemove : (a : number ) => any ) : Promise < any > ; | |
/** | |
* Remove a group of segments using their keys to identify them. If a key | |
* is not found, then that removal should be considered successful. | |
* @param onRemove A callback for when a segment is removed from the cell. The key of the segment will be passed to the callback. | |
*/ | |
removeSegments (keys : number [] , onRemove : (a : number ) => any ) : Promise < any > ; | |
/** | |
* Updates the given manifest, stored at the given key. | |
*/ | |
updateManifest (key : number , manifest : shaka.extern.ManifestDB ) : Promise < any > ; | |
/** | |
* Replace the expiration time of the manifest stored under |key| with | |
* |newExpiration|. If no manifest is found under |key| then this should | |
* act as a no-op. | |
*/ | |
updateManifestExpiration (key : number , expiration : number ) : Promise < any > ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js | |
declare namespace shaka.extern { | |
/** | |
* Storage mechanisms are one of two exported storage APIs. Storage mechanisms | |
* are groups of storage cells (shaka.extern.StorageCell). Storage mechanisms | |
* are responsible for managing the life cycle of resources shared between | |
* storage cells in the same block. | |
* | |
* For example, a storage mechanism may manage a single database connection | |
* while each cell would manage different tables in the database via the same | |
* connection. | |
*/ | |
interface StorageMechanism { | |
/** | |
* Free all resources used by the storage mechanism and its cells. This should | |
* not affect the stored content. | |
*/ | |
destroy ( ) : Promise < any > ; | |
/** | |
* Erase all content from storage and leave storage in an empty state. Erase | |
* may be called with or without |init|. This allows for storage to be wiped | |
* in case of a version mismatch. | |
* | |
* After calling |erase|, the mechanism will be in an initialized state. | |
*/ | |
erase ( ) : Promise < any > ; | |
/** | |
* Get a map of all the cells managed by the storage mechanism. Editing the | |
* map should have no effect on the storage mechanism. The map key is the | |
* cell's address in the mechanism and should be consistent between calls to | |
* |getCells|. | |
*/ | |
getCells ( ) : Map < string , shaka.extern.StorageCell > ; | |
/** | |
* Get the current EME session storage cell. | |
*/ | |
getEmeSessionCell ( ) : shaka.extern.EmeSessionStorageCell ; | |
/** | |
* Initialize the storage mechanism for first use. This should only be called | |
* once. Calling |init| multiple times has an undefined behaviour. | |
*/ | |
init ( ) : Promise < any > ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js | |
declare namespace shaka.extern { | |
type StoredContent = { appMetadata : object | null , duration : number , expiration : number , isIncomplete : boolean , offlineUri : string | null , originalManifestUri : string , size : number , tracks : shaka.extern.TrackList } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js | |
declare namespace shaka.extern { | |
type StreamDB = { audioSamplingRate : number | null , channelsCount : number | null , closedCaptions : Map < string , string > | null , codecs : string , colorGamut ? : string , encrypted : boolean , external : boolean , fastSwitching : boolean , forced : boolean , frameRate ? : number , groupId : string | null , hdr ? : string , height : number | null , id : number , isAudioMuxedInVideo : boolean , keyIds : Set < string > , kind ? : string , label : string | null , language : string , mimeType : string , mssPrivateData ? : shaka.extern.MssPrivateData , originalId : string | null , originalLanguage ? : string | null , pixelAspectRatio ? : string , primary : boolean , roles : string [] , segments : shaka.extern.SegmentDB [] , spatialAudio : boolean , tilesLayout ? : string , type : string , variantIds : number [] , videoLayout ? : string , width : number | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v1.js | |
declare namespace shaka.extern { | |
type ManifestDBV1 = { appMetadata : object | null , drmInfo : shaka.extern.DrmInfo | null , duration : number , expiration : number , key : number , originalManifestUri : string , periods : shaka.extern.PeriodDBV1 [] , sessionIds : string [] , size : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v1.js | |
declare namespace shaka.extern { | |
type PeriodDBV1 = { startTime : number , streams : shaka.extern.StreamDBV1 [] } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v1.js | |
declare namespace shaka.extern { | |
type SegmentDBV1 = { endTime : number , startTime : number , uri : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v1.js | |
declare namespace shaka.extern { | |
type SegmentDataDBV1 = { data : ArrayBuffer , key : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v1.js | |
declare namespace shaka.extern { | |
type StreamDBV1 = { codecs : string , contentType : string , encrypted : boolean , frameRate ? : number , height : number | null , id : number , initSegmentUri : string | null , keyId : string | null , kind ? : string , label : string | null , language : string , mimeType : string , presentationTimeOffset : number , primary : boolean , segments : shaka.extern.SegmentDBV1 [] , variantIds : number [] , width : number | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v2.js | |
declare namespace shaka.extern { | |
type ManifestDBV2 = { appMetadata : object | null , drmInfo : shaka.extern.DrmInfo | null , duration : number , expiration : number , originalManifestUri : string , periods : shaka.extern.PeriodDBV2 [] , sessionIds : string [] , size : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v2.js | |
declare namespace shaka.extern { | |
type PeriodDBV2 = { startTime : number , streams : shaka.extern.StreamDBV2 [] } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v2.js | |
declare namespace shaka.extern { | |
type SegmentDBV2 = { dataKey : number , endTime : number , startTime : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v2.js | |
declare namespace shaka.extern { | |
type SegmentDataDBV2 = { data : ArrayBuffer } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v2.js | |
declare namespace shaka.extern { | |
type StreamDBV2 = { codecs : string , contentType : string , encrypted : boolean , frameRate ? : number , height : number | null , id : number , initSegmentKey : number | null , keyId : string | null , kind ? : string , label : string | null , language : string , mimeType : string , originalId : string | null , pixelAspectRatio ? : string , presentationTimeOffset : number , primary : boolean , segments : shaka.extern.SegmentDBV2 [] , variantIds : number [] , width : number | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type AbrConfiguration = { advanced : shaka.extern.AdvancedAbrConfiguration , bandwidthDowngradeTarget : number , bandwidthUpgradeTarget : number , cacheLoadThreshold : number , clearBufferSwitch : boolean , defaultBandwidthEstimate : number , enabled : boolean , ignoreDevicePixelRatio : boolean , minTimeToSwitch : number , preferNetworkInformationBandwidth : boolean , restrictToElementSize : boolean , restrictToScreenSize : boolean , restrictions : shaka.extern.Restrictions , safeMarginSwitch : number , switchInterval : number , useNetworkInformation : boolean } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type AdsConfiguration = { customPlayheadTracker : boolean , disableDASHInterstitial : boolean , disableHLSInterstitial : boolean , skipPlayDetection : boolean , supportsMultipleMediaElements : boolean } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type AdvancedAbrConfiguration = { fastHalfLife : number , minBytes : number , minTotalBytes : number , slowHalfLife : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type AdvancedDrmConfiguration = { audioRobustness : string [] | null , distinctiveIdentifierRequired : boolean , headers : { [ key: string ]: string } , individualizationServer : string , persistentStateRequired : boolean , serverCertificate : Uint8Array | null , serverCertificateUri : string , sessionType : string , videoRobustness : string [] | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type BufferedInfo = { audio : shaka.extern.BufferedRange [] , text : shaka.extern.BufferedRange [] , total : shaka.extern.BufferedRange [] , video : shaka.extern.BufferedRange [] } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type BufferedRange = { end : number , start : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type Chapter = { endTime : number , id : string , startTime : number , title : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type CmcdConfiguration = { contentId : string , enabled : boolean , includeKeys : string [] , rtpSafetyFactor : number , sessionId : string , useHeaders : boolean , version : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type CmsdConfiguration = { applyMaximumSuggestedBitrate : boolean , enabled : boolean , estimatedThroughputWeightRatio : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type DashManifestConfiguration = { autoCorrectDrift : boolean , clockSyncUri : string , disableXlinkProcessing : boolean , enableFastSwitching : boolean , ignoreDrmInfo : boolean , ignoreEmptyAdaptationSet : boolean , ignoreMaxSegmentDuration : boolean , ignoreMinBufferTime : boolean , ignoreSuggestedPresentationDelay : boolean , ignoreSupplementalCodecs : boolean , initialSegmentLimit : number , keySystemsByURI : { [ key: string ]: string } , manifestPreprocessor : (a : Element ) => any , manifestPreprocessorTXml : (a : shaka.extern.xml.Node ) => any , multiTypeVariantsAllowed : boolean , sequenceMode : boolean , updatePeriod : number , useStreamOnceInPeriodFlattening : boolean , xlinkFailGracefully : boolean } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type DrmConfiguration = { advanced : { [ key: string ]: shaka.extern.AdvancedDrmConfiguration } | null , clearKeys : { [ key: string ]: string } , defaultAudioRobustnessForWidevine : string , defaultVideoRobustnessForWidevine : string , delayLicenseRequestUntilPlayed : boolean , ignoreDuplicateInitData : boolean , initDataTransform ? : shaka.extern.InitDataTransform , keySystemsMapping : { [ key: string ]: string } , logLicenseExchange : boolean , minHdcpVersion : string , parseInbandPsshEnabled : boolean , persistentSessionOnlinePlayback : boolean , persistentSessionsMetadata : shaka.extern.PersistentSessionMetadata [] , preferredKeySystems : string [] , retryParameters : shaka.extern.RetryParameters , servers : { [ key: string ]: string } , updateExpirationTime : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type DrmSessionMetadata = { initData : Uint8Array | null , initDataType : string | null , sessionId : string , sessionType : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type DrmSupportType = { audioRobustnessLevels : string [] , encryptionSchemes : ( string | null ) [] , minHdcpVersions : string [] , persistentState : boolean , videoRobustnessLevels : string [] } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type DynamicTargetLatencyConfiguration = { enabled : boolean , maxAttempts : number , maxLatency : number , minLatency : number , rebufferIncrement : number , stabilityThreshold : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type EmsgInfo = { endTime : number , eventDuration : number , id : number , messageData : Uint8Array | null , presentationTimeDelta : number , schemeIdUri : string , startTime : number , timescale : number , value : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type ExtraText = { codecs ? : string , kind : string , language : string , mime : string , uri : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type HLSInterstitial = { endTime : number | null , startTime : number , values : shaka.extern.MetadataFrame [] } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type HlsManifestConfiguration = { allowLowLatencyByteRangeOptimization : boolean , defaultAudioCodec : string , defaultVideoCodec : string , disableClosedCaptionsDetection : boolean , disableCodecGuessing : boolean , ignoreImageStreamFailures : boolean , ignoreManifestProgramDateTime : boolean , ignoreManifestProgramDateTimeForTypes : string [] , ignoreManifestTimestampsInSegmentsMode : boolean , ignoreSupplementalCodecs : boolean , ignoreTextStreamFailures : boolean , liveSegmentsDelay : number , mediaPlaylistFullMimeType : string , sequenceMode : boolean , updatePeriod : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type ID3Metadata = { cueTime : number | null , data : Uint8Array , dts : number | null , frames : shaka.extern.MetadataFrame [] , pts : number | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type InitDataTransform = (a : Uint8Array , b : string , c : shaka.extern.DrmInfo | null ) => Uint8Array ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type LanguageRole = { label : string | null , language : string , role : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type LcevcConfiguration = { drawLogo : boolean , dynamicPerformanceScaling : boolean , enabled : boolean , logLevel : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type LiveSyncConfiguration = { dynamicTargetLatency : shaka.extern.DynamicTargetLatencyConfiguration , enabled : boolean , maxPlaybackRate : number , minPlaybackRate : number , panicMode : boolean , panicThreshold : number , targetLatency : number , targetLatencyTolerance : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type ManifestConfiguration = { availabilityWindowOverride : number , continueLoadingWhenPaused : boolean , dash : shaka.extern.DashManifestConfiguration , defaultPresentationDelay : number , disableAudio : boolean , disableIFrames : boolean , disableText : boolean , disableThumbnails : boolean , disableVideo : boolean , hls : shaka.extern.HlsManifestConfiguration , mss : shaka.extern.MssManifestConfiguration , raiseFatalErrorOnManifestUpdateRequestFailure : boolean , retryParameters : shaka.extern.RetryParameters , segmentRelativeVttTiming : boolean } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type MediaQualityInfo = { audioSamplingRate : number | null , bandwidth : number , channelsCount : number | null , codecs : string , contentType : string , frameRate : number | null , height : number | null , label : string | null , language : string | null , mimeType : string | null , pixelAspectRatio : string | null , roles : string [] | null , width : number | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type MediaSourceConfiguration = { addExtraFeaturesToSourceBuffer : (a : string ) => string , codecSwitchingStrategy : shaka.config.CodecSwitchingStrategy , dispatchAllEmsgBoxes : boolean , forceTransmux : boolean , insertFakeEncryptionInInit : boolean , modifyCueCallback : shaka.extern.TextParser.ModifyCueCallback } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type MetadataFrame = { data : ArrayBuffer | null | string | number , description : string , key : string , mimeType : string | null , pictureType : number | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type MetadataRawFrame = { data : Uint8Array | null , size : number , type : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type MssManifestConfiguration = { keySystemsBySystemId : { [ key: string ]: string } , manifestPreprocessor : (a : Element ) => any , manifestPreprocessorTXml : (a : shaka.extern.xml.Node ) => any , sequenceMode : boolean } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type OfflineConfiguration = { downloadSizeCallback : (a : number ) => Promise < boolean > , numberOfParallelDownloads : number , progressCallback : (a : shaka.extern.StoredContent , b : number ) => any , trackSelectionCallback : (a : shaka.extern.TrackList ) => Promise < shaka.extern.TrackList > , usePersistentLicense : boolean } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type PersistentSessionMetadata = { initData : Uint8Array | null , initDataType : string | null , sessionId : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type PlaybackInfo = { audio : shaka.extern.PlaybackStreamInfo | null , text : shaka.extern.PlaybackStreamInfo | null , video : shaka.extern.PlaybackStreamInfo | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type PlaybackStreamInfo = { bandwidth : number , codecs : string , height : number | null , mimeType : string , width : number | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type PlayerConfiguration = { abr : shaka.extern.AbrConfiguration , abrFactory : shaka.extern.AbrManager.Factory , adaptationSetCriteriaFactory : shaka.media.AdaptationSetCriteria.Factory , ads : shaka.extern.AdsConfiguration , autoShowText : shaka.config.AutoShowText , cmcd : shaka.extern.CmcdConfiguration , cmsd : shaka.extern.CmsdConfiguration , drm : shaka.extern.DrmConfiguration , ignoreHardwareResolution : boolean , lcevc : shaka.extern.LcevcConfiguration , manifest : shaka.extern.ManifestConfiguration , mediaSource : shaka.extern.MediaSourceConfiguration , offline : shaka.extern.OfflineConfiguration , playRangeEnd : number , playRangeStart : number , preferForcedSubs : boolean , preferSpatialAudio : boolean , preferredAudioChannelCount : number , preferredAudioCodecs : string [] , preferredAudioLabel : string , preferredAudioLanguage : string , preferredDecodingAttributes : string [] , preferredTextFormats : string [] , preferredTextLanguage : string , preferredTextRole : string , preferredVariantRole : string , preferredVideoCodecs : string [] , preferredVideoHdrLevel : string , preferredVideoLabel : string , preferredVideoLayout : string , restrictions : shaka.extern.Restrictions , streaming : shaka.extern.StreamingConfiguration , textDisplayFactory : shaka.extern.TextDisplayer.Factory , textDisplayer : shaka.extern.TextDisplayerConfiguration } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type ProducerReferenceTime = { programStartDate : Date | null , wallClockTime : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type Restrictions = { maxBandwidth : number , maxChannelsCount : number , maxFrameRate : number , maxHeight : number , maxPixels : number , maxWidth : number , minBandwidth : number , minChannelsCount : number , minFrameRate : number , minHeight : number , minPixels : number , minWidth : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type StateChange = { duration : number , state : string , timestamp : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type Stats = { bufferingTime : number , bytesDownloaded : number , completionPercent : number , corruptedFrames : number , decodedFrames : number , drmTimeSeconds : number , droppedFrames : number , estimatedBandwidth : number , gapsJumped : number , height : number , licenseTime : number , liveLatency : number , loadLatency : number , manifestGapCount : number , manifestPeriodCount : number , manifestSizeBytes : number , manifestTimeSeconds : number , maxSegmentDuration : number , nonFatalErrorCount : number , pauseTime : number , playTime : number , stallsDetected : number , stateHistory : shaka.extern.StateChange [] , streamBandwidth : number , switchHistory : shaka.extern.TrackChoice [] , width : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type StreamingConfiguration = { allowMediaSourceRecoveries : boolean , alwaysStreamText : boolean , bufferBehind : number , bufferingGoal : number , clearDecodingCache : boolean , disableAudioPrefetch : boolean , disableTextPrefetch : boolean , disableVideoPrefetch : boolean , dontChooseCodecs : boolean , durationBackoff : number , evictionGoal : number , failureCallback : (a : shaka.util.Error ) => any , forceHTTP : boolean , forceHTTPS : boolean , gapDetectionThreshold : number , gapJumpTimerTime : number , gapPadding : number , ignoreTextStreamFailures : boolean , inaccurateManifestTolerance : number , liveSync : shaka.extern.LiveSyncConfiguration , loadTimeout : number , lowLatencyMode : boolean , maxDisabledTime : number , minBytesForProgressEvents : number , minTimeBetweenRecoveries : number , observeQualityChanges : boolean , preferNativeDash : boolean , preferNativeHls : boolean , prefetchAudioLanguages : string [] , preloadNextUrlWindow : number , rebufferingGoal : number , retryParameters : shaka.extern.RetryParameters , safeSeekEndOffset : number , safeSeekOffset : number , segmentPrefetchLimit : number , shouldFixTimestampOffset : boolean , stallEnabled : boolean , stallSkip : number , stallThreshold : number , startAtSegmentBoundary : boolean , updateIntervalSeconds : number , useNativeHlsForFairPlay : boolean , vodDynamicPlaybackRate : boolean , vodDynamicPlaybackRateBufferRatio : number , vodDynamicPlaybackRateLowBufferRate : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type SupportType = { drm : { [ key: string ]: shaka.extern.DrmSupportType | null } , hardwareResolution : shaka.extern.Resolution , manifest : { [ key: string ]: boolean } , media : { [ key: string ]: boolean } } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type TextDisplayerConfiguration = { captionsUpdatePeriod : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type Thumbnail = { duration : number , height : number , imageHeight : number , imageWidth : number , positionX : number , positionY : number , segment : shaka.media.SegmentReference | null , sprite : boolean , startTime : number , uris : string [] , width : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type TimelineRegionInfo = { endTime : number , eventElement : Element | null , eventNode : shaka.extern.xml.Node | null , id : string , schemeIdUri : string , startTime : number , value : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type Track = { accessibilityPurpose : shaka.media.ManifestParser.AccessibilityPurpose | null , active : boolean , audioBandwidth : number | null , audioCodec : string | null , audioId : number | null , audioMimeType : string | null , audioRoles : string [] | null , audioSamplingRate : number | null , bandwidth : number , channelsCount : number | null , codecs : string | null , colorGamut : string | null , forced : boolean , frameRate : number | null , hdr : string | null , height : number | null , id : number , kind : string | null , label : string | null , language : string , mimeType : string | null , originalAudioId : string | null , originalImageId : string | null , originalLanguage : string | null , originalTextId : string | null , originalVideoId : string | null , pixelAspectRatio : string | null , primary : boolean , roles : string [] , spatialAudio : boolean , tilesLayout : string | null , type : string , videoBandwidth : number | null , videoCodec : string | null , videoId : number | null , videoLayout : string | null , videoMimeType : string | null , width : number | null } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type TrackChoice = { bandwidth : number | null , fromAdaptation : boolean , id : number , timestamp : number , type : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern { | |
type TrackList = shaka.extern.Track [] ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js | |
declare namespace shaka.extern.xml { | |
type Node = { attributes : { [ key: string ]: string } , children : any [] , parent : any , tagName : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/resolution.js | |
declare namespace shaka.extern { | |
type Resolution = { height : number , width : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/text.js | |
declare namespace shaka.extern { | |
interface TextDisplayer extends shaka.util.IDestroyable { | |
/** | |
* Append given text cues to the list of cues to be displayed. | |
* @param cues Text cues to be appended. | |
*/ | |
append (cues : shaka.text.Cue [] ) : any ; | |
/** | |
* Sets the TextDisplayer configuration. | |
*/ | |
configure (config : shaka.extern.TextDisplayerConfiguration ) : any ; | |
destroy ( ) : Promise < any > ; | |
/** | |
* Enable the current text displayer. | |
*/ | |
enableTextDisplayer ( ) : any ; | |
/** | |
* Returns true if text is currently visible. | |
*/ | |
isTextVisible ( ) : boolean ; | |
/** | |
* Remove all cues that are fully contained by the given time range (relative | |
* to the presentation). <code>endTime</code> will be greater to equal to | |
* <code>startTime</code>. <code>remove</code> should only return | |
* <code>false</code> if the displayer has been destroyed. If the displayer | |
* has not been destroyed <code>remove</code> should return <code>true</code>. | |
*/ | |
remove (startTime : number , endTime : number ) : boolean ; | |
/** | |
* Set the current language. | |
*/ | |
setTextLanguage (language : string ) : any ; | |
/** | |
* Set text visibility. | |
*/ | |
setTextVisibility (on : boolean ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/text.js | |
declare namespace shaka.extern.TextDisplayer { | |
/** | |
* A factory for creating a TextDisplayer. | |
*/ | |
type Factory = ( ) => shaka.extern.TextDisplayer ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/text.js | |
declare namespace shaka.extern { | |
/** | |
* An interface for plugins that parse text tracks. | |
*/ | |
interface TextParser { | |
/** | |
* Parse an initialization segment. Some formats do not have init | |
* segments so this won't always be called. | |
* @param data The data that makes up the init segment. | |
*/ | |
parseInit (data : Uint8Array ) : any ; | |
/** | |
* Parse a media segment and return the cues that make up the segment. | |
* @param data The next section of buffer. | |
* @param timeContext The time information that should be used to adjust the times values for each cue. | |
* @param uri The media uri. | |
*/ | |
parseMedia (data : Uint8Array , timeContext : shaka.extern.TextParser.TimeContext , uri : string | undefined | null , images : string [] ) : shaka.text.Cue [] ; | |
/** | |
* Notifies the manifest type. | |
*/ | |
setManifestType (manifestType : string ) : any ; | |
/** | |
* Notifies the stream if the manifest is in sequence mode or not. | |
*/ | |
setSequenceMode (sequenceMode : boolean ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/text.js | |
declare namespace shaka.extern.TextParser { | |
/** | |
* A callback used for editing cues before appending. | |
* Provides the cue, the URI of the captions file the cue was parsed from, and | |
* the time context that was used when generating that cue. | |
* You can edit the cue object passed in. | |
*/ | |
type ModifyCueCallback = (a : shaka.text.Cue , b : string | null , c : shaka.extern.TextParser.TimeContext ) => any ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/text.js | |
declare namespace shaka.extern.TextParser { | |
/** | |
* A collection of time offsets used to adjust text cue times. | |
*/ | |
type TimeContext = { periodStart : number , segmentEnd : number , segmentStart : number , vttOffset : number } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/text.js | |
declare namespace shaka.extern { | |
type TextParserPlugin = ( ) => shaka.extern.TextParser ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/transmuxer.js | |
declare namespace shaka.extern { | |
/** | |
* An interface for transmuxer plugins. | |
*/ | |
interface Transmuxer { | |
/** | |
* For any stream, convert its codecs to MP4 codecs. | |
*/ | |
convertCodecs (contentType : string , mimeType : string ) : string ; | |
/** | |
* Destroy | |
*/ | |
destroy ( ) : any ; | |
/** | |
* Returns the original mimetype of the transmuxer. | |
*/ | |
getOriginalMimeType ( ) : string ; | |
/** | |
* Check if the mime type and the content type is supported. | |
*/ | |
isSupported (mimeType : string , contentType ? : string ) : boolean ; | |
/** | |
* Transmux a input data to MP4. | |
* @param reference The segment reference, or null for init segments | |
*/ | |
transmux (data : ArrayBuffer | ArrayBufferView , stream : shaka.extern.Stream , reference : shaka.media.SegmentReference | null , duration : number , contentType : string ) : Promise < Uint8Array > ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/transmuxer.js | |
declare namespace shaka.extern { | |
type TransmuxerPlugin = ( ) => shaka.extern.Transmuxer ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js | |
declare namespace shaka.extern { | |
/** | |
* Interface for UI elements. UI elements should inherit from the concrete base | |
* class shaka.ui.Element. The members defined in this extern's constructor are | |
* all available from the base class, and are defined here to keep the compiler | |
* from renaming them. | |
*/ | |
interface IUIElement extends shaka.util.IReleasable { | |
ad : shaka.extern.IAd | null ; | |
adManager : shaka.extern.IAdManager | null ; | |
controls : shaka.ui.Controls | null ; | |
eventManager : shaka.util.EventManager | null ; | |
localization : shaka.ui.Localization | null ; | |
parent : HTMLElement | null ; | |
player : shaka.Player | null ; | |
video : HTMLMediaElement | null ; | |
release ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js | |
declare namespace shaka.extern.IUIElement { | |
/** | |
* A factory for creating a UI element. | |
*/ | |
interface Factory { | |
create (rootElement : HTMLElement , controls : shaka.ui.Controls ) : shaka.extern.IUIElement ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js | |
declare namespace shaka.extern { | |
interface IUIPlayButton { | |
button : HTMLButtonElement ; | |
isEnded ( ) : boolean ; | |
isPaused ( ) : boolean ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js | |
declare namespace shaka.extern { | |
/** | |
* Interface for UI range elements. UI range elements should inherit from the | |
* concrete base class shaka.ui.RangeElement. The members defined in this | |
* extern's constructor are all available from the base class, and are defined | |
* here to keep the compiler from renaming them. | |
*/ | |
interface IUIRangeElement extends shaka.extern.IUIElement { | |
bar : HTMLInputElement ; | |
container : HTMLElement ; | |
changeTo (value : number ) : any ; | |
getValue ( ) : number ; | |
/** | |
* Called when a new value is set by user interaction. | |
* To be overridden by subclasses. | |
*/ | |
onChange ( ) : any ; | |
/** | |
* Called when user interaction ends. | |
* To be overridden by subclasses. | |
*/ | |
onChangeEnd ( ) : any ; | |
/** | |
* Called when user interaction begins. | |
* To be overridden by subclasses. | |
*/ | |
onChangeStart ( ) : any ; | |
setRange (min : number , max : number ) : any ; | |
setValue (value : number ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js | |
declare namespace shaka.extern { | |
/** | |
* Interface for SeekBars. SeekBars should inherit from the concrete base | |
* class shaka.ui.Element. If you do not need to totally rebuild the | |
* SeekBar, you should consider using shaka.ui.RangeElement or | |
* shaka.ui.SeekBar as your base class. | |
*/ | |
interface IUISeekBar extends shaka.extern.IUIRangeElement { | |
getValue ( ) : number ; | |
isShowing ( ) : boolean ; | |
setValue (value : number ) : any ; | |
/** | |
* Called by Controls on a timer to update the state of the seek bar. | |
* Also called internally when the user interacts with the input element. | |
*/ | |
update ( ) : any ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js | |
declare namespace shaka.extern.IUISeekBar { | |
/** | |
* A factory for creating a SeekBar element. | |
*/ | |
interface Factory { | |
create (rootElement : HTMLElement , controls : shaka.ui.Controls ) : shaka.extern.IUISeekBar ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js | |
declare namespace shaka.extern { | |
/** | |
* Interface for UI settings menus. UI settings menus should inherit from the | |
* concrete base class shaka.ui.SettingsMenu. The members defined in this | |
* extern's constructor are all available from the base class, and are defined | |
* here to keep the compiler from renaming them. | |
*/ | |
interface IUISettingsMenu extends shaka.extern.IUIElement { | |
backButton : HTMLButtonElement ; | |
backSpan : HTMLElement ; | |
button : HTMLButtonElement ; | |
currentSelection : HTMLElement ; | |
icon : HTMLElement ; | |
menu : HTMLElement ; | |
nameSpan : HTMLElement ; | |
} | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js | |
declare namespace shaka.extern { | |
type UIConfiguration = { adStatisticsList : string [] , addBigPlayButton : boolean , addSeekBar : boolean , castAndroidReceiverCompatible : boolean , castReceiverAppId : string , clearBufferOnQualityChange : boolean , contextMenuElements : string [] , controlPanelElements : string [] , customContextMenu : boolean , defaultVrProjectionMode : string , displayInVrMode : boolean , doubleClickForFullscreen : boolean , enableFullscreenOnRotation : boolean , enableKeyboardPlaybackControls : boolean , enableTooltips : boolean , fadeDelay : number , fastForwardRates : number [] , forceLandscapeOnFullscreen : boolean , fullScreenElement : HTMLElement | null , keyboardLargeSeekDistance : number , keyboardSeekDistance : number , overflowMenuButtons : string [] , playbackRates : number [] , preferDocumentPictureInPicture : boolean , preferVideoFullScreenInVisionOS : boolean , refreshTickInSeconds : number , rewindRates : number [] , seekBarColors : shaka.extern.UISeekBarColors , seekOnTaps : boolean , setupMediaSession : boolean , showAudioChannelCountVariants : boolean , showAudioCodec : boolean , showUnbufferedStart : boolean , showVideoCodec : boolean , singleClickForPlayAndPause : boolean , statisticsList : string [] , tapSeekDistance : number , textTrackLabelFormat : shaka.ui.Overlay.TrackLabelFormat , trackLabelFormat : shaka.ui.Overlay.TrackLabelFormat , volumeBarColors : shaka.extern.UIVolumeBarColors } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js | |
declare namespace shaka.extern { | |
type UISeekBarColors = { adBreaks : string , base : string , buffered : string , played : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js | |
declare namespace shaka.extern { | |
type UIVolumeBarColors = { base : string , level : string } ; | |
} | |
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/watermark.js | |
declare namespace shaka.ui.Watermark { | |
type Options = { alpha : number , color : string , displayDuration : number , interval : number , position : string , size : number , skip : number , text : string , transitionDuration : number , type : string } ; | |
} | |
export default shaka; |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
@license | |
Shaka Player | |
Copyright 2016 Google LLC | |
SPDX-License-Identifier: Apache-2.0 | |
*/ | |
(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/* | |
Copyright The Closure Library Authors. | |
SPDX-License-Identifier: Apache-2.0 | |
*/ | |
var p;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a}; | |
function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b})}} | |
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b}); | |
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a} | |
function u(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=u(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka; | |
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka; | |
function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Am=b.prototype}function qa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.B=this.i=null}function ra(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}qa.prototype.u=function(a){this.h=a}; | |
function sa(a,b){a.i={Rh:b,bi:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function G(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function H(a){a.g=0}function ta(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a,b){a.m=0;a.j=b||0}function wa(a,b,c){a.g=b;a.m=c||0}function ya(a,b){a.m=b||0;b=a.i.Rh;a.i=null;return b}function Ca(a){a.B=[a.i];a.m=0;a.j=0} | |
function Da(a,b){var c=a.B.splice(0)[0];(c=a.i=a.i||c)?c.bi?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function Fa(a){this.g=new qa;this.h=a}function Ga(a,b){ra(a.g);var c=a.g.l;if(c)return Ha(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ia(a)} | |
function Ha(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ia(a)}a.g.l=null;d.call(a.g,f);return Ia(a)}function Ia(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.bi)throw b.Rh;return{value:b.return,done:!0}}return{value:void 0,done:!0}} | |
function Ja(a){this.next=function(b){ra(a.g);a.g.l?b=Ha(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Ia(a));return b};this.throw=function(b){ra(a.g);a.g.l?b=Ha(a,a.g.l["throw"],b,a.g.u):(sa(a.g,b),b=Ia(a));return b};this.return=function(b){return Ga(a,b)};this[Symbol.iterator]=function(){return this}}function Ka(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})} | |
function P(a){return Ka(new Ja(new Fa(a)))}function Ma(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b} | |
fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k= | |
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.H),reject:g(this.l)}};b.prototype.H=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.G(g):this.m(g)}}; | |
b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.B()};b.prototype.I=function(){var g=this;e(function(){if(g.C()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.C= | |
function(){if(this.s)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.B=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c; | |
b.prototype.J=function(g){var h=this.j();g.Be(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,r){return"function"==typeof q?function(t){try{l(q(t))}catch(w){m(w)}}:r}var l,m,n=new b(function(q,r){l=q;m=r});this.Be(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Be=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i); | |
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=u(g),m=l.next();!m.done;m=l.next())d(m.value).Be(h,k)})};b.all=function(g){var h=u(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(t){return function(w){q[t]=w;r--;0==r&&l(q)}}var q=[],r=0;do q.push(void 0),r++,d(k.value).Be(n(q.length-1),m),k=h.next(); | |
while(!k.done)})};return b});function Na(a,b){return Object.prototype.hasOwnProperty.call(a,b)} | |
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=u(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Na(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}), | |
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Na(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Na(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Na(k, | |
g)&&Na(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Na(k,g)&&Na(k[g],this.g)?delete k[g][this.g]:!1};return b}); | |
fa("Map",function(a){function b(){var h={};return h.pc=h.next=h.head=h}function c(h,k){var l=h[1];return ha(function(){if(l){for(;l.head!=h[1];)l=l.pc;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&Na(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l, | |
list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=u(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(u([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!= | |
m.value[0].x||"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],pc:this[1].pc,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].pc.next=l.entry,this[1].pc=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.pc.next= | |
h.entry.next,h.entry.next.pc=h.entry.pc,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].pc=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach= | |
function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});function Oa(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Oa(this,function(b){return b})}}); | |
fa("Set",function(a){function b(c){this.g=new Map;if(c){c=u(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(u([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x|| | |
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]= | |
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}}); | |
fa("Array.prototype.values",function(a){return a?a:function(){return Oa(this,function(b,c){return c})}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}}); | |
function Pa(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Pa(this,b,"includes").indexOf(b,c||0)}}); | |
fa("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(0>e||1114111<e||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);65535>=e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}}); | |
function Ra(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{$h:e,v:f}}return{$h:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ra(this,b,c).$h}}); | |
fa("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=u(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b}); | |
fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ra(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Pa(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Na(b,d)&&c.push([d,b[d]]);return c}}); | |
var Sa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Na(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Sa});fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}}); | |
fa("Array.prototype.entries",function(a){return a?a:function(){return Oa(this,function(b,c){return[b,c]})}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Pa(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Number.EPSILON",function(){return Math.pow(2,-52)}); | |
fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});fa("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Na(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}}); | |
fa("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Pa(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}});fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});function Ta(a){a=Math.trunc(a)||0;0>a&&(a+=this.length);if(!(0>a||a>=this.length))return this[a]} | |
fa("Array.prototype.at",function(a){return a?a:Ta});function Va(a){return a?a:Ta}fa("Int8Array.prototype.at",Va);fa("Uint8Array.prototype.at",Va);fa("Uint8ClampedArray.prototype.at",Va);fa("Int16Array.prototype.at",Va);fa("Uint16Array.prototype.at",Va);fa("Int32Array.prototype.at",Va);fa("Uint32Array.prototype.at",Va);fa("Float32Array.prototype.at",Va);fa("Float64Array.prototype.at",Va);fa("String.prototype.at",function(a){return a?a:Ta});var Wa=this||self; | |
function S(a,b){a=a.split(".");var c=Wa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/* | |
@license | |
Shaka Player | |
Copyright 2016 Google LLC | |
SPDX-License-Identifier: Apache-2.0 | |
*/ | |
function Xa(){}function Ya(){};function T(a,b){if(b)if(b instanceof Map)for(var c=u(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1} | |
function Za(a){var b=new T(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}T.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};T.prototype.stopImmediatePropagation=function(){this.g=!0};T.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",T); | |
var $a={wl:"abrstatuschanged",xl:"adaptation",yl:"audiotrackchanged",zl:"buffering",Al:"complete",Bl:"downloadcompleted",Cl:"downloadfailed",Dl:"downloadheadersreceived",El:"drmsessionupdate",Gl:"emsg",$l:"prft",Error:"error",Hl:"expirationupdated",Il:"firstquartile",Jl:"gapjumped",Ml:"keystatuschanged",Ql:"loaded",Rl:"loading",Tl:"manifestparsed",Ul:"manifestupdated",Vl:"mediaqualitychanged",Wl:"mediasourcerecovered",Metadata:"metadata",Xl:"midpoint",Yl:"nospatialvideoinfo",Zl:"onstatechange",am:"ratechange", | |
cm:"segmentappended",dm:"sessiondata",em:"spatialvideoinfo",fm:"stalldetected",gm:"started",hm:"statechanged",im:"streaming",jm:"textchanged",lm:"texttrackvisibility",mm:"thirdquartile",nm:"timelineregionadded",om:"timelineregionenter",pm:"timelineregionexit",qm:"trackschanged",sm:"unloading",um:"variantchanged"};function ab(){}function bb(){}function cb(){}function db(a){var b=Ma.apply(1,arguments);eb.has(a)||(eb.add(a),cb.apply(ab,x(b)))}function fb(){}function gb(){}function ib(){}var eb=new Set;window.console&&(cb=function(){return console.warn.apply(console,x(Ma.apply(0,arguments)))},bb=function(){console.error.apply(console,x(Ma.apply(0,arguments)))});function jb(){this.g={}}p=jb.prototype;p.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};p.get=function(a){return(a=this.g[a])?a.slice():null};p.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};p.forEach=function(a){for(var b in this.g)a(b,this.g[b])};p.size=function(){return Object.keys(this.g).length};p.keys=function(){return Object.keys(this.g)};function kb(){this.Va=new jb;this.re=this}kb.prototype.addEventListener=function(a,b){this.Va&&this.Va.push(a,b)};kb.prototype.removeEventListener=function(a,b){this.Va&&this.Va.remove(a,b)};kb.prototype.dispatchEvent=function(a){if(!this.Va)return!0;var b=this.Va.get(a.type)||[],c=this.Va.get("All");c&&(b=b.concat(c));b=u(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.re;a.currentTarget=this.re;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented}; | |
kb.prototype.release=function(){this.Va=null};function lb(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function mb(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function pb(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function qb(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/* | |
@license | |
Copyright 2008 The Closure Library Authors | |
SPDX-License-Identifier: Apache-2.0 | |
*/ | |
var rb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/* | |
@license | |
Copyright 2006 The Closure Library Authors | |
SPDX-License-Identifier: Apache-2.0 | |
*/ | |
function sb(a){var b;a instanceof sb?(tb(this,a.$b),this.bd=a.bd,vb(this,a.Kb),wb(this,a.yd),this.rb=a.rb,xb(this,a.g.clone()),this.Kc=a.Kc):a&&(b=String(a).match(rb))?(tb(this,b[1]||"",!0),this.bd=yb(b[2]||""),vb(this,b[3]||"",!0),wb(this,b[4]),this.rb=yb(b[5]||"",!0),xb(this,b[6]||"",!0),this.Kc=yb(b[7]||"")):this.g=new zb(null)}p=sb.prototype;p.$b="";p.bd="";p.Kb="";p.yd=null;p.rb="";p.Kc=""; | |
p.toString=function(){var a=[],b=this.$b;b&&a.push(Ab(b,Bb,!0),":");if(b=this.Kb){a.push("//");var c=this.bd;c&&a.push(Ab(c,Bb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.yd;null!=b&&a.push(":",String(b))}if(b=this.rb)this.Kb&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ab(b,"/"==b.charAt(0)?Cb:Db,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Kc)&&a.push("#",Ab(b,Fb));return a.join("")}; | |
p.resolve=function(a){var b=this.clone();"data"===b.$b&&(b=new sb);var c=!!a.$b;c?tb(b,a.$b):c=!!a.bd;c?b.bd=a.bd:c=!!a.Kb;c?vb(b,a.Kb):c=null!=a.yd;var d=a.rb;if(c)wb(b,a.yd);else if(c=!!a.rb){if("/"!=d.charAt(0))if(this.Kb&&!this.rb)d="/"+d;else{var e=b.rb.lastIndexOf("/");-1!=e&&(d=b.rb.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."== | |
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.rb=d:c=""!==a.g.toString();c?xb(b,a.g.clone()):c=!!a.Kc;c&&(b.Kc=a.Kc);return b};p.clone=function(){return new sb(this)};function tb(a,b,c){a.$b=c?yb(b,!0):b;a.$b&&(a.$b=a.$b.replace(/:$/,""))}function vb(a,b,c){a.Kb=c?yb(b,!0):b}function wb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.yd=b}else a.yd=null} | |
function xb(a,b,c){b instanceof zb?a.g=b:(c||(b=Ab(b,Gb)),a.g=new zb(b))}function yb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ab(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Hb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Hb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Bb=/[#\/\?@]/g,Db=/[#\?:]/g,Cb=/[#\?]/g,Gb=/[#\?@]/g,Fb=/#/g;function zb(a){this.g=a||null} | |
function Ib(a){if(!a.hb&&(a.hb={},a.Md=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}p=zb.prototype;p.hb=null;p.Md=null;function Jb(a){Ib(a);return a.Md}p.add=function(a,b){Ib(this);this.g=null;var c=this.hb.hasOwnProperty(a)?this.hb[a]:null;c||(this.hb[a]=c=[]);c.push(b);this.Md++;return this}; | |
p.set=function(a,b){Ib(this);this.g=null;this.hb.hasOwnProperty(a)?this.hb[a]=[b]:this.add(a,b);return this};p.get=function(a){Ib(this);return this.hb[a]||[]};p.toString=function(){if(this.g)return this.g;if(!this.hb)return"";var a=[],b;for(b in this.hb)for(var c=encodeURIComponent(b),d=this.hb[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")}; | |
p.clone=function(){var a=new zb;a.g=this.g;if(this.hb){var b={},c;for(c in this.hb)b[c]=this.hb[c].concat();a.hb=b;a.Md=this.Md}return a};function Kb(){}function Lb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if((ArrayBuffer.isView(a)?a.buffer:a)==(ArrayBuffer.isView(b)?b.buffer:b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Mb(a);b=Mb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Nb(a){return ArrayBuffer.isView(a)?0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a} | |
function Mb(a,b,c){c=void 0===c?Infinity:c;return Ob(a,void 0===b?0:b,c,Uint8Array)}function Pb(a,b,c){c=void 0===c?Infinity:c;return Ob(a,void 0===b?0:b,c,Uint16Array)}function Qb(a,b,c){c=void 0===c?Infinity:c;return Ob(a,void 0===b?0:b,c,DataView)} | |
function Ob(a,b,c,d){var e=ArrayBuffer.isView(a)?a.buffer:a,f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}S("shaka.util.BufferUtils",Kb);Kb.toDataView=Qb;Kb.toUint16=Pb;Kb.toUint8=Mb;Kb.toArrayBuffer=Nb;Kb.equal=Lb;function U(a,b,c){var d=Ma.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Rb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}U.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};S("shaka.util.Error",U);var Rb=!0;U.Severity={RECOVERABLE:1,CRITICAL:2};U.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10}; | |
U.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011, | |
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010, | |
WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004, | |
DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026, | |
DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048, | |
AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007, | |
LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,CAST_API_UNAVAILABLE:8E3, | |
NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014, | |
DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function Sb(a){this.h=a;this.g=void 0}Sb.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Tb(a,b){return a.length&&b.length&&a!==b?0<Ub(a,b).length:!0} | |
function Ub(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=u((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri|| | |
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c} | |
function Vb(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Xb=new Sb(function(){return Nb(new Uint8Array([0]))}),Yb=new Map;function Zb(a){this.h=a;this.g=null}Zb.prototype.Y=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Zb.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function ac(a){this.h=a;this.g=null}ac.prototype.Ia=function(){this.stop();this.h();return this};ac.prototype.Y=function(a){var b=this;this.stop();this.g=(new Zb(function(){b.h()})).Y(a);return this};ac.prototype.xa=function(a){var b=this;this.stop();this.g=(new Zb(function(){b.g.Y(a);b.h()})).Y(a);return this};ac.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",ac);ac.prototype.stop=ac.prototype.stop;ac.prototype.tickEvery=ac.prototype.xa; | |
ac.prototype.tickAfter=ac.prototype.Y;ac.prototype.tickNow=ac.prototype.Ia;function bc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function cc(a){return""!=dc().canPlayType(a)}function ec(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function fc(){return gc("Xbox One")}function hc(){return gc("Tizen")}function ic(){return gc("Tizen 3")}function jc(){return gc("Web0S")}function kc(){return gc("CrKey")} | |
function lc(){if(!gc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function mc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!hc()&&!gc("PC=EOS")&&!gc("PC=APL")&&!gc("VirginMedia")&&!nc()&&!oc()&&!gc("AFT")&&!gc("WPE")&&!gc("DT_STB_BCM")&&!gc("Sky_STB")}function pc(){return gc("PlayStation 5")}function oc(){return gc("PlayStation 4")}function qc(){return gc("Hisense")||gc("VIDAA")} | |
function nc(){return gc("SOPOpenBrowser")}function rc(){if(!mc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function sc(){return navigator.userAgentData&&navigator.userAgentData.platform?"macos"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("mac"):!1} | |
function tc(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}function uc(){return gc("Android")}function vc(){return hc()||jc()||fc()||oc()||pc()||gc("AFT")||gc("PC=EOS")||gc("PC=APL")||gc("VirginMedia")||nc()||gc("WPE")||kc()||qc()||gc("DT_STB_BCM")?!0:!1}function gc(a){return(navigator.userAgent||"").includes(a)} | |
function dc(){if(wc)return wc;xc||(xc=new ac(function(){wc=null}));(wc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(wc=document.createElement("video"));xc.Y(1);return wc}function yc(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill} | |
function zc(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,t;return P(function(w){switch(w.g){case 1:a={width:Infinity,height:Infinity};if(kc()){n=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;ta(w,14);if(!(q=n)){w.A(16);break}return G(w,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),17)}if(hc()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(), | |
a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(v){cb("Tizen: Error detecting screen size, default screen size 1920x1080.")}w.A(3);break}if(jc()){try{c=JSON.parse(window.PalmSystem.deviceInfo),a.width=Math.max(1920,c.screenWidth),a.height=Math.max(1080,c.screenHeight)}catch(v){cb("WebOS: Error detecting screen size, default screen size 1920x1080."), | |
a.width=1920,a.height=1080}w.A(3);break}if(qc()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);w.A(3);break}if(!oc()&&!pc()){d=void 0;try{d="undefined"!==typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(v){}if(d){a.width=1920;a.height=1080;try{e=new d.Media.Protection.ProtectionCapabilities;f=d.Media.Protection.ProtectionCapabilityResult;g=null;do g=e.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"', | |
"com.microsoft.playready.recommendation");while(g===f.maybe);g===f.probably&&(a.width=3840,a.height=2160)}catch(v){cb("Xbox: Error detecting screen size, default screen size 1920x1080.")}}else fc()&&(a.width=1920,a.height=1080,cb("Xbox: Error detecting screen size, default screen size 1920x1080."));w.A(3);break}h=!1;ta(w,8);return G(w,window.msdk.device.getDisplayInfo(),10);case 10:k=w.h;h="4K"===k.resolution;wa(w,9);break;case 8:return ya(w),ta(w,11),G(w,window.msdk.device.getDisplayInfoImmediate(), | |
13);case 13:l=w.h;h="4K"===l.resolution;wa(w,9);break;case 11:m=ya(w),cb("PlayStation: Failed to get the display info:",m);case 9:h?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);w.A(3);break;case 17:q=w.h;case 16:if(q){a.width=3840;a.height=2160;w.A(18);break}if(!(r=n)){w.A(19);break}return G(w,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:r=w.h;case 19:r&&(a.width=1920,a.height=1080);case 18:wa(w,3);break;case 14:t=ya(w),bb("Failed to check canDisplayType:", | |
t);case 3:return w.return(a)}})}var xc=null,wc=null;function Ac(){} | |
function Bc(a){if(!a)return"";a=Mb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!oc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&bb('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128== | |
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b} | |
function Cc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new U(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Qb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Dc(d)} | |
function Ec(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Mb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Bc(c);if(254==c[0]&&255==c[1])return Cc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Cc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Cc(a,!1);if(0==c[1]&&0==c[3])return Cc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(a);throw new U(2,2,2003);} | |
function Fc(a){if(window.TextEncoder&&!oc()){var b=new TextEncoder;return Nb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Nb(b)}function Gc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function Dc(a){return Hc.value()(a)} | |
function Ic(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",Ac);Ac.resetFromCharCode=function(){Hc.g=void 0}; | |
Ac.toUTF16=Gc;Ac.toUTF8=Fc;Ac.fromBytesAutoDetect=Ec;Ac.fromUTF16=Cc;Ac.fromUTF8=Bc;var Hc=new Sb(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ec:65536};0<b.Ec;b={Ec:b.Ec},b.Ec/=2)if(a(b.Ec))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ec)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ec));return e}}(b);return null});function Jc(){}function Kc(a){a=Dc(Mb(a));return btoa(a)}function Lc(a,b){b=void 0==b?!0:b;a=Kc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Mc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Nc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c} | |
function Oc(a){var b=Mb(a);a="";b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Pc(){for(var a=Ma.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&1===e.BYTES_PER_ELEMENT?b.set(e,c):b.set(Mb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Jc);Jc.concat=Pc;Jc.toHex=Oc;Jc.fromHex=Nc;Jc.fromBase64=Mc;Jc.toBase64=Lc; | |
Jc.toStandardBase64=Kc;function Qc(a,b,c){c=void 0===c?"":c;if(0==b.length)return a;if(1==a.length&&1==b.length){var d=new sb(a[0]);b=new sb(b[0]);b=d.resolve(b);c&&xb(b,c);return[b.toString()]}b=b.map(function(h){return new sb(h)});d=[];a=u(a);for(var e=a.next();!e.done;e=a.next()){e=new sb(e.value);for(var f=u(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&xb(g,c),d.push(g.toString())}return d} | |
function Rc(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a} | |
function Sc(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Lc(Nc(h),!1));var l=g;22!=l.length&&(l=Lc(Nc(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Mb(Fc(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1, | |
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Tc(a,b){if(1==b.length)return b[0];a=Uc(a,b);if(null!=a)return a;throw new U(2,4,4025,b);}function Uc(a,b){for(var c=u(Vc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Wc?"":null} | |
function Xc(a,b){var c=[];a=u(Vc[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Wc="text",Yc={Ca:"video",ba:"audio",Oa:Wc,Mf:"image",ul:"application"},Zc=1/15,Vc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function ad(){}function bd(a,b){a=cd(a);b=cd(b);return a.split("-")[0]==b.split("-")[0]}function dd(a,b){a=cd(a);b=cd(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function ed(a,b){a=cd(a);b=cd(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]} | |
function cd(a){a=u(a.split("-x-"));var b=a.next().value;b=void 0===b?"":b;a=a.next().value;a=void 0===a?"":a;var c=u(b.split("-"));b=c.next().value;b=void 0===b?"":b;c=c.next().value;c=void 0===c?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=fd.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function gd(a,b){var c=hd(a),d=hd(b);return a!=c&&b!=d&&c==d}function id(a,b){a=cd(a);b=cd(b);return b==a?4:dd(b,a)?3:ed(b,a)?2:dd(a,b)?1:0} | |
function hd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=fd.get(a)||a}function jd(a){return a.language?cd(a.language):a.audio&&a.audio.language?cd(a.audio.language):a.video&&a.video.language?cd(a.video.language):"und"} | |
function kd(a,b){a=cd(a);var c=new Set;b=u(b);for(var d=b.next();!d.done;d=b.next())c.add(cd(d.value));b=u(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=u(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,dd(d,a))return d;b=u(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,ed(d,a))return d;c=u(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,dd(a,b))return b;return null}S("shaka.util.LanguageUtils",ad);ad.findClosestLocale=kd;ad.getLocaleForVariant=jd; | |
ad.getLocaleForText=function(a){return cd(a.language||"und")};ad.getBase=hd;ad.relatedness=id;ad.areSiblings=gd;ad.normalize=cd;ad.isSiblingOf=ed;ad.isParentOf=dd;ad.areLanguageCompatible=bd;ad.areLocaleCompatible=function(a,b){a=cd(a);b=cd(b);return a==b}; | |
var fd=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze", | |
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice", | |
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao", | |
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san", | |
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie", | |
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function md(a){kb.call(this);this.j=cd(a);this.i=new Map;this.g=new Set;this.h=new Map}pa(md,kb);p=md.prototype;p.release=function(){kb.prototype.release.call(this)}; | |
p.Jh=function(a){var b=this;this.g.clear();a=u(a);for(var c=a.next();!c.done;c=a.next())this.g.add(cd(c.value));nd(this);a=qb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new T("unknown-locales",(new Map).set("locales",a)));a=qb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new T("locale-changed",a))}; | |
p.Qa=function(a,b,c){a=cd(a);void 0===c&&(c=od);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=od||d.set(f,e)});this.h.set(a,d);nd(this);this.dispatchEvent(new T("locale-updated"));return this};p.Qk=function(a){for(var b=u(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};p.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new T("unknown-localization",a));return""}; | |
p.Bj=function(){return this.g}; | |
function nd(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f=u(d),g=f.next(),h={};!g.done;h={Zd:void 0},g=f.next()){h.Zd=g.value;e.add(h.Zd);e.add(hd(h.Zd));g=qb(b.keys(),function(l){return function(m){return gd(m,l.Zd)}}(h));g.sort();g=u(g);for(var k=g.next();!k.done;k=g.next())e.add(k.value);h=qb(b.keys(),function(l){return function(m){return hd(m)==l.Zd}}(h));h.sort();h=u(h);for(g=h.next();!g.done;g=h.next())e.add(g.value)}e.add(c);c=[];e=u(e);for(f=e.next();!f.done;f=e.next())(f=b.get(f.value))&&c.push(f); | |
c.reverse();a.i.clear();b=u(c);for(e=b.next();!e.done;e=b.next())e.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=u(a.g);for(f=c.next();!f.done;f=c.next())f=a.h.get(f.value)||new Map,pd(f,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new T("missing-localizations",d)))}function pd(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}S("shaka.ui.Localization",md);md.prototype.getCurrentLocales=md.prototype.Bj; | |
md.prototype.resolve=md.prototype.resolve;md.prototype.resolveDictionary=md.prototype.Qk;md.prototype.insert=md.prototype.Qa;md.prototype.changeLocale=md.prototype.Jh;md.prototype.release=md.prototype.release;var od=1;md.ConflictResolution={USE_OLD:0,USE_NEW:od};md.UNKNOWN_LOCALES="unknown-locales";md.UNKNOWN_LOCALIZATION="unknown-localization";md.MISSING_LOCALIZATIONS="missing-localizations";md.LOCALE_CHANGED="locale-changed";md.LOCALE_UPDATED="locale-updated";function qd(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}qd.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function rd(a){return a.h/(1-Math.pow(a.g,a.i))};function sd(){this.h=new qd(2);this.j=new qd(5);this.g=0;this.i=128E3;this.l=16E3}sd.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};sd.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};sd.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(rd(this.h),rd(this.j))};function td(){this.g=new jb}p=td.prototype;p.release=function(){this.Ua();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new ud(a,b,c,d),this.g.push(b,a))};p.oa=function(a,b,c,d){function e(g){f.Ja(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};p.Ja=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=u(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ja(),this.g.remove(b,e))}}; | |
p.Ua=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=u(b);for(b=a.next();!b.done;b=a.next())b.value.Ja();this.g.g={}}};S("shaka.util.EventManager",td);td.prototype.removeAll=td.prototype.Ua;td.prototype.unlisten=td.prototype.Ja;td.prototype.listenOnce=td.prototype.oa;td.prototype.listen=td.prototype.o;td.prototype.release=td.prototype.release;function ud(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=wd(a,d);this.target.addEventListener(b,c,this.g)} | |
ud.prototype.Ja=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function wd(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return xd(a)?b:b.capture||!1} | |
function xd(a){var b=yd;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}yd=b}return b||!1}var yd=void 0;function zd(a){if(Ad.has(a))return Ad.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),Ad.set(a,b),b):!1}function Bd(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType}var Ad=new Map;function Cd(a,b){this.g=a;this.h=b}Cd.prototype.toString=function(){return"v"+this.g+"."+this.h};function Dd(a,b){var c=new Cd(5,0),d=Ed,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Fd(a,b,c,d){cb([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Gd(a,b,c,d){bb([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var Ed=null;function Hd(){}Hd.prototype.extract=function(){};Hd.prototype.decode=function(){return[]};Hd.prototype.clear=function(){};Hd.prototype.getStreams=function(){return[]};function Id(){}Id.prototype.init=function(){};Id.prototype.parse=function(){return[]};function Jd(){}Jd.prototype.init=function(){};Jd.prototype.i=function(){};Jd.prototype.g=function(){};Jd.prototype.j=function(){};S("shaka.media.IClosedCaptionParser",Jd);function Kd(a){this.l=new Id;if(a=Ld[a.toLowerCase()])this.l=a();this.h=new Hd;if(a=Md)this.h=a()}Kd.prototype.init=function(a,b){(void 0===b?0:b)||this.g();this.l.init(a)};Kd.prototype.i=function(a){a=this.l.parse(a);a=u(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Mb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()}; | |
Kd.prototype.g=function(){this.h.clear()};Kd.prototype.j=function(){return this.h.getStreams()};S("shaka.media.ClosedCaptionParser",Kd);Kd.findDecoder=function(){return Md};Kd.unregisterDecoder=function(){Md=null};Kd.registerDecoder=function(a){Md=a};Kd.findParser=function(a){return Ld[a]};Kd.unregisterParser=function(a){delete Ld[a]};Kd.registerParser=function(a,b){Ld[a]=b};var Ld={},Md=null;function Nd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Od;this.scroll=Pd}S("shaka.text.CueRegion",Nd);var Od=1;Nd.units={PX:0,PERCENTAGE:Od,LINES:2};var Pd="";Nd.scrollMode={NONE:Pd,UP:"up"};function Qd(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Rd(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Sd(a,b,c){c||(c=Qd);if(a.length!=b.length)return!1;b=b.slice();a=u(a);for(var d=a.next(),e={};!d.done;e={ei:void 0},d=a.next()){e.ei=d.value;d=b.findIndex(function(f){return function(g){return c(f.ei,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length} | |
function Td(a,b,c){c||(c=Qd);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function Ud(a){this.h=a||"";this.g=0}function Vd(a){Wd(a,/[ \t]+/gm)}function Wd(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Xd(a){return a.g==a.h.length?null:(a=Wd(a,/[^ \t\n]*/gm))?a[0]:null} | |
function Yd(a){a=Wd(a,$d);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:(Number(a[6])||0)/1E3+c+60*b+3600*(Number(a[1])||0)}function ae(a){return a?Yd(new Ud(a)):null}var $d=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function be(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||ArrayBuffer.isView(d))return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function ce(a){var b={},c;for(c in a)b[c]=a[c];return b} | |
function de(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];void 0!==e&&(e=de(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if("function"==typeof a)a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=u(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],void 0!==e&&(e=de(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a};/* | |
@license | |
tXml | |
Copyright 2015 Tobias Nickel | |
SPDX-License-Identifier: MIT | |
*/ | |
function ee(a,b){var c=void 0===c?!1:c;a=Ec(a);return fe(a,b,c)}function fe(a,b,c){a=ge(a,void 0===c?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return b.split(",").includes(d.tagName)}))?a:null}function he(a){return ie.has(a)?ie.get(a):""} | |
function ge(a,b){function c(f,g){g=void 0===g?!1:g;for(var h=[];a[e];)if(60==a.charCodeAt(e)){if(47===a.charCodeAt(e+1)){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(-1==k){var l=f.indexOf(".");0<l&&(k=g.indexOf(f.substring(0,l)))}if(-1==k)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(33===a.charCodeAt(e+1)){if(45==a.charCodeAt(e+2)){for(;-1!==e&&(62!==a.charCodeAt(e)|| | |
45!=a.charCodeAt(e-1)||45!=a.charCodeAt(e-2)||-1==e);)e=a.indexOf(">",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var q=a.charCodeAt(e);if(64<q&&91>q||96<q&&123>q){q=d();for(var r=a.charCodeAt(e);r&&39!==r&&34!==r&&!(64<r&&91>r||96<r&&123> | |
r)&&62!==r;)e++,r=a.charCodeAt(e);var t=e+1;e=a.indexOf(a[e],t);t=a.slice(t,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)"string"!==typeof k[m]&&(k[m].parent=l);k=l;break a}}else t=null,e--;if(q.startsWith("xmlns:")){r=t;var w=q.split(":")[1];ie.set(r,w);je.set(w,r)}"tt"===m&&"xml:space"===q&&"preserve"===t&&(l=!0);n[q]=t}e++}47!==a.charCodeAt(e-1)?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;for(n= | |
0;n<m;n++)q=k[n],"string"!==typeof q?b&&(q.parent=l):n==m-1&&"\n"==q&&k.pop();k=l}h.push(k);if("string"===typeof k)break;"?"===k.tagName[0]&&k.children&&(h.push.apply(h,x(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,-2===e&&(e=a.length),k=a.slice(k,e+1),g?0<k.length&&h.push(k):h.length&&1==k.length&&"\n"==k[0]?h.push(k):0<k.trim().length&&h.push(k),e++;return h}function d(){for(var f=e;-1==="\r\n\t>/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")} | |
function ke(a){return"string"===typeof a}function le(a){var b=[];if(!a.children)return[];a=u(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function me(a,b){var c=[];if(!a.children)return[];a=u(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function ne(a){if("string"===typeof a)return Ic(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:Ic(a)} | |
function oe(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=ne(a))&&(a=a.trim());return a}function pe(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=u(a.children);for(var d=a.next();!d.done;d=a.next())pe(d.value,b,c)}return c}function qe(a,b){a=me(a,b);return 1!=a.length?null:a[0]}function se(a,b,c){a=te(a,b,c);return 1!=a.length?null:a[0]} | |
function we(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function xe(a,b,c){b=he(b);return a.attributes[b+":"+c]||null}function te(a,b,c){var d=he(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=u(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function ye(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())if(d=xe(a,d.value,c))return d;return null} | |
function ze(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function Ae(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null} | |
function Be(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Ce(a){a=Number(a);return 0===a%1?a:null}function De(a){a=Number(a);return 0===a%1&&0<a?a:null}function Ee(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Fe(a){a=Number(a);return isNaN(a)?null:a}function Ge(a){return a?"true"===a.toLowerCase():!1} | |
function He(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c} | |
function Ie(a){var b=[];a=Ic(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=u(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,tc:c.split("/@")[1]|| | |
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].tc=c.slice(1))}return b} | |
function Je(a,b){var c=Ie(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=Ke(a,"t",d.t)),null!==d.n&&(c=Ke(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.tc)&&a[c]?Le(a[c],e,d,oe(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}} | |
function Ke(a,b,c){var d=0;a=u(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function Le(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d} | |
function Ne(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=je.has(b)?je.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=u(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,"string"==typeof d?c=new Text(d):c=Ne(d),b.appendChild(c);return b} | |
function Oe(a){if(!a)return null;var b={tagName:a.tagName,attributes:ce(a.attributes),children:[],parent:null};a=u(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Oe(c),c.parent=b,b.children.push(c));return b}var ie=new Map,je=new Map;function Pe(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Nd;this.position=null;this.positionAlign=Qe;this.size=0;this.textAlign=Re;this.direction=Se;this.writingMode=Te;this.lineInterpretation=Ue;this.line=null;this.lineHeight="";this.lineAlign=Ve;this.displayAlign=We;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Xe;this.fontStyle=Ze;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright= | |
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={Jc:32,rows:15}}function $e(a,b){a=new Pe(a,b,"");a.lineBreak=!0;return a}Pe.prototype.clone=function(){var a=new Pe(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a}; | |
function af(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Td(a.nestedCues,b.nestedCues,af))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Td(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0} | |
function bf(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&cf(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(df)&&c.push(e),e=-1);c=u(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){c=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&& | |
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=u(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=ef(c);a.payload="";try{var m=fe("<span>"+c+"</span>","span")}catch(n){}if(m)if(m=m.children,1!= | |
m.length||m[0].tagName)for(m=u(m),c=m.next();!c.done;c=m.next())ff(c.value,a,b);else a.payload=Ic(c);else a.payload=Ic(c)}else a.payload=Ic(c)}function cf(a){for(var b=u(Object.entries(gf)),c=b.next();!c.done;c=b.next()){var d=u(c.value);c=d.next().value;d=d.next().value;var e=new Pe(0,0,"");e.color=d;a.set("."+c,e)}b=u(Object.entries(hf));for(c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,e=new Pe(0,0,""),e.backgroundColor=d,a.set("."+c,e)} | |
function ef(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""} | |
function ff(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Nd;d.position=null;d.size=0;d.textAlign=Re;if(a.tagName)for(var e=u(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=jf(g.backgroundColor,h.backgroundColor),h.color=jf(g.color,h.color),h.fontFamily=jf(g.fontFamily,h.fontFamily), | |
h.fontSize=jf(g.fontSize,h.fontSize),h.textShadow=jf(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=$e(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=kf;break;case "i":d.fontStyle=lf;break;case "u":d.textDecoration.push(mf);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break; | |
if(f=ae(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(ke(a)||1==e.length&&ke(e[0]))for(c=ne(a).split("\n"),a=!0,c=u(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=$e(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Ic(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=u(e),a=b.next();!a.done;a=b.next())ff(a.value,d,c)}function jf(a,b){return a&&0<a.length?a:b}S("shaka.text.Cue",Pe);Pe.parseCuePayload=bf;Pe.equal=af; | |
Pe.prototype.clone=Pe.prototype.clone;var Qe="auto";Pe.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Qe};var Re="center",nf={LEFT:"left",RIGHT:"right",CENTER:Re,START:"start",END:"end"};Pe.textAlign=nf;var We="after",of={BEFORE:"before",CENTER:"center",AFTER:We};Pe.displayAlign=of;var Se="ltr";Pe.direction={HORIZONTAL_LEFT_TO_RIGHT:Se,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Te="horizontal-tb";Pe.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Te,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"}; | |
var Ue=0;Pe.lineInterpretation={LINE_NUMBER:Ue,PERCENTAGE:1};var Ve="start",pf={CENTER:"center",START:Ve,END:"end"};Pe.lineAlign=pf;var gf={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Pe.defaultTextColor=gf;var hf={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Pe.defaultTextBackgroundColor=hf;var Xe=400,kf=700;Pe.fontWeight={NORMAL:Xe,BOLD:kf}; | |
var Ze="normal",lf="italic",qf={NORMAL:Ze,ITALIC:lf,OBLIQUE:"oblique"};Pe.fontStyle=qf;var mf="underline";Pe.textDecoration={UNDERLINE:mf,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var df=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function rf(){}rf.prototype.destroy=function(){};function sf(a,b,c){tf[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,hf:b}}function uf(a,b){for(var c=a.toLowerCase().split(";")[0],d=u([vf,wf,xf,yf]),e=d.next();!e.done;e=d.next())if(e=tf[c+"-"+e.value]){var f=e.hf(),g=f.isSupported(a,b);f.destroy();if(g)return e.hf}return null}S("shaka.transmuxer.TransmuxerEngine",rf);rf.findTransmuxer=uf;rf.unregisterTransmuxer=function(a,b){delete tf[a.toLowerCase().split(";")[0]+"-"+b]}; | |
rf.registerTransmuxer=sf;rf.prototype.destroy=rf.prototype.destroy;var tf={},yf=1,xf=2,wf=3,vf=4;rf.PluginPriority={FALLBACK:yf,PREFERRED_SECONDARY:xf,PREFERRED:wf,APPLICATION:vf};function zf(){}function Af(a,b){var c=a;b&&!Bf.includes(a)&&(c+='; codecs="'+b+'"');return c}function Cf(a,b){b&&(a+='; codecs="'+b+'"');return a}function Df(a,b,c){var d=Af(a,b);b=Cf(a,b);uf(b)?(a=uf(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c} | |
function Ef(a,b,c){var d=[b];Ff.forEach(function(e,f){var g=a[f];"codecs"==f?Bf.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Gf(a){return a.split(";")[0].split("/")[1]} | |
function Hf(a){var b=If(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"=== | |
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "vp09"===a:return"vp9";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1";case "dvc1"===a:case "dvi1"===a:return"dovi-vvc"}return a} | |
function Jf(a){var b=[];a=u(a.split(","));for(var c=a.next();!c.done;c=a.next())c=If(c.value),b.push(c[0]);return b.sort().join(",")}function Kf(a){return a.split(";")[0]}function Lf(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Mf(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function If(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]} | |
S("shaka.util.MimeUtils",zf);zf.getFullTypeWithAllCodecs=Cf;zf.getFullType=Af;var Ff=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Bf=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Nf(a){this.i=null;this.j=a;this.C=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.G="";this.B=function(){};this.s=new Map}function Of(a){return Pf[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Md:!1}Nf.prototype.destroy=function(){this.j=this.i=null;this.s.clear();return Promise.resolve()}; | |
function Qf(a,b,c,d,e){var f,g,h,k,l,m,n;return P(function(q){if(1==q.g)return G(q,Promise.resolve(),2);if(!a.i||!a.j)return q.return();if(null==c||null==d)return a.i.parseInit(Mb(b)),q.return();f=a.C?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Mb(b),g,e,[]);k=u(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.B(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);H(q)})} | |
Nf.prototype.remove=function(a,b){var c=this;return P(function(d){if(1==d.g)return G(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));H(d)})};function Rf(a,b,c){a.l=b;a.m=c}function Sf(a,b,c){a.G=b;if(b=a.s.get(b))for(var d=u(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)} | |
function Tf(a,b,c){b.startTime+=c;b.endTime+=c;b=u(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Tf(a,d.value,c)} | |
function Uf(a,b,c,d,e){var f=c+" "+d,g=new Map;b=u(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Tf(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.G&&a.j.append([k]))}e=u(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.s.has(f)||a.s.set(f,new Map),b=u(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.s.get(f).set(h,k);a.g=null==a.g?Math.max(c, | |
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}S("shaka.text.TextEngine",Nf);Nf.prototype.destroy=Nf.prototype.destroy;Nf.findParser=function(a){return Pf[a]};Nf.unregisterParser=function(a){delete Pf[a]};Nf.registerParser=function(a,b){Pf[a]=b};var Pf={};function Vf(a,b){return a.concat(b)}function Wf(){}function Xf(a){return null!=a}function Yf(a,b){return Promise.race([b,new Promise(function(c,d){(new ac(d)).Y(a)})])};function Zf(){} | |
function $f(a,b,c,d,e){if(e.length){var f=a.textStreams;e=u(e);for(var g=e.next(),h={};!g.done;h={rh:void 0},g=e.next())if(h.rh=g.value,g=f.filter(function(w){return function(v){return v.codecs.startsWith(w.rh)||v.mimeType.startsWith(w.rh)?!0:!1}}(h)),g.length){f=g;break}a.textStreams=f}f=a.variants;if(b.length||c.length)f=ag(f,b,c);if(d.length){b=new jb;c=u(f);for(f=c.next();!f.done;f=c.next())f=f.value,b.push(String(f.video.width||0),f);var k=[];b.forEach(function(w,v){w=0;var z=[];v=u(v);for(var y= | |
v.next(),A={};!y.done;A={Ff:void 0},y=v.next())A.Ff=y.value,y=d.filter(function(E){return function(C){return E.Ff.decodingInfos[0][C]}}(A)).length,y>w?(w=y,z=[A.Ff]):y==w&&z.push(A.Ff);k.push.apply(k,x(z))});f=k}c=new Set;b=new Set;f=u(f);for(e=f.next();!e.done;e=f.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);f=Array.from(c).sort(function(w,v){return w.bandwidth-v.bandwidth});var l=[];c=new Map;f=u(f);for(e=f.next();!e.done;e=f.next()){e=e.value;g=e.language+(e.channelsCount|| | |
0)+(e.audioSamplingRate||0)+e.roles.join(",")+e.label+e.groupId+e.fastSwitching;h=c.get(g)||[];if(h.length){var m=h[h.length-1],n=Hf(m.codecs),q=Hf(e.codecs);n!=q||e.bandwidth&&m.bandwidth&&!(e.bandwidth>m.bandwidth)||(h.push(e),l.push(e.id))}else h.push(e),l.push(e.id);c.set(g,h)}var r={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};f=Array.from(b).sort(function(w,v){if(!w.bandwidth||!v.bandwidth||w.bandwidth==v.bandwidth){if(w.codecs&& | |
v.codecs&&w.codecs!=v.codecs&&w.width==v.width){var z=Hf(w.codecs),y=Hf(v.codecs);if(z!=y)return(r[z]||1)-(r[y]||1)}return w.width-v.width}return w.bandwidth-v.bandwidth});b=Bd();var t=[];c=new Map;f=u(f);for(e=f.next();!e.done;e=f.next()){e=e.value;g=Math.round(e.frameRate||0)+(e.hdr||"")+e.fastSwitching;h=c.get(g)||[];if(h.length){m=h[h.length-1];if(!b&&(n=Hf(m.codecs),q=Hf(e.codecs),n!==q))continue;e.width>m.width||e.height>m.height?(h.push(e),t.push(e.id)):e.width==m.width&&e.height==m.height&& | |
(n=Hf(m.codecs),q=Hf(e.codecs),n!=q||e.bandwidth&&m.bandwidth&&!(e.bandwidth>m.bandwidth)||(h.push(e),t.push(e.id)))}else h.push(e),t.push(e.id);c.set(g,h)}a.variants=a.variants.filter(function(w){var v=w.audio;w=w.video;return v&&!l.includes(v.id)||w&&!t.includes(w.id)?!1:!0})} | |
function ag(a,b,c){b=u(b);for(var d=b.next(),e={};!d.done;e={Yi:void 0},d=b.next())if(e.Yi=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Yi)}}(e)),d.length){a=d;break}c=u(c);b=c.next();for(d={};!b.done;d={Eh:void 0},b=c.next())if(d.Eh=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Eh)}}(d)),b.length){a=b;break}return a}function bg(a,b,c){a.variants=a.variants.filter(function(d){return eg(d,b,c)})} | |
function eg(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=u([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)|| | |
!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function fg(a,b,c,d){c=void 0===c?[]:c;d=void 0===d?{}:d;return P(function(e){if(1==e.g)return G(e,gg(a,b,0<b.offlineSessionIds.length,c,d),2);hg(b);return G(e,ig(b),0)})} | |
function gg(a,b,c,d,e){var f,g;return P(function(h){if(1==h.g)return fc()&&jg(b.variants),G(h,kg(b.variants,c,!1,d),2);f=null;a&&(g=a.h)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=pg(k,f,e);if(!l){var m=[];k.audio&&m.push(qg(k.audio));k.video&&m.push(qg(k.video))}return l});H(h)})} | |
function jg(a){var b={dvav:"avc3",dva1:"avc1",dvhe:"hev1",dvh1:"hvc1",dvc1:"vvc1",dvi1:"vvi1"},c=new Set;a=u(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=u(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=u(Object.keys(b));for(var e=d.next();!e.done;e=d.next())if(e=e.value,a.codecs.includes(e)){a.codecs=a.codecs.replace(e,b[e]);break}}} | |
function pg(a,b,c){if(!a.decodingInfos.some(function(k){return!k.supported||b&&(k=k.keySystemAccess)&&(c[k.keySystem]||k.keySystem)!=b?!1:!0}))return!1;var d=fc(),e=gc("Firefox")&&uc(),f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(d&&f&&(1920<g||1080<h)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3.")))return!1;a=a.audio;return e&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")?!1:!0} | |
function rg(a,b){var c,d,e,f,g,h,k;return P(function(l){if(1==l.g){c=function(m,n){if(m){var q=ce(m);q.supported=m.supported&&n.supported;q.powerEfficient=m.powerEfficient&&n.powerEfficient;q.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!q.keySystemAccess&&(q.keySystemAccess=n.keySystemAccess);return q}return n};d=null;e=[];f=u(b);g=f.next();for(h={};!g.done;h={cache:void 0,Ae:void 0},g=f.next())k=g.value,h.Ae=de(k),h.cache=sg,h.cache[h.Ae]?d=c(d,h.cache[h.Ae]):e.push(tg(k).then(function(m){return function(n){var q= | |
null;n=u(n||[]);for(var r=n.next();!r.done;r=n.next())q=c(q,r.value);q&&(m.cache[m.Ae]=q,d=c(d,q))}}(h)));return G(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);H(l)})} | |
function tg(a){var b=[""];a.video&&(b=Lf(a.video.contentType).split(","));var c=[""];a.audio&&(c=Lf(a.audio.contentType).split(","));var d=[];b=u(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=u(c),g=f.next(),h={};!g.done;h={gd:void 0},g=f.next())g=g.value,h.gd=be(a),a.video&&(h.gd.video.contentType=Af(Kf(h.gd.video.contentType),e)),a.audio&&(h.gd.audio.contentType=Af(Kf(h.gd.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){Yf(1,navigator.mediaCapabilities.decodingInfo(k.gd)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a); | |
return null})} | |
function kg(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B;return P(function(D){switch(D.g){case 1:if(e=a.some(function(I){return I.decodingInfos.length}))return D.return();f=u(d);g=f.next();h={};case 2:if(g.done){D.A(4);break}h.ti=g.value;k=!1;l=u(a);m=l.next();case 5:if(m.done){D.A(7);break}n=m.value;q=ug(n,b,c).filter(function(I){return function(F){F=F[0];return(F.keySystemConfiguration&&F.keySystemConfiguration.keySystem)===I.ti}}(h));r=u(q);t=r.next();case 8:if(t.done){D.A(10);break}w=t.value; | |
return G(D,rg(n,w),9);case 9:t=r.next();D.A(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();D.A(5);break;case 7:if(k)return D.return();h={ti:void 0};g=f.next();D.A(2);break;case 4:v=u(a),z=v.next();case 12:if(z.done){D.A(0);break}y=z.value;A=ug(y,b,c).filter(function(I){I=I[0];I=I.keySystemConfiguration&&I.keySystemConfiguration.keySystem;return!I||!d.includes(I)});E=u(A);C=E.next();case 15:if(C.done){z=v.next();D.A(12);break}B=C.value;return G(D,rg(y,B),16);case 16:C=E.next(),D.A(15)}})} | |
function ug(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=u(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=Lf(k);if(l.includes(",")&&!d){var m=l.split(","),n=Kf(k);l=Tc("video",m);m=Tc("audio",m);m=vg(m,n);n=Df(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=wg(l);k={contentType:Df(Kf(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction= | |
"srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=u(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=Kf(l),l=vg(Lf(l),k),k=Df(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=u(f);for(k=f.next();!k.done;k=f.next())for(k= | |
k.value,l=u(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=u(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=u(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;n=c.get(k);l=new Map; | |
n=u(n);for(m=n.next();!m.done;m=n.next()){m=m.value;var q=m.videoRobustness+","+m.audioRobustness;l.get(q)||l.set(q,[]);l.get(q).push(m)}l=u(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];q=u(h);for(var r=q.next();!r.done;r=q.next()){r=Object.assign({},r.value);for(var t={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b},w=u(n),v=w.next();!v.done;v=w.next()){v=v.value;if(v.initData&&v.initData.length){for(var z=new Set,y=u(v.initData), | |
A=y.next();!A.done;A=y.next())z.add(A.value.initDataType);t.initDataType=v.initData[0].initDataType}v.distinctiveIdentifierRequired&&(t.distinctiveIdentifier="required");v.persistentStateRequired&&(t.persistentState="required");v.sessionType&&(t.sessionTypes=[v.sessionType]);d&&(t.audio?(v.encryptionScheme&&(t.audio.encryptionScheme=t.audio.encryptionScheme||v.encryptionScheme),t.audio.robustness=t.audio.robustness||v.audioRobustness):(t.audio={robustness:v.audioRobustness},v.encryptionScheme&&(t.audio.encryptionScheme= | |
v.encryptionScheme)),""==t.audio.robustness&&delete t.audio.robustness);e&&(t.video?(v.encryptionScheme&&(t.video.encryptionScheme=t.video.encryptionScheme||v.encryptionScheme),t.video.robustness=t.video.robustness||v.videoRobustness):(t.video={robustness:v.videoRobustness},v.encryptionScheme&&(t.video.encryptionScheme=v.encryptionScheme)),""==t.video.robustness&&delete t.video.robustness)}r.keySystemConfiguration=t;m.push(r)}a.push(m)}}return a} | |
function vg(a,b){return"flac"==a.toLowerCase()?rc()?"fLaC":"flac":"opus"===a.toLowerCase()?rc()?"mp4"==Gf(b)?"Opus":"opus":"opus":a}function wg(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function hg(a){a.textStreams=a.textStreams.filter(function(b){b=Af(b.mimeType,b.codecs);return Of(b)})} | |
function ig(a){var b,c,d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:b=[],c=u(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(xg.has(f)){l.A(5);break}g=yg.get(f);if(!g){xg.set(f,!1);l.A(5);break}return G(l,zg(g),7);case 7:h=l.h,xg.set(f,h);case 5:(k=xg.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,H(l)}})} | |
function zg(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})} | |
function Ag(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=u(b.roles),q=n.next();!q.done;q=n.next())m.add(q.value);if(c)for(n=u(c.roles),q=n.next();!q.done;q=n.next())m.add(q.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null, | |
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null, | |
originalLanguage:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null,a.hdr=c.hdr||null,a.colorGamut=c.colorGamut||null,a.videoLayout=c.videoLayout||null,g.includes(",")&&(a.channelsCount=c.channelsCount,a.audioSamplingRate=c.audioSamplingRate,a.spatialAudio=c.spatialAudio,a.originalLanguage=c.originalLanguage));b&&(a.audioId=b.id,a.originalAudioId= | |
b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles,a.accessibilityPurpose=b.accessibilityPurpose,a.originalLanguage=b.originalLanguage);return a} | |
function Bg(a){return{id:a.id,active:!1,type:Wc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null, | |
videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:a.originalId,originalImageId:null,accessibilityPurpose:a.accessibilityPurpose,originalLanguage:a.originalLanguage}} | |
function Cg(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=Dg(a.segmentIndex));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null, | |
videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId,accessibilityPurpose:null,originalLanguage:null}}function Eg(a){a.__shaka_id||(a.__shaka_id=Fg++);return a.__shaka_id} | |
function Gg(a){var b=Hg(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="unknown");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function Ig(a){var b=Hg(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b} | |
function Hg(a){var b=a.language;return{id:Eg(a),active:!1,type:"",bandwidth:0,language:cd(b||"und"),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null, | |
originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function Jg(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function Kg(a){return a.filter(function(b){return Jg(b)})} | |
function Lg(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=kd(cd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return cd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Mg(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Vf,[]);return a.length? | |
Mg(e,a[0]):e}function Mg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Ng(a,b){b.length&&(b=b.filter(function(c){return Hf(a.codecs)==Hf(c.codecs)}).sort(function(c,d){return c.bandwidth&&d.bandwidth&&c.bandwidth!=d.bandwidth?c.bandwidth-d.bandwidth:(c.width||0)-(d.width||0)}),a.trickModeVideo=b[0],1<b.length&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)} | |
function qg(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}S("shaka.util.StreamUtils",Zf);Zf.meetsRestrictions=eg; | |
var sg={},Fg=0,xg=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),yg=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Og(){var a=this;this.I=null;this.l=!1;this.s=new sd;this.j=new td;navigator.connection&&navigator.connection.addEventListener&&this.j.o(navigator.connection,"change",function(){if(a.l&&a.g.useNetworkInformation){a.s=new sd;a.g&&a.s.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.I(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.H=[];this.J=1;this.K=!1;this.h=this.m=this.g=this.u=null;this.B=new ac(function(){if(a.l&&(a.g.restrictToElementSize||a.g.restrictToScreenSize)){var b= | |
a.chooseVariant();b&&a.I(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.C=window;"documentPictureInPicture"in window&&this.j.o(window.documentPictureInPicture,"enter",function(){a.C=window.documentPictureInPicture.window;a.B&&a.B.Ia();a.j.oa(a.C,"pagehide",function(){a.C=window;a.B&&a.B.Ia()})});this.G=this.i=null}p=Og.prototype;p.stop=function(){this.I=null;this.l=!1;this.H=[];this.J=1;this.m=this.u=null;this.h&&(this.h.disconnect(),this.h=null);this.B.stop();this.G=this.i=null}; | |
p.release=function(){this.j.release();this.B=null};p.init=function(a){this.I=a}; | |
p.chooseVariant=function(){var a=Infinity,b=Infinity;if(this.g.restrictToScreenSize){var c=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio;a=this.C.screen.height*c;b=this.C.screen.width*c}if(this.h&&this.g.restrictToElementSize){c=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio;var d=this.m.clientHeight,e=this.m.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.m&&(d=this.i.height,e=this.i.width);a=Math.min(a,d*c);b=Math.min(b,e*c)}c=this.H.filter(function(l){return l&& | |
!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});c.length||(c=this.H);d=c;c.length!=this.H.length&&(d=this.H.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));c=Pg(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=a||Infinity!=b){c=Qg(c);c=u(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.height>=a&&e.width>=b){a=e.height;b=e.width;break}c=Pg(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&& | |
!c.length&&(c=Pg(this,null,d,Infinity,Infinity),c=[c[0]]);b=c[0]||null;for(d=0;d<c.length;d++){e=c[d];for(var f=isNaN(this.J)?1:Math.abs(this.J),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<c.length;k++)if(e.bandwidth!=c[k].bandwidth){h=c[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;a>=g&&a<=f&&(b.bandwidth!=e.bandwidth||b.bandwidth==e.bandwidth&&b.video&&e.video&&(b.video.width<e.video.width||b.video.height<e.video.height))&&(b=e)}this.u=Date.now();return b}; | |
p.enable=function(){this.l=!0};p.disable=function(){this.l=!1};p.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.s.sample(a,b),c&&null!=this.u&&this.l&&Rg(this))};p.trySuggestStreams=function(){null!=this.u&&this.l&&Rg(this)}; | |
p.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.s.getBandwidthEstimate(a);return this.G?this.G.getBandwidthEstimate(a):a};p.setVariants=function(a){this.H=a};p.playbackRateChanged=function(a){this.J=a}; | |
p.setMediaElement=function(a){function b(){c.B.Y(Sg)}var c=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(b),this.h.observe(this.m));this.j.o(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.i=d.pictureInPictureWindow,c.j.o(c.i,"resize",b))});this.j.o(a,"leavepictureinpicture",function(){c.i&&c.j.Ja(c.i,"resize",b);c.i=null})};p.setCmsdManager=function(a){this.G=a}; | |
p.configure=function(a){this.g=a;this.s&&this.g&&this.s.configure(this.g.advanced)};function Rg(a){if(!a.K){var b=a.s;if(!(b.g>=b.i))return;a.K=!0;a.u-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.u<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.I(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))} | |
function Pg(a,b,c,d,e){if(a.G){var f=a.G.Wh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return eg(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function Qg(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",Og);Og.prototype.configure=Og.prototype.configure; | |
Og.prototype.setCmsdManager=Og.prototype.setCmsdManager;Og.prototype.setMediaElement=Og.prototype.setMediaElement;Og.prototype.playbackRateChanged=Og.prototype.playbackRateChanged;Og.prototype.setVariants=Og.prototype.setVariants;Og.prototype.getBandwidthEstimate=Og.prototype.getBandwidthEstimate;Og.prototype.trySuggestStreams=Og.prototype.trySuggestStreams;Og.prototype.segmentDownloaded=Og.prototype.segmentDownloaded;Og.prototype.disable=Og.prototype.disable;Og.prototype.enable=Og.prototype.enable; | |
Og.prototype.chooseVariant=Og.prototype.chooseVariant;Og.prototype.init=Og.prototype.init;Og.prototype.release=Og.prototype.release;Og.prototype.stop=Og.prototype.stop;var Sg=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Tg(a,b){var c=Ug();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1} | |
function Vg(a){var b,c;return P(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new U(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return G(d,new Promise(function(e){(new ac(e)).Y(c/1E3)}),2)}a.h*=a.m;H(d)})}function Ug(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Wg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Wg.prototype.resolve=function(){};Wg.prototype.reject=function(){};function Xg(a,b){this.promise=a;this.i=b;this.g=null}function Yg(a){return new Xg(Promise.reject(a),function(){return Promise.resolve()})}function Zg(){var a=Promise.reject(new U(2,7,7001));a.catch(function(){});return new Xg(a,function(){return Promise.resolve()})}function $g(a){return new Xg(Promise.resolve(a),function(){return Promise.resolve()})}function ah(a){return new Xg(a,function(){return a.catch(function(){})})}Xg.prototype.abort=function(){this.g||(this.g=this.i());return this.g}; | |
function bh(a){return new Xg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Xg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this}; | |
Xg.prototype.Wa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=ch(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Wg;f.catch(function(){});var g=new U(2,7,7001);this.promise.then(c(!0),c(!1));return new Xg(f,function(){return d()})}; | |
function ch(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}ea.Object.defineProperties(Xg.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});S("shaka.util.AbortableOperation",Xg);Xg.prototype.chain=Xg.prototype.Wa;Xg.prototype["finally"]=Xg.prototype.finally; | |
Xg.all=bh;Xg.prototype.abort=Xg.prototype.abort;Xg.notAbortable=ah;Xg.completed=$g;Xg.aborted=Zg;Xg.failed=Yg;function dh(){this.g=[]}function eh(a,b){a.g.push(b.finally(function(){Rd(a.g,b)}))}dh.prototype.destroy=function(){for(var a=[],b=u(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function fh(a,b,c,d,e,f,g){kb.call(this);this.i=!1;this.u=new dh;this.g=new Set;this.h=new Set;this.m=a||null;this.l=b||null;this.G=c||null;this.H=d||null;this.I=e||null;this.K=f||null;this.J=g||null;this.B=this.C=!1;this.s=16E3;this.j=new Map}pa(fh,kb);p=fh.prototype;p.ih=function(a){this.C=a};p.jh=function(a){this.B=a};function gh(a,b,c,d){c=c||hh;var e=ih[a];if(!e||c>=e.priority)ih[a]={priority:c,hf:b,Fk:void 0===d?!1:d}} | |
function jh(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=u(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}p.Ik=function(a){this.g.add(a)};p.kl=function(a){this.g.delete(a)};p.lj=function(){this.g.clear()};p.Jk=function(a){this.h.add(a)};p.ll=function(a){this.h.delete(a)};p.mj=function(){this.h.clear()};p.Lh=function(){this.j.clear()}; | |
function kh(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}p.destroy=function(){this.i=!0;this.g.clear();this.h.clear();this.j.clear();kb.prototype.release.call(this);return this.u.destroy()}; | |
p.request=function(a,b,c){var d=this,e=new lh;if(this.i){var f=Promise.reject(new U(2,7,7001));f.catch(function(){});return new mh(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?be(b.retryParameters):Ug();b.uris=be(b.uris);f=nh(this,a,b,c);var g=f.Wa(function(){return oh(d,a,b,c,new Tg(b.retryParameters,!1),0,null,e)}),h=g.Wa(function(q){return ph(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){}); | |
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Wa(function(q){var r=Date.now()-m,t=q.response;t.timeMs+=l;t.timeMs+=r;q.fk||!d.m||t.fromCache||"HEAD"==b.method||a!=qh||d.m(t.timeMs,t.data.byteLength,rh(c));d.J&&d.J(a,t,c);return t},function(q){q&&(q.severity=2);throw q;});f=new mh(n.promise,function(){return n.abort()},e);eh(this.u,f);return f}; | |
function nh(a,b,c,d){function e(h){f=f.Wa(function(){c.body&&(c.body=Nb(c.body));return h(b,c,d)})}var f=$g(void 0);a.I&&e(a.I);a=u(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Wa(void 0,function(h){if(h instanceof U&&7001==h.code)throw h;throw new U(2,1,1006,h);})} | |
function oh(a,b,c,d,e,f,g,h){a.C&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.B&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.K&&a.K(b,d,c.uris[f],c.uris[f-1]);var k=new sb(c.uris[f]),l=k.$b,m=!1;l||(l=location.protocol,l=l.slice(0,-1),tb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=ih[l])?l.hf:null;if(!n)return Yg(new U(2,1,1E3,k));var q=l.Fk;(k=a.j.get(k.Kb))&&(c.headers["common-access-token"]=k);var r=null,t=null,w=!1,v=!1,z;return ah(Vg(e)).Wa(function(){if(a.i)return Zg(); | |
z=Date.now();var y=0;c.requestStartTime=Date.now();var A=n(c.uris[f],c,b,function(B,D,I){r&&r.stop();t&&t.Y(C/1E3);a.m&&b==qh&&(y++,c.packetNumber=y,a.m(B,D,rh(d),c),m=!0,h.g=I)},function(B){v=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.l&&a.l(B,c,b)},{minBytesForProgressEvents:a.s});if(!q)return A;var E=c.retryParameters.connectionTimeout;E&&(r=new ac(function(){w=!0;A.abort()}),r.Y(E/1E3));var C=c.retryParameters.stallTimeout;C&&(t=new ac(function(){w=!0;A.abort()}));return A}).Wa(function(y){r&& | |
r.stop();t&&t.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-z);var A=y.headers["common-access-token"];if(A){var E=new sb(y.uri);a.j.set(E.Kb,A)}A={response:y,fk:m};!v&&a.l&&a.l(y.headers,c,b);a.G&&a.G(c,y);return A},function(y){r&&r.stop();t&&t.stop();if(a.H){var A=null,E=0;y instanceof U&&(A=y,1001==y.code&&(E=y.data[1]));a.H(c,A,E,w)}if(a.i)return Zg();w&&(y=new U(1,1,1003,c.uris[f],b));if(y instanceof U){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return A=(new Map).set("error", | |
y),A=new T("retry",A),a.dispatchEvent(A),f=(f+1)%c.uris.length,oh(a,b,c,d,e,f,y,h)}throw y;})}function ph(a,b,c,d){var e=$g(void 0);a=u(a.h);for(var f=a.next(),g={};!f.done;g={Bi:void 0},f=a.next())g.Bi=f.value,e=e.Wa(function(h){return function(){var k=c.response;k.data&&(k.data=Nb(k.data));return(0,h.Bi)(b,k,d)}}(g));return e.Wa(function(){return c},function(h){var k=2;if(h instanceof U){if(7001==h.code)throw h;k=h.severity}throw new U(k,1,1007,h);})} | |
function rh(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.s)return!1}return!0}S("shaka.net.NetworkingEngine",fh);fh.prototype.request=fh.prototype.request;fh.prototype.destroy=fh.prototype.destroy;fh.makeRequest=kh;fh.defaultRetryParameters=function(){return Ug()};fh.prototype.clearCommonAccessTokenMap=fh.prototype.Lh;fh.prototype.clearAllResponseFilters=fh.prototype.mj;fh.prototype.unregisterResponseFilter=fh.prototype.ll;fh.prototype.registerResponseFilter=fh.prototype.Jk; | |
fh.prototype.clearAllRequestFilters=fh.prototype.lj;fh.prototype.unregisterRequestFilter=fh.prototype.kl;fh.prototype.registerRequestFilter=fh.prototype.Ik;fh.unregisterScheme=function(a){delete ih[a]};fh.registerScheme=gh;fh.prototype.setForceHTTPS=fh.prototype.jh;fh.prototype.setForceHTTP=fh.prototype.ih;function lh(){this.g=0}fh.NumBytesRemainingClass=lh;function mh(a,b,c){Xg.call(this,a,b);this.h=c}pa(mh,Xg);fh.PendingRequest=mh;var qh=1; | |
fh.RequestType={MANIFEST:0,SEGMENT:qh,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};fh.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var hh=3;fh.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:hh};var ih={};function sh(a){this.g=!1;this.h=new Wg;this.i=a}sh.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function th(a,b){if(a.g){if(b instanceof U&&7003==b.code)throw b;throw new U(2,7,7003,b);}};function uh(a){for(var b=new Map,c=u(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function vh(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function wh(a,b){this.h=Qb(a);this.i=b==xh;this.g=0}p=wh.prototype;p.Ha=function(){return this.g<this.h.byteLength};p.Pa=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.$=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw yh();}};p.Ba=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw yh();}};p.V=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw yh();}}; | |
p.xi=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw yh();}};p.zd=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw yh();}if(2097151<b)throw new U(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};p.Ub=function(a){if(this.g+a>this.h.byteLength)throw yh();var b=Mb(this.h,this.g,a);this.g+=a;return b}; | |
p.skip=function(a){if(this.g+a>this.h.byteLength)throw yh();this.g+=a};p.Ci=function(a){if(this.g<a)throw yh();this.g-=a};p.seek=function(a){if(0>a||a>this.h.byteLength)throw yh();this.g=a};p.Xc=function(){for(var a=this.g;this.Ha()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Mb(this.h,a,this.g-a);this.g+=1;return Bc(a)};function yh(){return new U(2,3,3E3)}S("shaka.util.DataViewReader",wh);wh.prototype.readTerminatedString=wh.prototype.Xc;wh.prototype.seek=wh.prototype.seek;wh.prototype.rewind=wh.prototype.Ci; | |
wh.prototype.skip=wh.prototype.skip;wh.prototype.readBytes=wh.prototype.Ub;wh.prototype.readUint64=wh.prototype.zd;wh.prototype.readInt32=wh.prototype.xi;wh.prototype.readUint32=wh.prototype.V;wh.prototype.readUint16=wh.prototype.Ba;wh.prototype.readUint8=wh.prototype.$;wh.prototype.getLength=wh.prototype.getLength;wh.prototype.getPosition=wh.prototype.Pa;wh.prototype.hasMoreData=wh.prototype.Ha;var xh=1;wh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:xh};function zh(){this.i=[];this.h=[];this.g=!1}p=zh.prototype;p.box=function(a,b){a=Ah(a);this.i[a]=Bh;this.h[a]=b;return this};p.X=function(a,b){a=Ah(a);this.i[a]=Ch;this.h[a]=b;return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new wh(a,0);for(this.g=!1;a.Ha()&&!this.g;)this.wd(0,a,b,c)}; | |
p.wd=function(a,b,c,d){var e=b.Pa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.V(),g=b.V(),h=Dh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Pa()+8>b.getLength()){this.g=!0;return}f=b.zd();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Ch){if(d&&b.Pa()+4>b.getLength()){this.g=!0;return}n=b.V();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Pa(),b=0<d?b.Ub(d):new Uint8Array(0),b=new wh(b,0),l({name:h,parser:this, | |
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Pa(),b.getLength()-b.Pa()))}};function Eh(a){for(var b=Fh(a);a.reader.Ha()&&!a.parser.g;)a.parser.wd(a.start+b,a.reader,a.partialOkay)}function Gh(a){for(var b=Fh(a),c=a.reader.V(),d=0;d<c&&(a.parser.wd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Hh(a){var b=Fh(a);for(a.reader.skip(78);a.reader.Ha()&&!a.parser.g;)a.parser.wd(a.start+b,a.reader,a.partialOkay)} | |
function Ih(a){var b=Fh(a);a.reader.skip(8);var c=a.reader.Ba();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.Ha()&&!a.parser.g;)a.parser.wd(a.start+b,a.reader,a.partialOkay)}function Jh(a){return function(b){a(b.reader.Ub(b.reader.getLength()-b.reader.Pa()))}}function Ah(a){var b=0;a=u(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Dh(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)} | |
function Fh(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",zh);zh.headerSize=Fh;zh.typeToString=Dh;zh.allData=Jh;zh.audioSampleEntry=Ih;zh.visualSampleEntry=Hh;zh.sampleDescription=Gh;zh.children=Eh;zh.prototype.parseNext=zh.prototype.wd;zh.prototype.parse=zh.prototype.parse;zh.prototype.stop=zh.prototype.stop;zh.prototype.fullBox=zh.prototype.X;zh.prototype.box=zh.prototype.box;var Bh=0,Ch=1;function Kh(a){var b=this;this.g=[];this.h=[];this.data=[];(new zh).box("moov",Eh).box("moof",Eh).X("pssh",function(c){if(!(1<c.version)){var d=Mb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Oc(c.reader.Ub(16)));if(0<c.version){d=c.reader.V();for(var e=0;e<d;e++){var f=Oc(c.reader.Ub(16));b.h.push(f)}}}}).parse(a)} | |
function Lh(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Qb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=u(c),c=b.next();!c.done;c=b.next())c=Nc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Mh(a){var b=this;this.G=a;this.l=this.B=null;this.na=this.ea=!1;this.J=0;this.h=null;this.s=new td;this.i=new Map;this.U=[];this.C=new Map;this.L=!1;this.m=new Wg;this.g=null;this.u=function(c){2==c.severity&&b.m.reject(c);a.onError(c)};this.Z=new Map;this.ka=new Map;this.M=new ac(function(){return Nh(b)});this.P=!1;this.O=[];this.W=!1;this.K=new ac(function(){Oh(b)});this.m.catch(function(){});this.j=new sh(function(){return Ph(b)});this.aa=!1;this.H=this.I=null;this.R=function(){return!1}} | |
p=Mh.prototype;p.destroy=function(){return this.j.destroy()};function Ph(a){return P(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.m.reject(),a.K.stop(),a.K=null,a.M.stop(),a.M=null,G(b,Qh(a),2);case 2:if(!a.l){b.A(3);break}ta(b,4);return G(b,a.l.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:ya(b);case 5:a.l=null;case 3:a.h=null,a.B=null,a.C=new Map,a.g=null,a.u=function(){},a.G=null,a.aa=!1,a.I=null,H(b)}})}p.configure=function(a,b){this.g=a;b&&(this.R=b);this.K&&this.K.xa(this.g.updateExpirationTime)}; | |
function Rh(a,b,c){a.na=!0;a.C=new Map;a.P=c;return Sh(a,b)}function Th(a,b,c){a.C=new Map;c=u(c);for(var d=c.next();!d.done;d=c.next())a.C.set(d.value,{initData:null,initDataType:null});c=u(a.g.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.C.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.P=0<a.C.size;return Sh(a,b)} | |
function Uh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Vh(a,g,[])} | |
function Sh(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E;return P(function(C){if(1==C.g){Wh(a.g.clearKeys,b);c=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});c||(d=uh(a.g.servers),Xh(b,d));e=new Set;f=u(b);for(g=f.next();!g.done;g=f.next())for(h=g.value,k=Yh(h),l=u(k),m=l.next();!m.done;m=l.next())n=m.value,e.add(n);q=u(e);for(r=q.next();!r.done;r=q.next())t=r.value,Zh(t,uh(a.g.servers),uh(a.g.advanced||{}),a.g.keySystemsMapping);w=function(B, | |
D){var I=[];B=u(B);for(var F=B.next();!F.done;F=B.next()){F=F.value;var L=F[D]||a.g.advanced&&a.g.advanced[F.keySystem]&&a.g.advanced[F.keySystem][D]||"",J;if(J=""==L)J=(J=F.keySystem)?!!J.match(/^com\.widevine\.alpha/):!1;J&&("audioRobustness"==D?L=[a.g.defaultAudioRobustnessForWidevine]:"videoRobustness"==D&&(L=[a.g.defaultVideoRobustnessForWidevine]));if("string"===typeof L)I.push(F);else if(Array.isArray(L))for(0===L.length&&(L=[""]),L=u(L),J=L.next();!J.done;J=L.next()){var K={};I.push(Object.assign({}, | |
F,(K[D]=J.value,K)))}}return I};v=u(b);for(z=v.next();!z.done;z=v.next())y=z.value,y.video&&(y.video.drmInfos=w(y.video.drmInfos,"videoRobustness"),y.video.drmInfos=w(y.video.drmInfos,"audioRobustness")),y.audio&&(y.audio.drmInfos=w(y.audio.drmInfos,"videoRobustness"),y.audio.drmInfos=w(y.audio.drmInfos,"audioRobustness"));return G(C,kg(b,a.P,a.aa,a.g.preferredKeySystems),2)}th(a.j);A=c||Object.keys(a.g.servers).length;if(!A)return a.ea=!0,C.return(Promise.resolve());E=Vh(a,void 0,b);return C.return(c? | |
E:E.catch(function(){}))})}function $h(a){var b;return P(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.I){c.A(2);break}return G(c,a.I,3);case 3:return th(a.j),c.return();case 2:return ta(c,4),a.I=a.l.setMediaKeys(a.B),G(c,a.I,6);case 6:wa(c,5);break;case 4:b=ya(c),a.u(new U(2,6,6003,b.message));case 5:th(a.j),H(c)}})}function di(a,b){return P(function(c){if(1==c.g)return G(c,$h(a),2);ei(a,b.initDataType,Mb(b.initData));H(c)})} | |
p.ac=function(a){var b=this;return P(function(c){if(1==c.g){if(!b.B)return b.s.oa(a,"encrypted",function(){b.u(new U(2,6,6010))}),c.return();b.l=a;b.s.oa(b.l,"play",function(){for(var d=u(b.O),e=d.next();!e.done;e=d.next())fi(b,e.value);b.W=!0;b.O=[]});b.l.remote?(b.s.o(b.l.remote,"connect",function(){return Qh(b)}),b.s.o(b.l.remote,"connecting",function(){return Qh(b)}),b.s.o(b.l.remote,"disconnect",function(){return Qh(b)})):"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged", | |
function(){return Qh(b)});b.H=b.h?b.h.initData.find(function(d){return 0<d.initData.length})||null:null;return b.H||"com.apple.fps"!==b.h.keySystem||b.C.size?G(c,$h(b),2):c.A(2)}gi(b).catch(function(){});b.H||b.C.size||b.g.parseInbandPsshEnabled||b.s.o(b.l,"encrypted",function(d){return di(b,d)});H(c)})}; | |
function hi(a){var b,c,d,e,f;return P(function(g){switch(g.g){case 1:if(!a.B||!a.h)return g.return();if(!a.h.serverCertificateUri||a.h.serverCertificate&&a.h.serverCertificate.length){g.A(2);break}b=kh([a.h.serverCertificateUri],a.g.retryParameters);ta(g,3);c=a.G.nc.request(5,b,{isPreload:a.R()});return G(g,c.promise,5);case 5:d=g.h;a.h.serverCertificate=Mb(d.data);wa(g,4);break;case 3:throw e=ya(g),new U(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.h.serverCertificate||!a.h.serverCertificate.length)return g.return(); | |
ta(g,6);return G(g,a.B.setServerCertificate(a.h.serverCertificate),8);case 8:wa(g,0);break;case 6:throw f=ya(g),new U(2,6,6004,f.message);}})}function ii(a,b){var c,d,e;return P(function(f){if(1==f.g)return G(f,ji(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Hb=new Wg,d.push(e.Hb);d.push(c.remove());return G(f,Promise.all(d),3)}a.i.delete(c);H(f)})} | |
function gi(a){var b,c,d,e,f;return P(function(g){if(1==g.g){if(!a.C.size)return g.A(2);a.C.forEach(function(h,k){ji(a,k,h)});return G(g,a.m,3)}if(2!=g.g){b=a.h&&a.h.keyIds||new Set([]);if(0<b.size&&ki(a))return g.return(a.m);a.L=!1;a.m=new Wg;a.m.catch(function(){})}c=(a.h?a.h.initData:[])||[];d=u(c);for(e=d.next();!e.done;e=d.next())f=e.value,ei(a,f.initDataType,f.initData);li(a)&&a.m.resolve();return g.return(a.m)})} | |
function ei(a,b,c){if(c.length){if(a.g.ignoreDuplicateInitData){var d=a.i.values();d=u(d);for(var e=d.next();!e.done;e=d.next())if(Lb(c,e.value.initData))return;var f=!1;a.C.forEach(function(g){!f&&Lb(c,g.initData)&&(f=!0)});if(f)return}a.L=!0;0<a.i.size&&li(a)&&(a.m.resolve(),a.L=!1,a.m=new Wg,a.m.catch(function(){}));mi(a,b,c,a.h.sessionType)}}function ni(a){a=a.i.keys();a=lb(a,function(b){return b.sessionId});return Array.from(a)} | |
p.vg=function(){var a=this,b=this.i.keys();b=lb(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};p.Pd=function(){var a=Infinity,b=this.i.keys();b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};p.Ke=function(){return vh(this.ka)}; | |
function Vh(a,b,c){var d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:d=new Map;if(c.length){e=oi(a,c,d);n.A(2);break}return G(n,pi(a,b),3);case 3:e=n.h;case 2:f=e;if(!f){if(!navigator.requestMediaKeySystemAccess)throw new U(2,6,6020);throw new U(2,6,6001);}th(a.j);ta(n,4);f.getConfiguration();g=a.g.keySystemsMapping[f.keySystem]||f.keySystem;if(c.length){var q=g;var r=d.get(g);var t=[],w=[],v=[],z=[],y=[],A=new Set,E=new Set;qi(r,t,w,z,v,y,A,E);var C=a.P?"persistent-license":"temporary"; | |
q={keySystem:q,encryptionScheme:t[0],licenseServerUri:w[0],distinctiveIdentifierRequired:r[0].distinctiveIdentifierRequired,persistentStateRequired:r[0].persistentStateRequired,sessionType:r[0].sessionType||C,audioRobustness:r[0].audioRobustness||"",videoRobustness:r[0].videoRobustness||"",serverCertificate:z[0],serverCertificateUri:v[0],initData:y,keyIds:A};0<E.size&&(q.keySystemUris=E);r=u(r);for(E=r.next();!E.done;E=r.next())E=E.value,E.distinctiveIdentifierRequired&&(q.distinctiveIdentifierRequired= | |
E.distinctiveIdentifierRequired),E.persistentStateRequired&&(q.persistentStateRequired=E.persistentStateRequired);r=q}else r=g,E=b.get(g),q=[],t=[],w=[],v=[],z=[],y=new Set,qi(E.drmInfos,q,t,v,w,z,y),r={keySystem:r,encryptionScheme:q[0],licenseServerUri:t[0],distinctiveIdentifierRequired:"required"==E.distinctiveIdentifier,persistentStateRequired:"required"==E.persistentState,sessionType:E.sessionTypes[0]||"temporary",audioRobustness:(E.audioCapabilities?E.audioCapabilities[0].robustness:"")||"", | |
videoRobustness:(E.videoCapabilities?E.videoCapabilities[0].robustness:"")||"",serverCertificate:v[0],serverCertificateUri:w[0],initData:z,keyIds:y};a.h=r;if(!a.h.licenseServerUri)throw new U(2,6,6012,a.h.keySystem);return G(n,f.createMediaKeys(),6);case 6:h=n.h;th(a.j);a.B=h;if(!(""!=a.g.minHdcpVersion&&"getStatusForPolicy"in a.B)){n.A(7);break}ta(n,8);return G(n,a.B.getStatusForPolicy({minHdcpVersion:a.g.minHdcpVersion}),10);case 10:k=n.h;if("usable"!=k)throw new U(2,6,6018);th(a.j);wa(n,7,4);break; | |
case 8:l=ya(n,4);if(l instanceof U)throw l;throw new U(2,6,6019,l.message);case 7:return a.ea=!0,G(n,hi(a),11);case 11:th(a.j);wa(n,0);break;case 4:m=ya(n);th(a.j,m);a.h=null;if(m instanceof U)throw m;throw new U(2,6,6002,m.message);}})} | |
function oi(a,b,c){for(var d=u(b),e=d.next();!e.done;e=d.next()){e=u(Yh(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(1==c.size&&c.has(""))throw new U(2,6,6E3);d=u(a.g.preferredKeySystems);f=d.next();for(e={};!f.done;e={wi:void 0},f=d.next()){e.wi=f.value;f=u(b);for(var g=f.next();!g.done;g=f.next())if(g=g.value.decodingInfos.find(function(m){return function(n){return n.supported&&null!=n.keySystemAccess&&n.keySystemAccess.keySystem== | |
m.wi}}(e)))return g.keySystemAccess}d=u([!0,!1]);for(e=d.next();!e.done;e=d.next())for(e=e.value,f=u(b),g=f.next();!g.done;g=f.next()){g=u(g.value.decodingInfos);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.supported&&h.keySystemAccess){var k=h.keySystemAccess.keySystem,l=c.get(k);!l&&a.g.keySystemsMapping[k]&&(l=c.get(a.g.keySystemsMapping[k]));k=u(l);for(l=k.next();!l.done;l=k.next())if(!!l.value.licenseServerUri==e)return h.keySystemAccess}}return null} | |
function pi(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z;return P(function(y){switch(y.g){case 1:if(1==b.size&&b.has(""))throw new U(2,6,6E3);d=u(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=u(a.g.preferredKeySystems);h=g.next();case 2:if(h.done){y.A(4);break}k=h.value;if(!b.has(k)){y.A(3);break}l=b.get(k);ta(y,6);return G(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c= | |
y.h,y.return(c);case 6:ya(y);case 7:th(a.j);case 3:h=g.next();y.A(2);break;case 4:m=u([!0,!1]),n=m.next();case 9:if(n.done){y.A(11);break}q=n.value;r=u(b.keys());t=r.next();case 12:if(t.done){n=m.next();y.A(9);break}w=t.value;v=b.get(w);z=v.drmInfos.some(function(A){return!!A.licenseServerUri});if(z!=q){y.A(13);break}ta(y,15);return G(y,navigator.requestMediaKeySystemAccess(w,[v]),17);case 17:return c=y.h,y.return(c);case 15:ya(y);case 16:th(a.j);case 13:t=r.next();y.A(12);break;case 11:return y.return(c)}})} | |
function ri(a){li(a)&&a.m.resolve()}function si(a,b){(new ac(function(){b.loaded=!0;ri(a)})).Y(ti)} | |
function ji(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:try{d=a.B.createSession("persistent-license")}catch(n){return e=new U(2,6,6005,n.message),a.u(e),m.return(Promise.reject(e))}a.s.o(d,"message",function(n){a.l&&a.g.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.W?a.O.push(n):fi(a,n)});a.s.o(d,"keystatuseschange",function(n){return ui(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Qg:Infinity,Hb:null,type:"persistent-license"};a.i.set(d,f);ta(m,2);return G(m, | |
d.load(b),4);case 4:return g=m.h,th(a.j),g||(a.i.delete(d),h=a.g.persistentSessionOnlinePlayback?1:2,a.u(new U(h,6,6013)),f.loaded=!0),si(a,f),ri(a),m.return(d);case 2:k=ya(m),th(a.j,k),a.i.delete(d),l=a.g.persistentSessionOnlinePlayback?1:2,a.u(new U(l,6,6005,k.message)),f.loaded=!0,ri(a);case 3:return m.return(Promise.resolve())}})} | |
function mi(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.u(new U(2,6,6005,f.message));return}a.s.o(e,"message",function(f){a.l&&a.g.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.W?a.O.push(f):fi(a,f)});a.s.o(e,"keystatuseschange",function(f){return ui(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Qg:Infinity,Hb:null,type:d});try{c=a.g.initDataTransform(c,b,a.h)}catch(f){b=f;f instanceof U||(b=new U(2,6,6016,f));a.u(b);return}a.g.logLicenseExchange&&Lc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e); | |
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.u(new U(2,6,6006,f.message,f,h))}})}function vi(a){return P(function(b){return 1==b.g?a.L?G(b,a.m,3):b.A(0):G(b,Promise.all(a.U.map(function(c){return c.promise})),0)})} | |
function fi(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w;P(function(v){switch(v.g){case 1:c=b.target;a.g.logLicenseExchange&&Lc(b.message);d=a.i.get(c);e=a.h.licenseServerUri;f=a.g.advanced[a.h.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=kh([e],a.g.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.h;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]= | |
f.headers[h];if("org.w3.clearkey"===a.h.keySystem){var z=g,y=a.h;try{var A=Ec(z.body);if(A){var E=JSON.parse(A);E.type||(E.type=y.sessionType,z.body=Fc(JSON.stringify(E)))}}catch(C){}}if(Vb(a.h.keySystem))if(z=Cc(g.body,!0,!0),z.includes("PlayReadyKeyMessage")){z=fe(z,"PlayReadyKeyMessage");y=pe(z,"HttpHeader");y=u(y);for(A=y.next();!A.done;A=y.next())E=A.value,A=pe(E,"name")[0],E=pe(E,"value")[0],g.headers[ne(A)]=ne(E);z=pe(z,"Challenge")[0];g.body=Mc(ne(z))}else g.headers["Content-Type"]="text/xml; charset=utf-8"; | |
k=Date.now();ta(v,2);m=a.G.nc.request(2,g,{isPreload:a.R()});a.U.push(m);return G(v,m.promise,4);case 4:l=v.h;Rd(a.U,m);wa(v,3);break;case 2:n=ya(v);if(a.j.g)return v.return();q=new U(2,6,6007,n);1==a.i.size?(a.u(q),d&&d.Hb&&d.Hb.reject(q)):(d&&d.Hb&&d.Hb.reject(q),a.i.delete(c),li(a)&&(a.m.resolve(),a.M.Y(.1)));return v.return();case 3:if(a.j.g)return v.return();a.J+=(Date.now()-k)/1E3;a.g.logLicenseExchange&&Lc(l.data);ta(v,5);return G(v,c.update(l.data),7);case 7:wa(v,6);break;case 5:return r= | |
ya(v),t=new U(2,6,6008,r.message),a.u(t),d&&d.Hb&&d.Hb.reject(t),v.return();case 6:if(a.j.g)return v.return();w=new T("drmsessionupdate");a.G.onEvent(w);d&&(d.Hb&&d.Hb.resolve(),si(a,d));H(v)}})} | |
function ui(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Vb(a.h.keySystem)&&16==g.byteLength&&(ec()||oc())){h=Qb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Oc(g).slice(0,32);a.Z.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Hb&&(a.i.delete(b),wi(b));li(a)&&(a.m.resolve(), | |
a.M.Y(xi))}function Nh(a){var b=a.Z,c=a.ka;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.u(new U(2,6,6014));a.G.ef(vh(c))} | |
function yi(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N,R,Q;return P(function(V){if(1==V.g){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b= | |
{};c=u(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return V.return(b)}f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" ");g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];h=["150","2000","3000"];k={"com.widevine.alpha":g,"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":h};l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}]; | |
n={videoCapabilities:l,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]};q=[null,"cenc","cbcs","cbcs-1-9"];r=new Map;t=function(ba,ia){var xa,Ea,va,Ba,La,za,Ua,Qa,Aa,hb,$b,ub,nb;return P(function(ob){switch(ob.g){case 1:return ta(ob,2),G(ob,ia.createMediaKeys(),4);case 4:xa=ob.h;wa(ob,3);break;case 2:return ya(ob),ob.return();case 3:va=(Ea=ia.getConfiguration().sessionTypes)?Ea.includes("persistent-license"):!1;ic()&&(va=!1);Ba=ia.getConfiguration().videoCapabilities;La=ia.getConfiguration().audioCapabilities; | |
za={persistentState:va,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.has(ba)&&r.get(ba)?za=r.get(ba):r.set(ba,za);(Ua=Ba[0].encryptionScheme)&&!za.encryptionSchemes.includes(Ua)&&za.encryptionSchemes.push(Ua);(Qa=Ba[0].robustness)&&!za.videoRobustnessLevels.includes(Qa)&&za.videoRobustnessLevels.push(Qa);(Aa=La[0].robustness)&&!za.audioRobustnessLevels.includes(Aa)&&za.audioRobustnessLevels.push(Aa);if("getStatusForPolicy"in xa){hb=[];$b=u(f);ub=$b.next(); | |
for(nb={};!ub.done;nb={Ud:void 0},ub=$b.next())nb.Ud=ub.value,za.minHdcpVersions.includes(nb.Ud)||hb.push(xa.getStatusForPolicy({minHdcpVersion:nb.Ud}).then(function(Eb){return function(Me){"usable"!=Me||za.minHdcpVersions.includes(Eb.Ud)||za.minHdcpVersions.push(Eb.Ud)}}(nb)));return G(ob,Promise.all(hb),0)}ob.A(0)}})};w=function(ba,ia,xa,Ea){var va,Ba,La,za,Ua,Qa,Aa,hb,$b,ub;return P(function(nb){switch(nb.g){case 1:ta(nb,2);va=be(n);Ba=u(va.videoCapabilities);for(La=Ba.next();!La.done;La=Ba.next())za= | |
La.value,za.encryptionScheme=ia,za.robustness=xa;Ua=u(va.audioCapabilities);for(Qa=Ua.next();!Qa.done;Qa=Ua.next())Aa=Qa.value,Aa.encryptionScheme=ia,Aa.robustness=Ea;hb=be(va);hb.persistentState="required";hb.sessionTypes=["persistent-license"];$b=[hb,va];return G(nb,Yf(1,navigator.requestMediaKeySystemAccess(ba,$b)),4);case 4:return ub=nb.h,G(nb,t(ba,ub),5);case 5:wa(nb,0);break;case 2:ya(nb),H(nb)}})};v=function(ba,ia,xa,Ea){var va,Ba,La;return P(function(za){switch(za.g){case 1:return ta(za,2), | |
va={type:"media-source",video:{contentType:l[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:m[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:ba,video:{encryptionScheme:ia,robustness:xa},audio:{encryptionScheme:ia,robustness:Ea}}},G(za,Yf(1,navigator.mediaCapabilities.decodingInfo(va)),4);case 4:return Ba=za.h,La=Ba.keySystemAccess,G(za,t(ba,La),5);case 5:wa(za,0);break;case 2:ya(za),H(za)}})};z=u(a);for(y=z.next();!y.done;y=z.next())A= | |
y.value,r.set(A,null);E=function(ba){return"org.w3.clearkey"===ba&&rc()||ba&&ba.match(/^com\.apple\.fps/)&&tc()||Vb(ba)&&(sc()||mc())||Vb(ba)&&gc("Firefox")||"com.huawei.wiseplay"===ba&&(tc()||sc())?!1:!0};C=[];B=u(q);for(D=B.next();!D.done;D=B.next())for(I=D.value,F=u(a),L=F.next();!L.done;L=F.next())J=L.value,E(J)&&(C.push(w(J,I,"","")),C.push(v(J,I,"","")));K=u(a);for(O=K.next();!O.done;O=K.next())for(M=O.value,N=u(k[M]||[]),R=N.next();!R.done;R=N.next())Q=R.value,E(M)&&(C.push(w(M,null,Q,"")), | |
C.push(w(M,null,"",Q)),C.push(v(M,null,Q,"")),C.push(v(M,null,"",Q)));return G(V,Promise.all(C),2)}return V.return(vh(r))})}function wi(a){return P(function(b){if(1==b.g)return ta(b,2),G(b,Yf(zi,Promise.all([a.close().catch(function(){}),a.closed])),4);if(2!=b.g)return wa(b,0);ya(b);H(b)})} | |
function Qh(a){var b;return P(function(c){b=Array.from(a.i.entries());a.i.clear();return G(c,Promise.all(b.map(function(d){d=u(d);var e=d.next().value,f=d.next().value;return P(function(g){if(1==g.g)return ta(g,2),a.na||a.C.has(e.sessionId)||"persistent-license"!==f.type||a.g.persistentSessionOnlinePlayback?G(g,wi(e),5):G(g,e.remove(),5);if(2!=g.g)return wa(g,0);ya(g);H(g)})})),0)})}function Yh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])} | |
function Oh(a){a.i.forEach(function(b,c){var d=b.Qg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Qg=e)})}function li(a){a=a.i.values();return mb(a,function(b){return b.loaded})}function ki(a){for(var b=u(a.h&&a.h.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.Z.get(c.value))return!1;return!0} | |
function Xh(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=u(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)} | |
function qi(a,b,c,d,e,f,g,h){var k=[];a=u(a);for(var l=a.next(),m={};!l.done;m={Ma:void 0},l=a.next()){m.Ma=l.value;b.includes(m.Ma.encryptionScheme)||b.push(m.Ma.encryptionScheme);"org.w3.clearkey"==m.Ma.keySystem&&m.Ma.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ma.licenseServerUri)||k.push(m.Ma.licenseServerUri):c.includes(m.Ma.licenseServerUri)||c.push(m.Ma.licenseServerUri);e.includes(m.Ma.serverCertificateUri)||e.push(m.Ma.serverCertificateUri);m.Ma.serverCertificate&& | |
(d.some(function(r){return function(t){return Lb(t,r.Ma.serverCertificate)}}(m))||d.push(m.Ma.serverCertificate));if(m.Ma.initData){l=u(m.Ma.initData);for(var n=l.next(),q={};!n.done;q={Gg:void 0},n=l.next())q.Gg=n.value,f.some(function(r){return function(t){var w=r.Gg;return t.keyId&&t.keyId==w.keyId?!0:t.initDataType==w.initDataType&&Lb(t.initData,w.initData)}}(q))||f.push(q.Gg)}if(m.Ma.keyIds)for(l=u(m.Ma.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ma.keySystemUris&&h)for(m=u(m.Ma.keySystemUris), | |
l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0<k.length){b=[];k=u(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}} | |
function Zh(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&b.get(e)&&(b=b.get(e),a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.serverCertificate||(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri= | |
c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}function Wh(a,b){a=uh(a);if(0!=a.size){a=Sc(a);b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.drmInfos=[a]),c.audio&&(c.audio.drmInfos=[a])}}var zi=1,ti=5,xi=.5;function Ai(a,b,c){c=void 0===c?!0:c;this.h=a;this.g=new Set([a]);b=b||[];a=u(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c)} | |
Ai.prototype.add=function(a,b){var c=this.h;b=void 0===b?!0:b;var d;if(!(d=!!c.audio!=!!a.audio||!!c.video!=!!a.video||c.language!=a.language)&&(d=c.audio&&a.audio)){d=c.audio;var e=a.audio;d=!(!((!d.channelsCount||!e.channelsCount||2<d.channelsCount||2<e.channelsCount)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!Bi(d,e))&&Ci(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||Bi(c,d))&&Ci(c.roles,d.roles)));return d?!1:(this.g.add(a), | |
!0)};Ai.prototype.values=function(){return this.g.values()};function Bi(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Jf(d)});b=b.codecs.split(",").map(function(d){return Jf(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0} | |
function Ci(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=u(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0}S("shaka.media.AdaptationSet",Ai);S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Di(){}Di.prototype.create=function(){};Di.prototype.configure=function(){};S("shaka.media.AdaptationSetCriteria",Di);function Ei(){this.g=Fi;this.i=(new Map).set(Fi,2).set(Gi,1);this.h=0}function Hi(a,b,c){a.i.set(Fi,c).set(Gi,b)}var Gi=0,Fi=1;function Ii(a,b,c){var d=a.video&&a.video.hdr?a.video.hdr:"",e=a.audio&&a.audio.spatialAudio?a.audio.spatialAudio:!1,f=a.video&&a.video.videoLayout?a.video.videoLayout:"",g=a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,h=a.audio&&a.audio.codecs?a.audio.codecs:"";this.g=c();this.g.configure({language:a.language,role:"",channelCount:g,pd:d,spatialAudio:e,videoLayout:f,ed:"",Hd:"",codecSwitchingStrategy:b,audioCodec:h})}Ii.prototype.create=function(a){return this.g.create(a)}; | |
Ii.prototype.configure=function(){};/* | |
@license | |
Shaka Player | |
Copyright 2023 Google LLC | |
SPDX-License-Identifier: Apache-2.0 | |
*/ | |
function Ji(a,b,c){this.g=a;this.i=b;this.h=c}function Ki(a,b){return P(function(c){if(1==c.g)return G(c,fg(a.h,b,a.g.drm.preferredKeySystems,a.g.drm.keySystemsMapping),2);a.g.streaming.dontChooseCodecs||$f(b,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes,a.g.preferredTextFormats);if(!b.variants.some(Jg))throw new U(2,4,4032);return c.return(Li(a,b))})} | |
function Mi(a,b){var c=a.g.restrictions;a=a.i;var d=!1;b=u(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=eg(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}function Li(a,b){var c=Mi(a,b);if(b){var d=a.h?a.h.h:null;if(d&&a.h.B)for(var e=u(b.variants),f=e.next();!f.done;f=e.next())f=f.value,Ni(a,d.keySystem,f.video),Ni(a,d.keySystem,f.audio);Oi(a,b)}return c} | |
function Ni(a,b,c){if(c){c=u(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=u(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,ei(a.h,e.initDataType,e.initData)}}} | |
function Oi(a,b){a=a.h?a.h.Ke():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=u(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=u(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=u(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?Pi.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e, | |
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new U(2,4,4012,a);}var Pi=["output-restricted","internal-error"];function Qi(){}function Ri(a,b){if(b){var c=Si[b.toLowerCase()];if(c)return c}throw new U(2,4,4E3,a,b);}S("shaka.media.ManifestParser",Qi);Qi.unregisterParserByMime=function(a){delete Si[a]};Qi.registerParserByMime=function(a,b){Si[a]=b};Qi.registerParserByExtension=function(){Dd("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Qi.AccessibilityPurpose={tm:"visually impaired",Kl:"hard of hearing"};var Si={};function Ti(a,b){function c(){f=!0}function d(m){h.push(m);Eh(m)}var e=a=Mb(a),f=!1,g,h=[],k=[];(new zh).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).X("stsd",function(m){g=m;h.push(m);Gh(m)}).X("encv",c).X("enca",c).X("dvav",function(m){k.push({box:m,qb:1701733238})}).X("dva1",function(m){k.push({box:m,qb:1701733238})}).X("dvh1",function(m){k.push({box:m,qb:1701733238})}).X("dvhe",function(m){k.push({box:m,qb:1701733238})}).X("dvc1",function(m){k.push({box:m,qb:1701733238})}).X("dvi1", | |
function(m){k.push({box:m,qb:1701733238})}).X("hev1",function(m){k.push({box:m,qb:1701733238})}).X("hvc1",function(m){k.push({box:m,qb:1701733238})}).X("avc1",function(m){k.push({box:m,qb:1701733238})}).X("avc3",function(m){k.push({box:m,qb:1701733238})}).X("ac-3",function(m){k.push({box:m,qb:1701733217})}).X("ec-3",function(m){k.push({box:m,qb:1701733217})}).X("ac-4",function(m){k.push({box:m,qb:1701733217})}).X("mp4a",function(m){k.push({box:m,qb:1701733217})}).parse(a);if(f)return a;if(0==k.length|| | |
!g)throw ib(Oc(a)),new U(2,3,3019,b);k.reverse();b=u(k);for(var l=b.next();!l.done;l=b.next())l=l.value,e=Ui(e,g,l.box,h,l.qb);return ec()&&tc()&&!fc()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e} | |
function Ui(a,b,c,d,e){var f=Vi.value(),g=a.subarray(c.start,c.start+c.size),h=Qb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Qb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Wi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=fc()||ec()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=u(d);for(d=a.next();!d.done;d=a.next())d=d.value,Wi(e,d.start,d.size+k.byteLength);k=Qb(e,b.start);b=Fh(b); | |
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Wi(a,b,c){a=Qb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Vi=new Sb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Xi(a,b,c,d,e,f,g){this.S=a;this.eb=b;this.Na=c;this.ud=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Xi.prototype.Nb=function(){return this.eb};Xi.prototype.Lb=function(){return this.Na};Xi.prototype.hc=function(){return this.g};function Yi(a,b){return a===b?!0:a&&b?a.Nb()==b.Nb()&&a.Lb()==b.Lb()&&Td(a.S().sort(),b.S().sort())&&Lb(a.hc(),b.hc()):a==b}S("shaka.media.InitSegmentReference",Xi); | |
Xi.prototype.getEndByte=Xi.prototype.Lb;Xi.prototype.getStartByte=Xi.prototype.Nb; | |
function Zi(a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,w){l=void 0===l?[]:l;r=void 0===r?$i:r;this.startTime=a;this.j=this.endTime=b;this.G=c;this.eb=d;this.Na=e;this.qa=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===q?null:q;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===t?null:t;this.thumbnailSprite=null;this.i=-1;this.u=void 0===w?!1:w;this.H=this.s=!1;a=u(this.g);for(b=a.next();!b.done;b= | |
a.next())b.value.li();this.u&&this.g.length&&this.g[this.g.length-1].ki();this.C=this.bandwidth=this.mimeType=this.codecs=null}p=Zi.prototype;p.S=function(){return this.G()};p.getStartTime=function(){return this.startTime};p.Dj=function(){return this.endTime};p.Nb=function(){return this.eb};p.Lb=function(){return this.Na};p.Yj=function(){return this.tilesLayout};p.Xj=function(){return this.B};p.xc=function(){return this.status};p.yk=function(){this.status=aj};p.Ng=function(){this.preload=!0}; | |
p.isPreload=function(){return this.preload};p.td=function(){this.l=!1};p.kk=function(){return this.l};p.li=function(){this.s=!0};p.nk=function(){return this.s};p.ki=function(){this.H=!0};p.lk=function(){return this.H};p.ji=function(){this.m=!0};p.gk=function(){return this.m};p.vf=function(a){this.thumbnailSprite=a};p.Wj=function(){return this.thumbnailSprite}; | |
p.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=u(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};p.ph=function(a){null==this.h?bb("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};p.cl=function(a){this.C=a};p.hc=function(){return this.C};function bj(a,b){a.qa=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())bj(c.value,b)}S("shaka.media.SegmentReference",Zi); | |
Zi.prototype.getSegmentData=Zi.prototype.hc;Zi.prototype.setSegmentData=Zi.prototype.cl;Zi.prototype.syncAgainst=Zi.prototype.ph;Zi.prototype.offset=Zi.prototype.offset;Zi.prototype.getThumbnailSprite=Zi.prototype.Wj;Zi.prototype.setThumbnailSprite=Zi.prototype.vf;Zi.prototype.hasByterangeOptimization=Zi.prototype.gk;Zi.prototype.markAsByterangeOptimization=Zi.prototype.ji;Zi.prototype.isLastPartial=Zi.prototype.lk;Zi.prototype.markAsLastPartial=Zi.prototype.ki;Zi.prototype.isPartial=Zi.prototype.nk; | |
Zi.prototype.markAsPartial=Zi.prototype.li;Zi.prototype.isIndependent=Zi.prototype.kk;Zi.prototype.markAsNonIndependent=Zi.prototype.td;Zi.prototype.isPreload=Zi.prototype.isPreload;Zi.prototype.markAsPreload=Zi.prototype.Ng;Zi.prototype.markAsUnavailable=Zi.prototype.yk;Zi.prototype.getStatus=Zi.prototype.xc;Zi.prototype.getTileDuration=Zi.prototype.Xj;Zi.prototype.getTilesLayout=Zi.prototype.Yj;Zi.prototype.getEndByte=Zi.prototype.Lb;Zi.prototype.getStartByte=Zi.prototype.Nb; | |
Zi.prototype.getEndTime=Zi.prototype.Dj;Zi.prototype.getStartTime=Zi.prototype.getStartTime;Zi.prototype.getUris=Zi.prototype.S;var $i=0,aj=1;Zi.Status={vl:$i,rm:aj,Sl:2};function cj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function dj(a){return!a||cj(a)?null:a.length?a.end(a.length-1):null}function ej(a,b){return!a||!a.length||cj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function fj(a,b){if(!a||!a.length||cj(a))return 0;var c=0;a=u(gj(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c} | |
function hj(a,b,c){if(!a||!a.length||cj(a))return null;a=gj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function gj(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function ij(){}function W(a){return document.createElement(a)}function jj(){var a=document.createElement("button");a.setAttribute("type","button");return a}function kj(a,b){var c=document.createElement("source");c.src=a;c.type=void 0===b?"":b;return c}function lj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",ij);ij.removeAllChildren=lj;/* | |
@license | |
Shaka Player | |
Copyright 2022 Google LLC | |
SPDX-License-Identifier: Apache-2.0 | |
*/ | |
function mj(){}function nj(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function oj(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function pj(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127} | |
function qj(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Bc(Mb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=Bc(Mb(a.data,3+c,f)),h;"--\x3e"===d?h=Bc(Mb(a.data,4+c+f)):h=Nb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null; | |
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Bc(Mb(a.data,1,d));a=Bc(Mb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Bc(Mb(a.data,1,d));a=Bc(Mb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Bc(Mb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"== | |
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Nb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Bc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Bc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Nb(a.data),b):null} | |
function rj(a){for(var b=0,c=[];nj(a,b);){var d=pj(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=pj(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=qj(e))&&c.push(f);b+=e.size+10}oj(a,b)&&(b+=10)}return c}function sj(a,b){for(var c=b=void 0===b?0:b,d=0;nj(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=pj(a,b+6),oj(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",mj);mj.getID3Data=sj; | |
mj.getID3Frames=rj;function tj(a,b){var c=null,d=null,e=null,f=a.V();b&1&&(e=a.zd());b&2&&a.skip(4);b&8&&(c=a.V());b&16&&(d=a.V());return{trackId:f,Nd:c,Fe:d,vm:e}}function uj(a,b){return 1==b?(b=a.V(),a=a.V(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.V()}}function vj(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.V();a.skip(4);a=a.Ba();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}} | |
function wj(a,b,c){var d=a.V(),e=[],f=null;c&1&&(f=a.V());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={ah:null,sampleSize:null,mf:null};c&256&&(h.ah=a.V());c&512&&(h.sampleSize=a.V());c&1024&&a.skip(4);c&2048&&(h.mf=0==b?a.V():a.xi());e.push(h)}return{zm:d,Di:e,qj:f}}function xj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.Ba();a.skip(2);a.skip(2);a.skip(2);a=a.Ba()+a.Ba()/65536;return{channelCount:b,sampleRate:a}}function yj(a){a=a.V();return{codec:Dh(a)}} | |
function zj(a){var b=null,c=null,d=a.Ub(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.Ba()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.Ba();a.Ba();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,oe:c}} | |
function Aj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Bj(a){return(10>a?"0":"")+a};/* | |
Copyright Brightcove, Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | |
limitations under the License. | |
*/ | |
function Cj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Mb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Dj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new wh(c,0)).V(),a.g=8*d,a.i-=d)}function Ej(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Dj(a)}a.h<<=b;a.g-=b} | |
function Fj(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Dj(a);c=b-c;return 0<c?d<<c|Fj(a,c):d}function Gj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Dj(a);return b+Gj(a)}function Hj(a){Ej(a,1+Gj(a))}function X(a){var b=Gj(a);return Fj(a,b+1)-1}function Ij(a){a=X(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Jj(a){return 1===Fj(a,1)}function Kj(a){return Fj(a,8)} | |
function Lj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Ij(a),d=(c+d+256)%256),c=0===d?c:d}function Mj(a){Kj(a);X(a);return X(a)}S("shaka.util.ExpGolomb",Cj);function Nj(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.B=this.C=null;this.i=[];this.h=[];this.G=null;this.l=[];this.H=this.s=this.u=null}p=Nj.prototype;p.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]}; | |
p.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Oj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Qe:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h< | |
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,q=m;2<q;){var r=f[n+1]+2;switch(f[n]){case 5:var t=Dc(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===t?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===t&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(t= | |
null,128===f[n+2]&&(t=f[n+3]),null!=t&&(this.H={channelCount:0===(t&15)?2:t&15,kj:t,sampleRate:48E3}))}n+=r;q-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Qe&&(g.Qe=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3"); | |
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.K=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.C=f.audio,this.B=f.audioCodec);-1!=f.Qe&&(this.G=f.Qe);d&&!this.J&&(d=!1,e=b-188);this.J=!0;break;case this.K:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.C:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h); | |
break;case this.G:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this}; | |
function Pj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.u&&(a.u=e);c.pts=Qj(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.s&&(a.s=d),c.dts=Qj(d, | |
a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.Ek=function(a){Dd("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Tg(a,{ae:null,state:null})}; | |
p.Tg=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;-1==f&&(l=0,m="hvc"==this.m?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(1===f)f=n?0:2;else if(n)if(1==n){n=h-f-1;if(0<=l)k.push({data:a.subarray(l+e,n),fullData:a.subarray(l,n),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.ae)g&&h<=4-g&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-g),f.fullData=f.fullData.subarray(0,f.fullData.byteLength- | |
g)),0<n&&(n=a.subarray(0,n),f.data=Pc(f.data,n),f.fullData=Pc(f.fullData,n),f.state=0);h<d?(m="hvc"==this.m?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}0<=l&&0<=f&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.ae&&(c=k.length?k[k.length-1]:b.ae)&&(c.data=Pc(c.data,a),c.fullData=Pc(c.fullData,a));b.state=f;return k}; | |
p.getMetadata=function(){for(var a=[],b=u(this.l),c=b.next();!c.done;c=b.next())c=Pc.apply(Jc,x(c.value)),(c=Pj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:rj(c.data),dts:c.dts,pts:c.pts});return a}; | |
p.wb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=u(this.i),c=b.next();!c.done;c=b.next()){var d=Pc.apply(Jc,x(c.value)),e=Pj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Pc(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h}; | |
p.Nc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=u(this.j),d=c.next();!d.done;d=c.next()){var e=Pc.apply(Jc,x(d.value)),f=Pj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Pc(d.data,e),this.g.push(d))}if(a){c={ae:null,state:null};d=[];e=u(this.g);for(f=e.next();!f.done;f=e.next())f=f.value, | |
f.nalus=this.Tg(f,c),f.nalus.length&&(d.push(f),c.ae=f.nalus[f.nalus.length-1]);this.g=d}b&&(this.g=this.g.sort(function(g,h){var k=(g.pts||0)-(h.pts||0);return(g.dts||0)-(h.dts||0)||k}))}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.wb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Nc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.Od=function(){return{audio:this.B,video:this.m}}; | |
p.Pe=function(){for(var a=[],b=u(this.Nc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};p.dk=function(){Dd("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Bg();return{height:a.height,width:a.width}};p.Bg=function(){return"hvc"==this.m?Rj(this):Sj(this)};function Tj(a){var b=a.Nc();return 1<b.length&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(1/(b-a)*9E4):null} | |
function Sj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Pe();if(!c.length)return b;c=c.find(function(r){return 7==r.type});if(!c)return b;c=new Cj(c.data);var d=Kj(c),e=Kj(c),f=Kj(c);Hj(c);if(Uj.includes(d)){var g=X(c);3===g&&Ej(c,1);Hj(c);Hj(c);Ej(c,1);if(Jj(c)){g=3!==g?8:12;for(var h=0;h<g;h++)Jj(c)&&(6>h?Lj(c,16):Lj(c,64))}}Hj(c);g=X(c);if(0===g)X(c);else if(1===g)for(Ej(c,1),Hj(c),Hj(c),g=X(c),h=0;h<g;h++)Hj(c);Hj(c);Ej(c,1);g=X(c);h=X(c);var k=Fj(c,1);0===k&&Ej(c,1);Ej(c, | |
1);var l=0,m=0,n=0,q=0;Jj(c)&&(l=X(c),m=X(c),n=X(c),q=X(c));b.height=String((2-k)*(h+1)*16-2*n-2*q);b.width=String(16*(g+1)-2*l-2*m);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=Tj(a);return b} | |
function Rj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Pe();if(!c.length)return b;c=c.find(function(C){return 33==C.type});if(!c)return b;var d=new Cj(c.fullData,!0);Kj(d);Kj(d);Fj(d,4);var e=Fj(d,3);Jj(d);var f=Fj(d,2),g=Fj(d,1),h=Fj(d,5),k=Fj(d,32);c=Kj(d);for(var l=Kj(d),m=Kj(d),n=Kj(d),q=Kj(d),r=Kj(d),t=Kj(d),w=[],v=[],z=0;z<e;z++)w.push(Jj(d)),v.push(Jj(d));if(0<e)for(z=e;8>z;z++)Fj(d,2);for(z=0;z<e;z++)w[z]&&Fj(d,88),v[z]&&Kj(d);X(d);e=X(d);3==e&&Fj(d,1);w=X(d);v=X(d);var y= | |
z=0,A=0,E=0;Jj(d)&&(z+=X(d),y+=X(d),A+=X(d),E+=X(d));b.width=String(w-(z+y)*(1===e||2===e?2:1));b.height=String(v-(A+E)*(1===e?2:1));d=function(C){for(var B=0,D=0;32>D;D++)B|=(C>>D&1)<<31-D;return B>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+t;r&&(f+="."+r.toString(16).toUpperCase());q&&(f+="."+q.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase()); | |
c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=Tj(a);return b}function Qj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Vj(a){return 0>Oj(a)?!1:!0}function Oj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}S("shaka.util.TsParser",Nj);Nj.syncOffset=Oj;Nj.probe=Vj;Nj.prototype.getVideoInfo=Nj.prototype.Bg;Nj.prototype.getVideoResolution=Nj.prototype.dk; | |
Nj.prototype.getVideoNalus=Nj.prototype.Pe;Nj.prototype.getCodecs=Nj.prototype.Od;Nj.prototype.getStartTime=Nj.prototype.getStartTime;Nj.prototype.getVideoData=Nj.prototype.Nc;Nj.prototype.getAudioData=Nj.prototype.wb;Nj.prototype.getMetadata=Nj.prototype.getMetadata;Nj.prototype.parseNalus=Nj.prototype.Tg;Nj.prototype.parseAvcNalus=Nj.prototype.Ek;Nj.prototype.parse=Nj.prototype.parse;Nj.prototype.clearData=Nj.prototype.clearData;Nj.Timescale=9E4; | |
var Uj=[100,110,122,244,44,83,86,118,128,138,139,134];function Wj(a,b,c){this.g=null;this.s=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&cb("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,Dd("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{cb("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(cb("Could not find LCEVC Library on this page"), | |
a=!1):(this.h.SupportObject.SupportStatus||cb(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Xj(a){a.g&&a.i.classList.add("shaka-hidden")} | |
Wj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Yj(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.s=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Wj);Wj.prototype.release=Wj.prototype.release;function Zj(a,b,c,d){var e=this;this.g=a;this.J=c;this.B=null;this.ea=b;this.i={};this.H={};this.La={};this.h=null;this.Va=!1;this.aa=d||null;this.s={};this.u=new td;this.j={};this.L=null;this.I=new Wg;this.Ga="";this.Za=!1;this.Aa=!0;this.W=!1;this.C=this.M=null;this.l=ak(this,this.I);this.K=!1;this.O=new sh(function(){return bk(e)});this.G=!1;this.Z="UNKNOWN";this.Ka=this.Sa=!1;this.Ea=new Wg;this.m=!1;this.sa=null;this.U={};this.na=this.P=this.ra=this.R=null;this.ka=new Wg;this.g.remote&&(this.W= | |
"disconnected"!=this.g.remote.state,this.u.o(this.g.remote,"connect",function(){e.W="disconnected"!=e.g.remote.state}),this.u.o(this.g.remote,"connecting",function(){e.W="disconnected"!=e.g.remote.state}),this.u.o(this.g.remote,"disconnect",function(){e.W="disconnected"!=e.g.remote.state}))} | |
function ak(a,b){a.Aa=!0;if(window.ManagedMediaSource){a.C||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.u.o(c,"startstreaming",function(){a.Aa=!0});a.u.o(c,"endstreaming",function(){a.Aa=!1})}else c=new MediaSource;a.u.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.Ga);b.resolve()});a.u.oa(a.g,"playing",function(){a.Za=!0});a.Ga=ck(c);a.g.removeAttribute("src");a.M&&a.g.removeChild(a.M);a.C&&a.g.removeChild(a.C);a.M=kj(a.Ga);a.g.appendChild(a.M);a.C&&a.g.appendChild(a.C);a.g.load(); | |
return c}function dk(a,b,c){a.g&&window.ManagedMediaSource&&a.l&&(a.C&&a.g.removeChild(a.C),a.C=kj(b,c),a.g.appendChild(a.C),a.g.disableRemotePlayback=!1)} | |
function ek(a,b){var c,d,e,f,g,h,k,l,m,n,q;return P(function(r){if(1==r.g)return a.createSegmentIndex?G(r,a.createSegmentIndex(),2):r.A(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=Yc;d=new Set;e=u(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",h!=a.mimeType||k!=a.codecs)if(l=h+":"+k,!d.has(l))if(d.add(l),b==c.Oa){if(m=Af(h,k),!Of(m))return r.return(!1)}else if(b==c.Ca? | |
k=wg(k):b==c.ba&&(k=vg(k,h)),n=Ef(a,h,k),q=Cf(h,k),!zd(n)&&!uf(q))return r.return(!1);return r.return(!0)})}p=Zj.prototype;p.destroy=function(){return this.O.destroy()}; | |
function bk(a){var b,c,d,e,f,g,h,k;return P(function(l){if(1==l.g){b=[];for(c in a.s)for(d=a.s[c],e=d[0],a.s[c]=d.slice(0,1),e&&b.push(e.p.catch(Wf)),f=u(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new U(2,7,7003,void 0));a.h&&b.push(a.h.destroy());return G(l,Promise.all(b),2)}for(k in a.j)a.j[k].destroy();a.u&&(a.u.release(),a.u=null);a.g&&a.C&&a.g.removeChild(a.C);a.g&&a.M&&(a.g.removeChild(a.M),a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.M=null;a.C=null;a.B=null;a.l= | |
null;a.h=null;a.ea=null;a.i={};a.j={};a.L=null;a.s={};a.aa=null;a.U={};a.J=null;H(l)})} | |
p.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:return f=Yc,G(n,e.I,2);case 2:if(!fk(e)&&!gk(e)){n.A(3);break}bb("Expected MediaSource to be open during init(); reopening the media source.");e.I=new Wg;e.l=ak(e,e.I);return G(n,e.I,3);case 3:e.G=b,e.Z=c,e.Sa=d,e.Ka=!e.G&&"HLS"==e.Z&&!e.Sa,e.U={},e.R=null,e.ra=null,e.P=null,e.na=null,e.ka=new Wg,g=u(a.keys()),h=g.next();case 5:if(h.done){n.A(7);break}k= | |
h.value;l=a.get(k);return G(n,hk(e,k,l,l.codecs),8);case 8:e.m?(e.s[f.ba]=[],e.s[f.Ca]=[]):e.s[k]=[];h=g.next();n.A(5);break;case 7:(m=a.get(f.ba))&&m.isAudioMuxedInVideo&&(e.m=!0),H(n)}})}; | |
function hk(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w;return P(function(v){switch(v.g){case 1:return e=Yc,f=Xa,g=Ya,G(v,ek(c,b),2);case 2:g.call(f,v.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Af(c.mimeType,d);if(b==e.Oa){ik(a,h,a.G,c.external);v.A(0);break}k=a.B.forceTransmux;if(!zd(h)||!a.G&&Bf.includes(h))k=!0;l=Cf(c.mimeType,d);if(!k){v.A(4);break}m=Uc(e.ba,(d||"").split(","));n=Uc(e.Ca,(d||"").split(","));if(!m||!n){v.A(5);break}a.m=!0;return G(v,hk(a,e.ba,c,m),6);case 6:return G(v, | |
hk(a,e.Ca,c,n),7);case 7:return v.return();case 5:if(q=uf(l))r=q(),a.j[b]=r,h=r.convertCodecs(b,l);case 4:t=h+a.B.addExtraFeaturesToSourceBuffer(h);th(a.O);try{w=a.l.addSourceBuffer(t)}catch(z){throw new U(2,3,3015,z,"The mediaSource_ status was "+a.l.readyState+" expected 'open'",null);}a.G&&(w.mode=jk);a.u.o(w,"error",function(){var z=a.s[b][0];z.p.reject(new U(2,3,3014,a.g.error?a.g.error.code:0,z.uri))});a.u.o(w,"updateend",function(){return kk(a,b)});a.i[b]=w;a.H[b]=h;a.La[b]=!!c.drmInfos.length; | |
H(v)}})}p.configure=function(a){this.B=a;this.h&&(this.h.B=a.modifyCueCallback)};function lk(a){return a.Aa&&!a.W&&!a.K} | |
function ik(a,b,c,d){a.h||(a.h=new Nf(a.ea),a.h&&(a.h.B=a.B.modifyCueCallback));var e=a.h;d=d||a.Va;a=a.Z;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Pf[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):Dd("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):Dd("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.C=d)} | |
function fk(a){return a.K?!1:a.l?"ended"==a.l.readyState:!0}function gk(a){return a.K?!1:a.l?"closed"==a.l.readyState:!0}function mk(a,b){Object.keys(a.i).length?b==Wc?a=a.h.g:(a=nk(a,b),a=!a||cj(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null):a=null;return a}function ok(a,b){return Object.keys(a.i).length?b==Wc?a.h.h:dj(nk(a,b)):null}function pk(a,b,c){if(b==Wc)return a=a.h,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=nk(a,b);return fj(a,c)} | |
p.Yb=function(){var a={total:this.K?[]:gj(this.g.buffered),audio:gj(nk(this,"audio")),video:gj(nk(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function nk(a,b){if(a.K||a.W)return null;try{return a.i[b].buffered}catch(c){return null}} | |
function qk(a,b,c,d,e,f){var g=null,h=[],k=Mb(c);if(Bf.includes(f))b=rj(k),b.length&&d&&((c=b.find(function(r){return"com.apple.streaming.transportStreamTimestamp"===r.description}))&&(g=Math.round(c.data)/1E3),a.J.onMetadata([{cueTime:d.startTime,data:k,frames:b,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.qa&&d.qa.timescale){var l=d.qa.timescale;if(!isNaN(l)){var m=null!=e.emsgSchemeIdUris&&0<e.emsgSchemeIdUris.length||a.B.dispatchAllEmsgBoxes,n=0,q=!1;k=new zh; | |
m&&k.X("emsg",function(r){var t=e.emsgSchemeIdUris;if(0===r.version){var w=r.reader.Xc();var v=r.reader.Xc();var z=r.reader.V();var y=r.reader.V();var A=r.reader.V();var E=r.reader.V();var C=d.startTime+y/z}else z=r.reader.V(),C=r.reader.zd()/z+d.timestampOffset,y=C-d.startTime,A=r.reader.V(),E=r.reader.V(),w=r.reader.Xc(),v=r.reader.Xc();r=r.reader.Ub(r.reader.getLength()-r.reader.Pa());if(t&&t.includes(w)||a.B.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==w)a.J.Dk();else if(t=C+A/z,z=(new Map).set("detail", | |
{startTime:C,endTime:t,schemeIdUri:w,value:v,timescale:z,presentationTimeDelta:y,eventDuration:A,id:E,messageData:r}),z=new T("emsg",z),z.cancelable=!0,a.J.onEvent(z),!z.defaultPrevented&&("https://aomedia.org/emsg/ID3"==w||"https://developer.apple.com/streaming/emsg-id3"==w)&&(w=rj(r),w.length))a.J.onMetadata([{cueTime:C,data:r,frames:w,dts:C,pts:C}],0,t)});k.X("prft",function(r){var t=r.reader,w=r.version;t.V();r=t.V();var v=t.V();r=1E3*r+v/Math.pow(2,32)*1E3;0===w?t=t.V():(w=t.V(),t=t.V(),t=w* | |
Math.pow(2,32)+t);r=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+r)).getTime();t=(new Map).set("detail",{wallClockTime:r,programStartDate:new Date(r-t/l*1E3)});t=new T("prft",t);a.J.onEvent(t)}).box("moof",Eh).box("traf",Eh).X("tfdt",function(r){q||(n=uj(r.reader,r.version).baseMediaDecodeTime/l,q=!0,m||r.parser.stop())}).parse(c,!0);q&&0==d.timestampOffset&&(g=n)}}else f.includes("/mp4")||f.includes("/webm")||!Vj(k)||(a.U[b]?a.U[b].clearData():a.U[b]=new Nj,h=a.U[b].parse(k),k=h.getStartTime(b), | |
null!=k&&(g=k),h=h.getMetadata());return{timestamp:g,metadata:h}} | |
function rk(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J;return P(function(K){switch(K.g){case 1:m=Yc;if(b!=m.Oa){K.A(2);break}if("HLS"!=a.Z){K.A(3);break}return G(K,a.Ea,4);case 4:n=K.h,a.h.u=n;case 3:return G(K,Qf(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.S()[0]:null),5);case 5:return K.return();case 2:if(l||!a.m){K.A(6);break}return G(K,rk(a,m.ba,c,d,e,f,g,h,k,!0),7);case 7:return G(K,rk(a,m.Ca,c,d,e,f, | |
g,h,k,!0),8);case 8:return K.return();case 6:if(!a.i[b])return K.return();q=a.i[b].timestampOffset;r=a.H[b];a.j[b]&&(r=a.j[b].getOriginalMimeType());if(d&&(t=qk(a,b,c,d,e,r),w=t.timestamp,v=t.metadata,null!=w&&(null==a.R&&b==m.Ca&&(a.R=w,a.ra=d.startTime,null!=a.P&&(z=0,a.ra==a.na&&(z=a.R-a.P),a.ka.resolve(z))),null==a.P&&b==m.ba&&(a.P=w,a.na=d.startTime,null!=a.R&&(y=0,a.ra==a.na&&(y=a.R-a.P),a.ka.resolve(y))),A=w,E=Bf,!a.G&&E.includes(a.H[b])&&(A=0),C=d.startTime-A,B=Math.abs(q-C),(.001<=B||g|| | |
h)&&(!k||0<C||!q)&&(q=C,a.Ka&&(sk(a,b,function(){return tk(a,b)},null),sk(a,b,function(){return uk(a,b,q)},null))),(D=b==m.Ca||!(m.Ca in a.i))&&a.Ea.resolve(q)),v.length))a.J.onMetadata(v,q,d?d.endTime:null);f&&b==m.Ca&&(a.h||ik(a,"application/cea-608",a.G,!1),a.L||(I=r.split(";",1)[0],a.L=new Kd(I)),d?(F=a.L.i(c),F.length&&Uf(a.h,F,d.startTime,d.endTime,q)):a.L.init(c,h));if(!a.j[b]){K.A(9);break}return G(K,a.j[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=K.h;case 9:c=vk(a,c,d?d.startTime:null, | |
b,d?d.S()[0]:null);if(!d||!a.G||b==m.Oa){K.A(11);break}if(!g&&!h){K.A(11);break}L=d.startTime;if("HLS"!=a.Z||a.m||b!=m.ba||!a.i[m.Ca]){K.A(13);break}return G(K,a.ka,14);case 14:J=K.h,.1<Math.abs(J)&&(L-=J);case 13:sk(a,b,function(){return tk(a,b)},null),sk(a,b,function(){return uk(a,b,L)},null);case 11:return G(K,sk(a,b,function(){var O=c;if("video"==b&&a.aa){var M=a.aa;M.g&&M.g.appendBuffer(O,"video",M.s,-q)}a.i[b].appendBuffer(O)},d?d.S()[0]:null),15);case 15:H(K)}})} | |
function wk(a,b){var c=ok(a,"video")||0;Sf(a.h,b,c)}function xk(a){a.h&&Sf(a.h,"",0)}p.remove=function(a,b,c){var d=this,e;return P(function(f){return 1==f.g?(e=Yc,a==e.Oa?G(f,d.h.remove(b,c),0):G(f,sk(d,a,function(){return yk(d,a,b,c)},null),4)):d.m?G(f,sk(d,e.ba,function(){return yk(d,e.ba,b,c)},null),0):f.A(0)})}; | |
function zk(a,b){var c;return P(function(d){return 1==d.g?(c=Yc,b==c.Oa?a.h?G(d,a.h.remove(0,Infinity),0):d.return():G(d,sk(a,b,function(){return yk(a,b,0,a.l.duration)},null),4)):a.m?G(d,sk(a,c.ba,function(){return yk(a,c.ba,0,a.l.duration)},null),0):d.A(0)})}p.flush=function(a){var b=this,c;return P(function(d){return 1==d.g?(c=Yc,a==c.Oa?d.return():G(d,sk(b,a,function(){b.g.currentTime-=.001;kk(b,a)},null),2)):b.m?G(d,sk(b,c.ba,function(){var e=c.ba;b.g.currentTime-=.001;kk(b,e)},null),0):d.A(0)})}; | |
function Ak(a,b,c,d,e,f,g,h,k){var l,m,n;return P(function(q){if(1==q.g){l=Yc;if(b==l.Oa)return f||(a.h.u=c),Rf(a.h,d,e),q.return();m=[];return G(q,Bk(a,b,g,h,k),2)}n=q.h;n||(m.push(sk(a,b,function(){return tk(a,b)},null)),a.m&&m.push(sk(a,l.ba,function(){return tk(a,l.ba)},null)));f||(m.push(sk(a,b,function(){return uk(a,b,c)},null)),a.m&&m.push(sk(a,l.ba,function(){return uk(a,l.ba,c)},null)));if(0!=d||Infinity!=e)m.push(sk(a,b,function(){a.i[b].appendWindowStart=0;a.i[b].appendWindowEnd=e;a.i[b].appendWindowStart= | |
d;kk(a,b)},null)),a.m&&m.push(sk(a,l.ba,function(){var r=l.ba;a.i[r].appendWindowStart=0;a.i[r].appendWindowEnd=e;a.i[r].appendWindowStart=d;kk(a,r)},null));return m.length?G(q,Promise.all(m),0):q.A(0)})} | |
function Ck(a,b,c){var d,e;return P(function(f){if(1==f.g){d=Yc;if(b==d.Oa)return f.return();b==d.Ca&&(a.Ea=new Wg);if(!a.G||(e=ok(a,b))&&.1>Math.abs(e-c))return f.return();sk(a,b,function(){return tk(a,b)},null);a.m&&sk(a,d.ba,function(){return tk(a,d.ba)},null);return G(f,sk(a,b,function(){return uk(a,b,c)},null),2)}return a.m?G(f,sk(a,d.ba,function(){return uk(a,d.ba,c)},null),0):f.A(0)})} | |
p.endOfStream=function(a){var b=this;return P(function(c){return G(c,Dk(b,function(){fk(b)||gk(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};p.sb=function(a){var b=this;return P(function(c){return G(c,Dk(b,function(){if(a<b.l.duration)for(var d in b.i){var e={start:function(){},p:new Wg,uri:null};b.s[d].unshift(e)}b.l.duration=a;b.sa=a}),0)})};p.getDuration=function(){return this.l.duration}; | |
function Ek(a,b,c){P(function(d){return fk(a)||gk(a)?d.return():G(d,Dk(a,function(){fk(a)||gk(a)||a.l.setLiveSeekableRange(b,c)}),0)})}function Fk(a){P(function(b){return fk(a)||gk(a)?b.return():G(b,Dk(a,function(){fk(a)||gk(a)||a.l.clearLiveSeekableRange()}),0)})}function yk(a,b,c,d){d<=c?kk(a,b):a.i[b].remove(c,d)}function tk(a,b){var c=a.i[b].appendWindowStart,d=a.i[b].appendWindowEnd;a.i[b].abort();a.i[b].appendWindowStart=c;a.i[b].appendWindowEnd=d;kk(a,b)} | |
function uk(a,b,c){0>c&&(c+=.001);a.i[b].timestampOffset=c;kk(a,b)}function kk(a,b){if(!a.K){var c=a.s[b][0];c&&(c.p.resolve(),Gk(a,b))}}function sk(a,b,c,d){th(a.O);c={start:c,p:new Wg,uri:d};a.s[b].push(c);1==a.s[b].length&&Hk(a,b);return c.p} | |
function Dk(a,b){var c,d,e,f,g,h,k,l,m,n,q,r;return P(function(t){switch(t.g){case 1:th(a.O);c=[];d=Object.keys(a.i);e=u(d);f=e.next();for(g={};!f.done;g={ready:void 0},f=e.next())h=f.value,g.ready=new Wg,k={start:function(w){return function(){return w.ready.resolve()}}(g),p:g.ready,uri:null},a.s[h].push(k),c.push(g.ready),1==a.s[h].length&&k.start();ta(t,2);return G(t,Promise.all(c),4);case 4:wa(t,3);break;case 2:throw l=ya(t),l;case 3:return ta(t,5,6),G(t,b(),6);case 6:Ca(t);m=u(d);for(n=m.next();!n.done;n= | |
m.next())q=n.value,Gk(a,q);Da(t,0);break;case 5:throw r=ya(t),new U(2,3,3015,r,a.g.error||"No error in the media element",null);}})}function Gk(a,b){a.s[b].shift();Hk(a,b)}function Hk(a,b){var c=a.s[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new U(2,3,3017,b)):c.p.reject(new U(2,3,3015,d,a.g.error||"No error in the media element",c.uri)),Gk(a,b)}} | |
function vk(a,b,c,d,e){var f=null==c,g=a.La[d];c=a.J.Hj();if(f=a.B.insertFakeEncryptionInInit&&f&&g)c=Vb(c),f=hc()||fc()||nc()||ec()&&tc()&&c;f&&"mp4"==Gf(a.H[d])&&(b=Ti(b,e));return b}function Ik(a,b,c,d){return sk(a,b,function(){b!==Wc&&(Bd()&&(a.j[b]&&(a.j[b].destroy(),delete a.j[b]),d&&(a.j[b]=d),a.i[b].changeType(c+a.B.addExtraFeaturesToSourceBuffer(c)),a.H[b]=c),kk(a,b))},null)} | |
function Jk(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A;return P(function(E){switch(E.g){case 1:c=Yc;a.K=!0;a.m=!1;d=a.g.currentTime;e=a.g.autoplay;f=a.g.paused;a.Za&&(a.g.autoplay=!1);ua(E,2);a.u.Ua();for(g in a.j)a.j[g].destroy();for(h in a.i){k=a.i[h];try{a.l.removeSourceBuffer(k)}catch(C){}}a.j={};a.i={};l=a.l.duration;a.I=new Wg;a.l=ak(a,a.I);return G(E,a.I,4);case 4:!isNaN(l)&&l?a.l.duration=l:!isNaN(a.sa)&&a.sa&&(a.l.duration=a.sa),m=new Wg,n=a.l.sourceBuffers,q=b.size,r=0,t=function(){r++; | |
r===q&&(m.resolve(),a.u.Ja(n,"addsourcebuffer",t))},a.u.o(n,"addsourcebuffer",t),w=u(b.keys()),v=w.next();case 5:if(v.done)return(A=b.get(c.ba))&&A.isAudioMuxedInVideo&&(a.m=!0),a.m&&!a.s[c.ba]&&(a.s[c.ba]=[]),a.g.currentTime=d,G(E,m,2);z=v.value;y=b.get(z);return G(E,hk(a,z,y,y.codecs),6);case 6:v=w.next();E.A(5);break;case 2:Ca(E),a.K=!1,th(a.O),a.u.oa(a.g,"canplaythrough",function(){a.O.g||(a.g.autoplay=e,f||a.g.play())}),Da(E,0)}})}function Kk(a,b){return Dk(a,function(){return Jk(a,b)})} | |
function Lk(a,b,c,d){var e=!1,f=Uc("audio",(d||"").split(",")),g=Uc("video",(d||"").split(",")),h=g;"audio"==b&&(h=f);h||(h=d);d=Af(c,h);var k=a.B.forceTransmux;if(!zd(d)||!a.G&&Bf.includes(d))k=!0;if(k&&(a=Cf(c,h),c=uf(a))){var l=c();f&&g&&(e=!0);d=l.convertCodecs(b,a)}b=Hf(Lf(d));return{uh:l,il:e,Gh:Kf(d),codec:b,mimeType:d}} | |
function Bk(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,w,v,z,y;return P(function(A){if(1==A.g){f=Yc;if(b==f.Oa)return A.return(!1);g=Hf(Lf(a.H[b]));h=Kf(a.H[b]);k=Lk(a,b,c,d);l=k.uh;m=k.il;n=k.Gh;q=k.codec;r=k.mimeType;t=!0;m&&(w=Lk(a,f.ba,c,d),v=Hf(Lf(a.H[f.ba])),z=Kf(a.H[f.ba]),t=v==w.codec&&z==w.Gh,w.uh&&w.uh.destroy());if(g===q&&h===n&&t)return a.j[b]&&!l?(a.j[b].destroy(),delete a.j[b]):!a.j[b]&&l?a.j[b]=l:l&&(a.j[b]&&a.j[b].transmux!=l.transmux?(a.j[b].destroy(),delete a.j[b],a.j[b]=l):l.destroy()), | |
A.return(!1);y=!0;if(a.m||m&&l&&!a.j[b])y=!1;if(y&&"smooth"===a.B.codecSwitchingStrategy&&Bd())return G(A,Ik(a,b,r,l),3);l&&l.destroy();return G(A,Kk(a,e),3)}return A.return(!0)})}function Mk(a,b,c,d){if(b==Wc)var e=!1;else{e=Hf(Lf(a.H[b]));var f=Kf(a.H[b]),g=Af(c,d),h=a.B.forceTransmux;if(!zd(g)||!a.G&&Bf.includes(g))h=!0;c=Cf(c,d);h&&(h=uf(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Hf(Lf(g));g=Kf(g);e=e!==b||f!==g}return e?"smooth"!==a.B.codecSwitchingStrategy||!Bd()||a.m:!1} | |
var ck=window.URL.createObjectURL,jk="sequence";function Vk(a,b,c){this.i=a;this.G=b;this.s=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.K=!1;this.J=0;this.H=void 0===c?!0:c;this.I=0;this.u=!1;this.m=a}p=Vk.prototype;p.getDuration=function(){return this.l};p.Mj=function(){return this.h};p.Ki=function(a){this.i=a};p.sb=function(a){this.l=a};p.Qj=function(){return this.i};p.Gi=function(a){this.B=a};p.$c=function(a){a&&!this.C&&(this.K=!0);this.C=a};p.rf=function(a){this.s=a};p.Oe=function(){return this.s}; | |
p.gh=function(a){this.G=a};p.Cj=function(){return this.G};p.ri=function(a,b){if(0!=a.length){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.cf(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);null!=this.i&&this.H&&!this.u&&(this.i=c-this.g-this.h)}}}; | |
p.be=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=u(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.cf(b);this.g=Math.max(this.g,c);null!=this.i&&this.H&&!this.u&&(this.i=d-this.g-this.h)}};p.pi=function(a,b){this.cf(a);Infinity==b||this.T()||(this.g=Math.max(this.g,b))};p.Nj=function(){return this.g};p.Xe=function(){this.u=!0}; | |
p.qk=function(){return this.u};p.Ii=function(a){this.m=a};p.Gj=function(){return this.m};p.cf=function(a){null==this.j?this.j=a:this.K||(this.j=Math.min(this.j,a))};p.Og=function(a){this.h=Math.max(this.h,a)};p.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};p.T=function(){return Infinity==this.l&&!this.C};p.Rc=function(){return Infinity!=this.l&&!this.C};p.Eb=function(){return Math.max(this.J,this.wc()-this.s)};p.Mi=function(a){this.J=a}; | |
p.wc=function(){return this.T()||this.Rc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.I,this.l):this.g?Math.min(this.g,this.l):this.l};p.Rd=function(a){var b=Math.max(this.j,this.J);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.wc()-this.s+a,this.Mb()))};p.fc=function(){return this.Rd(0)};p.Mb=function(){return Math.max(0,this.wc()-(this.T()||this.Rc()?this.G:0))};p.Wi=function(){return null==this.i||null!=this.g&&this.H?!1:!0}; | |
p.Fi=function(a){this.I=a};p.uj=function(){return this.I};S("shaka.media.PresentationTimeline",Vk);Vk.prototype.getAvailabilityTimeOffset=Vk.prototype.uj;Vk.prototype.setAvailabilityTimeOffset=Vk.prototype.Fi;Vk.prototype.usingPresentationStartTime=Vk.prototype.Wi;Vk.prototype.getSeekRangeEnd=Vk.prototype.Mb;Vk.prototype.getSeekRangeStart=Vk.prototype.fc;Vk.prototype.getSafeSeekRangeStart=Vk.prototype.Rd;Vk.prototype.getSegmentAvailabilityEnd=Vk.prototype.wc;Vk.prototype.setUserSeekStart=Vk.prototype.Mi; | |
Vk.prototype.getSegmentAvailabilityStart=Vk.prototype.Eb;Vk.prototype.isInProgress=Vk.prototype.Rc;Vk.prototype.isLive=Vk.prototype.T;Vk.prototype.offset=Vk.prototype.offset;Vk.prototype.notifyMaxSegmentDuration=Vk.prototype.Og;Vk.prototype.notifyMinSegmentStartTime=Vk.prototype.cf;Vk.prototype.getInitialProgramDateTime=Vk.prototype.Gj;Vk.prototype.setInitialProgramDateTime=Vk.prototype.Ii;Vk.prototype.isStartTimeLocked=Vk.prototype.qk;Vk.prototype.lockStartTime=Vk.prototype.Xe; | |
Vk.prototype.getMaxSegmentEndTime=Vk.prototype.Nj;Vk.prototype.notifyPeriodDuration=Vk.prototype.pi;Vk.prototype.notifySegments=Vk.prototype.be;Vk.prototype.notifyTimeRange=Vk.prototype.ri;Vk.prototype.getDelay=Vk.prototype.Cj;Vk.prototype.setDelay=Vk.prototype.gh;Vk.prototype.getSegmentAvailabilityDuration=Vk.prototype.Oe;Vk.prototype.setSegmentAvailabilityDuration=Vk.prototype.rf;Vk.prototype.setStatic=Vk.prototype.$c;Vk.prototype.setClockOffset=Vk.prototype.Gi; | |
Vk.prototype.getPresentationStartTime=Vk.prototype.Qj;Vk.prototype.setDuration=Vk.prototype.sb;Vk.prototype.setPresentationStartTime=Vk.prototype.Ki;Vk.prototype.getMaxSegmentDuration=Vk.prototype.Mj;Vk.prototype.getDuration=Vk.prototype.getDuration;function Wk(a,b,c){this.j=c;this.l=a;this.u=Xk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.B=b;this.i=function(){}}Wk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function Yk(a,b){a.i=b}function Zk(a){this.g=a}function Xk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=u(gj(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function $k(a,b,c,d,e){var f=this;this.B=e;this.g=a;this.G=b;this.s=c;this.m=new td;this.l=this.C=!1;this.I=a.readyState;this.H=this.i=0;this.h=d;this.u=!1;this.m.o(a,"waiting",function(){return al(f)});this.j=new ac(function(){al(f)})}$k.prototype.release=function(){this.m&&(this.m.release(),this.m=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.G=this.B=null};$k.prototype.Rg=function(){this.u=!0;al(this)}; | |
function al(a){if(0!=a.g.readyState&&a.C){if(a.g.seeking){if(!a.l)return}else a.l=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.I&&(a.I=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=Xk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.u!=d)b.m=f,b.g=e,b.u=d,b.h=!1;e=f-b.m;if(d=e>=b.B&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.j(new T("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=hj(c,b,a.s.gapDetectionThreshold), | |
null!=d&&(0!=d||a.u))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||fc()||hc())e=Math.ceil(100*(e+a.s.gapPadding))/100;e>=a.G.Mb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.H++,a.B(new T("gapjumped")))}}}};function bl(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=cl.value().get(b),c.oa(a,b,d))}var cl=new Sb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function dl(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new td;this.i=new el(a);bl(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){fl(e,e.j())})}dl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function gl(a){return a.s?a.g.currentTime:a.j()} | |
function hl(a,b){0<a.g.readyState?il(a.i,b):bl(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){fl(a,a.j())})}function fl(a,b){.001>Math.abs(a.g.currentTime-b)?jl(a):(a.h.oa(a.g,"seeking",function(){jl(a)}),il(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function jl(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)} | |
function el(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new ac(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}el.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function il(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.xa(.1)};function kl(a){this.h=a;this.j=!1;this.g=null;this.i=new td}p=kl.prototype;p.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.oa(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;bl(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};p.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};p.Of=function(a){this.g=this.j?this.g:a}; | |
p.xe=function(){return(this.j?this.h.currentTime:this.g)||0};p.Ah=function(){return 0};p.yh=function(){return 0};p.oi=function(){}; | |
function ll(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.l=c;this.B=e;this.u=null;this.s=ml(a,c,f);this.j=new $k(a,b.presentationTimeline,c,this.s,f);this.h=new dl(a,function(){a:{var h=g.j;h.l=!0;h.u=!1;al(h);var k=gl(g.h);h=nl(g,k);if(.001<Math.abs(h-k)){k=!1;if(!kc()||kc()&&uc())k=!0;else{var l=Date.now()/1E3,m=kc()&&gc("Fuchsia")?3:1;if(!g.u||g.u<l-m)g.u=l,k=!0}if(k){hl(g.h,h);h=void 0;break a}}g.B();h=void 0}return h},function(h){var k=g.j;k.C=!0;k.g.seeking&&!k.l&&(k.l= | |
!0,k.i=h);k.j&&k.j.xa(k.s.gapJumpTimerTime);al(k)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.fc():g.g.Mb():0>h&&(h=g.g.Mb()+h);return ol(g,pl(g,h))});this.m=new ac(function(){if(0!=g.i.readyState&&!g.i.paused){var h=gl(g.h),k=g.g.fc(),l=g.g.Mb();3>l-k&&(k=l-3);h<k&&(h=nl(g,h),g.i.currentTime=h)}})}p=ll.prototype;p.ready=function(){this.m.xa(.25)}; | |
p.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.B=function(){}};p.Of=function(a){hl(this.h,a)};p.xe=function(){var a=gl(this.h);return 0<this.i.readyState&&!this.i.paused?pl(this,a):a};p.Ah=function(){return this.s?this.s.s:0};p.yh=function(){return this.j.H};p.oi=function(){this.j.Rg()};function ol(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b} | |
function nl(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.fc(),f=a.g.Mb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Rd(c),k=a.g.Rd(d);c=a.g.Rd(c+d);return b>=g?ol(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?ej(a.i.buffered,k)?k:c:b>=h||ej(a.i.buffered,b)?b:c}function pl(a,b){var c=a.g.fc();if(b<c)return c;a=a.g.Mb();return b>a?a:b} | |
function ml(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Wk(new Zk(a),b.stallThreshold,c);Yk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function ql(a){this.g=a;this.m=null;this.i=0;this.s=!1}p=ql.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.zk=function(){this.s=!0};p.Xb=function(a){for(var b=u(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function Dg(a){return a.g[0]||null} | |
p.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};p.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.s)for(var b=u(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)}; | |
p.Ze=function(a){if(!this.s&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};p.$d=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Ze(a);this.bb(b)};p.bb=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}}; | |
p.ld=function(a,b,c){c=void 0===c?!1:c;if(!this.s){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Zi(a.startTime,b,a.G,a.eb,a.Na,a.qa,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}}; | |
p.zf=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new ac(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.xa(a))};ql.prototype[Symbol.iterator]=function(){return this.ec(0)}; | |
ql.prototype.ec=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return bb("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new rl(this,d,f,c)};function sl(a,b,c){a=new Zi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new ql([a])} | |
S("shaka.media.SegmentIndex",ql);ql.forSingleSegment=sl;ql.prototype.getIteratorForTime=ql.prototype.ec;ql.prototype.updateEvery=ql.prototype.zf;ql.prototype.fit=ql.prototype.ld;ql.prototype.evict=ql.prototype.bb;ql.prototype.mergeAndEvict=ql.prototype.$d;ql.prototype.offset=ql.prototype.offset;ql.prototype.get=ql.prototype.get;ql.prototype.find=ql.prototype.find;ql.prototype.markImmutable=ql.prototype.zk;ql.prototype.release=ql.prototype.release;ql.prototype.getNumEvicted=ql.prototype.getNumEvicted; | |
ql.prototype.getNumReferences=ql.prototype.getNumReferences;function rl(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}p=rl.prototype;p.Ed=function(a){this.reverse=a};p.pj=function(){return this.h};p.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.u&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a}; | |
p.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.u&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};p.Zg=function(){var a=this.current();if(a.s&&!a.l&&(a=this.i.get(this.h))&&0<a.g.length)for(var b=a.g[this.g];b.l&&!(0>=this.g);)this.g--,b=a.g[this.g]}; | |
S("shaka.media.SegmentIterator",rl);rl.prototype.resetToLastIndependent=rl.prototype.Zg;rl.prototype.next=rl.prototype.next;rl.prototype.current=rl.prototype.current;rl.prototype.currentPosition=rl.prototype.pj;rl.prototype.setReverse=rl.prototype.Ed;function tl(){ql.call(this,[]);this.h=[]}pa(tl,ql);p=tl.prototype;p.clone=function(){var a=new tl;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){for(var a=u(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]}; | |
p.Xb=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.Xb(a)};p.find=function(a){for(var b=this.i,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};p.get=function(a){for(var b=this.i,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};p.offset=function(){};p.Ze=function(){}; | |
p.bb=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.bb(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};p.$d=function(){};p.ld=function(){};p.zf=function(){};S("shaka.media.MetaSegmentIndex",tl);tl.prototype.updateEvery=tl.prototype.zf;tl.prototype.fit=tl.prototype.ld;tl.prototype.mergeAndEvict=tl.prototype.$d;tl.prototype.evict=tl.prototype.bb;tl.prototype.merge=tl.prototype.Ze;tl.prototype.offset=tl.prototype.offset; | |
tl.prototype.get=tl.prototype.get;tl.prototype.find=tl.prototype.find;tl.prototype.forEachTopLevelReference=tl.prototype.Xb;tl.prototype.release=tl.prototype.release;function ul(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Ne();this.h=new ac(function(){b.g.ni(.25*b.i)})}ul.prototype.release=function(){this.set(this.Mc());this.h&&(this.h.stop(),this.h=null);this.g=null};ul.prototype.set=function(a){this.i=a;vl(this)};ul.prototype.Mc=function(){return this.g.Mc()};function vl(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Ne()!=b&&a.g.kh(b);return}catch(c){}a.h.xa(.25);0!=a.g.Ne()&&a.g.kh(0)};function wl(a){var b=this;this.h=a;this.g=new Set;this.i=(new ac(function(){xl(b,!1)})).xa(.25)}wl.prototype.release=function(){this.i.stop();for(var a=u(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function xl(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function yl(a){kb.call(this);this.g=new Map;this.h=a}pa(yl,kb);yl.prototype.release=function(){this.g.clear();kb.prototype.release.call(this)};function zl(a,b){var c=a.g.get(b);c||(c={ge:[],dg:null,contentType:b},a.g.set(b,c));return c}function Al(a,b,c){var d=zl(a,b.contentType);Bl(a,d);a={ud:b,position:c};d=d.ge;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)} | |
yl.prototype.j=function(a){for(var b=u(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.dg;a:{var e=c.ge;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.ud;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width); | |
g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Td(d.roles,e.roles);(g||h||d)&&Cl(this,a,e.contentType)&&(c.dg=e,d=new T("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Cl(this,a,e.contentType)&&(c.dg=e,JSON.stringify(e),c=new T("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}}; | |
function Cl(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function Bl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.ge;b.ge=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.ge=[]} | |
function Dl(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language= | |
a.language);return b};function El(a){kb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new ac(function(){for(var c=b.i(),d=u(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new T("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).xa(2)}pa(El,kb);El.prototype.release=function(){this.g.clear();this.h.stop();kb.prototype.release.call(this)};function Fl(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.s=d}function Gl(a,b){a.l=b;a=u(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b} | |
function Hl(a,b,c){c=void 0===c?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.g||(a.g=a.i.segmentIndex.ec(b,!0,a.s));if(!a.g)return Promise.resolve();c&&a.g.next();for(b=[];a.h.size<a.m;){c=a.g.next().value;if(!c)break;var d=!0;c.isPreload()&&null!=c.Na&&(d=!1);2==c.xc()&&(d=!1);c.hc()&&(d=!1);d&&c.qa&&b.push(Il(a,c.qa));d&&!a.h.has(c)&&(d=new Jl(a.l),b.push(Kl(d,c,a.i)),a.h.set(c,d))}Ll(a);return Promise.all(b)} | |
function Il(a,b){if(!a.i.segmentIndex||b.hc()||Array.from(a.j.keys()).some(function(e){return Yi(e,b)}))return Promise.resolve();var c=new Jl(a.l),d=Kl(c,b,a.i);a.j.set(b,c);return d}function Ml(a,b){b=u(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Nl(a,c)}function Ol(a){Ml(a,a.h);Ml(a,a.j);a.g=null}Fl.prototype.bb=function(a,b){b=void 0===b?!1:b;for(var c=u(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Nl(this,d);b&&Ll(this)}; | |
Fl.prototype.Ed=function(a){this.s=a;this.g&&this.g.Ed(a)};function Ll(a){for(var b=Array.from(a.h.keys()),c=u(a.j.keys()),d=c.next(),e={};!d.done;e={Hg:void 0},d=c.next())e.Hg=d.value,b.some(function(f){return function(g){return Yi(g.qa,f.Hg)}}(e))||Nl(a,e.Hg)}function Pl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&Nl(a,d)}Ll(a)}function Ql(a,b){b&&b!==a.i&&(Ol(a),a.i=b)}function Nl(a,b){var c=a.h;b instanceof Xi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()} | |
function Jl(a){this.g=a;this.ce=this.oh=null}function Kl(a,b,c){var d=new Uint8Array(0);a.ce=a.g(b,c,function(e){return P(function(f){if(1==f.g)return 0<d.byteLength?d=Pc(d,e):d=e,a.oh?G(f,a.oh(d),3):f.A(0);d=new Uint8Array(0);H(f)})});return a.ce.promise.catch(function(e){return e instanceof U&&7001==e.code?Promise.resolve():Promise.reject(e)})}Jl.prototype.abort=function(){this.ce&&this.ce.abort()};function Rl(a){var b=Kf(a),c=b.split("/")[0];a=Lf(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,oe:null,colorGamut:null,frameRate:null}} | |
function Sl(a,b,c){function d(D){z=D.name;var I=D.reader;I.skip(24);var F=I.Ba(),L=I.Ba();I.skip(50);q=String(F);n=String(L);D.reader.Ha()&&Eh(D)}function e(D){var I=xj(D.reader);r=I.channelCount;t=I.sampleRate;f(D.name)}function f(D){D=D.toLowerCase();switch(D){case "avc1":case "avc3":h.push(D+".42E01E");l=!0;break;case "hev1":case "hvc1":h.push(D+".1.6.L93.90");l=!0;break;case "dvh1":case "dvhe":h.push(D+".05.04");l=!0;break;case "vp09":h.push(D+".00.10.08");l=!0;break;case "av01":h.push(D+".0.01M.08"); | |
l=!0;break;case "mp4a":g.push("mp4a.40.2");k=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(D),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,q=null,r=null,t=null,w=null,v=null,z;(new zh).box("moov",Eh).box("trak",Eh).box("mdia",Eh).X("mdhd",function(D){m=vj(D.reader,D.version).language}).box("minf",Eh).box("stbl",Eh).X("stsd",Gh).box("mp4a",function(D){var I=xj(D.reader);r=I.channelCount;t=I.sampleRate;D.reader.Ha()?Eh(D):f(D.name)}).box("esds",function(D){D=D.reader;for(var I= | |
"mp4a",F,L;D.Ha();){F=D.$();for(var J=D.$();J&128;)J=D.$();if(3==F)D.Ba(),J=D.$(),J&128&&D.Ba(),J&64&&D.skip(D.$()),J&32&&D.Ba();else if(4==F)L=D.$(),D.skip(12);else if(5==F)break}L&&(I+="."+Aj(L),5==F&&D.Ha()&&(F=D.$(),L=(F&248)>>3,31===L&&D.Ha()&&(L=32+((F&7)<<3)+((D.$()&224)>>5)),I+="."+L));g.push(I);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("avc1",d).box("avc3",d).box("hev1",d).box("hvc1",d).box("dva1",d).box("dvav",d).box("dvh1",d).box("dvhe",d).box("vp09", | |
d).box("av01",d).box("avcC",function(D){var I=z||"";switch(z){case "dvav":I="avc3";break;case "dva1":I="avc1"}D=D.reader;D.skip(1);D=I+"."+Aj(D.$())+Aj(D.$())+Aj(D.$());h.push(D);l=!0}).box("hvcC",function(D){var I=z||"";switch(z){case "dvh1":I="hvc1";break;case "dvhe":I="hev1"}var F=D.reader;F.skip(1);D=F.$();var L=["","A","B","C"][D>>6],J=D&31,K=F.V(),O=(D&32)>>5?"H":"L";D=[F.$(),F.$(),F.$(),F.$(),F.$(),F.$()];F=F.$();for(var M=0,N=0;32>N;N++){M|=K&1;if(31==N)break;M<<=1;K>>=1}I=I+("."+L+J)+("."+ | |
Aj(M,!0));I+="."+O+F;L="";for(J=D.length;J--;)if((O=D[J])||L)L="."+O.toString(16).toUpperCase()+L;I+=L;h.push(I);l=!0}).box("dvcC",function(D){var I=z||"";switch(z){case "hvc1":I="dvh1";break;case "hev1":I="dvhe";break;case "avc1":I="dva1";break;case "avc3":I="dvav";break;case "av01":I="dav1"}var F=D.reader;F.skip(2);D=F.$();F=F.$();h.push(I+"."+Bj(D>>1&127)+"."+Bj(D<<5&32|F>>3&31));l=!0}).box("dvvC",function(D){var I=z||"";switch(z){case "hvc1":I="dvh1";break;case "hev1":I="dvhe";break;case "avc1":I= | |
"dva1";break;case "avc3":I="dvav";break;case "av01":I="dav1"}var F=D.reader;F.skip(2);D=F.$();F=F.$();h.push(I+"."+Bj(D>>1&127)+"."+Bj(D<<5&32|F>>3&31));l=!0}).X("vpcC",function(D){var I=z||"",F=D.reader;D=F.$();var L=F.$();F=F.$()>>4&15;h.push(I+"."+Bj(D)+"."+Bj(L)+"."+Bj(F));l=!0}).box("av1C",function(D){var I=z||"";switch(z){case "dav1":I="av01"}var F=D.reader;F.skip(1);D=F.$();F=F.$();var L=D>>>5,J=(F&64)>>6;h.push(I+"."+L+"."+Bj(D&31)+(F>>>7?"H":"M")+"."+Bj(2===L&&J?(F&32)>>5?12:10:J?10:8)+"."+ | |
((F&16)>>4)+"."+((F&8)>>3)+((F&4)>>2)+(F&3)+"."+Bj(1)+"."+Bj(1)+"."+Bj(1)+".0");l=!0}).box("enca",Ih).box("encv",Hh).box("sinf",Eh).box("frma",function(D){D=yj(D.reader).codec;f(D)}).box("colr",function(D){h=h.map(function(L){if(L.startsWith("av01.")){var J=D.reader,K=J.Pa(),O=J.Ub(4);var M=String.fromCharCode(O[0]);M+=String.fromCharCode(O[1]);M+=String.fromCharCode(O[2]);M+=String.fromCharCode(O[3]);if("nclx"===M){O=J.Ba();M=J.Ba();var N=J.Ba(),R=J.$()>>7,Q=L.split(".");10==Q.length&&(Q[6]=Bj(O), | |
Q[7]=Bj(M),Q[8]=Bj(N),Q[9]=String(R),L=Q.join("."))}J.seek(K)}return L});var I=zj(D.reader),F=I.colorGamut;w=I.oe;v=F}).parse(a||b,!0);if(!g.length&&!h.length)return null;var y=k&&!l,A=new Map;if(l&&!c){c=new Kd("video/mp4");a&&c.init(a);try{c.i(b);for(var E=u(c.j()),C=E.next();!C.done;C=E.next()){var B=C.value;A.set(B,B)}}catch(D){}c.g()}return{type:y?"audio":"video",mimeType:y?"audio/mp4":"video/mp4",codecs:Tl(g.concat(h)).join(", "),language:m,height:n,width:q,channelCount:r,sampleRate:t,closedCaptions:A, | |
oe:w,colorGamut:v,frameRate:null}}function Tl(a){var b=new Set,c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Jf(d);b.has(e)||(c.push(d),b.add(e))}b=Xc("audio",c);d=Xc("video",c);a=Xc(Wc,c);d=Ul(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b} | |
function Ul(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?zd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a} | |
function Vl(a){var b=null;(new zh).box("moov",Eh).box("trak",Eh).box("mdia",Eh).box("minf",Eh).box("stbl",Eh).X("stsd",Gh).box("encv",Hh).box("enca",Ih).box("sinf",Eh).box("schi",Eh).X("tenc",function(c){c=c.reader;c.$();c.$();c.$();c.$();b=Oc(c.Ub(16))}).parse(a,!0);return b} | |
function Wl(a,b,c){var d,e,f,g,h;return P(function(k){if(1==k.g)return d=b,d.cryptoKey?k.A(2):G(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Mb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function Xl(a,b,c,d,e){a=kh(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Yl(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.J=new Map;this.G=1;this.u=this.j=null;this.L=0;this.i=new Map;this.I=!1;this.M=null;this.C=!1;this.m=new sh(function(){return Zl(c)});this.O=Date.now()/1E3;this.s=new Map;this.K={projection:null,hfov:null};this.R=0;this.P=Infinity;this.H=null;this.B=new ac(function(){if(c.l&&c.g)if(c.l.presentationTimeline.T()){var d=c.l.presentationTimeline.fc(),e=c.l.presentationTimeline.Mb();1<e-d?Ek(c.g.ma,d,e):Fk(c.g.ma)}else Fk(c.g.ma),c.B&&c.B.stop()})} | |
p=Yl.prototype;p.destroy=function(){return this.m.destroy()};function Zl(a){var b,c,d,e,f,g,h;return P(function(k){if(1==k.g){b=[];c=u(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,$l(e),b.push(am(e)),e.ha&&(Ol(e.ha),e.ha=null);f=u(a.s.values());for(g=f.next();!g.done;g=f.next())h=g.value,Ol(h);return G(k,Promise.all(b),2)}a.i.clear();a.s.clear();a.g=null;a.l=null;a.h=null;a.B&&a.B.stop();a.B=null;H(k)})} | |
p.configure=function(a){this.h=a;this.M=new Tg({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.ha&&(Ol(b.ha),b.ha=null);b=u(this.s.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Ol(this.s.get(c)),this.s.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Wc))&& | |
b.ha&&(Ol(b.ha),b.ha=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.ha&&(Ol(b.ha),b.ha=null);b=u(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.ha?(Pl(c.ha,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(Ol(c.ha),c.ha=null)):0<a.segmentPrefetchLimit&&(c.ha=bm(this,c.stream));a.disableAudioPrefetch||cm(this)};function dm(a,b,c){a.l.presentationTimeline.T()||(a.R=b,a.P=c)} | |
p.start=function(a){var b=this;return P(function(c){if(1==c.g)return G(c,em(b,a||new Map),2);th(b.m);b.I=!0;H(c)})};function fm(a,b){var c,d,e,f,g,h,k;P(function(l){switch(l.g){case 1:return c=Yc,a.L++,d=a.L,ta(l,2),G(l,zk(a.g.ma,c.Oa),4);case 4:wa(l,3);break;case 2:if(e=ya(l),a.g)a.g.onError(e);case 3:f=Af(b.mimeType,b.codecs),ik(a.g.ma,f,a.l.sequenceMode,b.external),g=a.g.ma.ea,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.L==d&&(k=gm(a,b),a.i.set(c.Oa,k),hm(a,k,0)),H(l)}})} | |
function im(a){var b=a.i.get(Wc);b&&($l(b),am(b).catch(function(){}),a.H=a.i.get(Wc),a.i.delete(Wc));a.u=null}function jm(a,b){for(var c=0>a.g.Xa(),d=u(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.wa&&e.wa.Ed(c),e.ha&&e.ha.Ed(c);d=u(a.s.values());for(e=d.next();!e.done;e=d.next())e.value.Ed(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Bc&&(km(a,b,!1,0,!1),c.Bc=d);else if(b=c.Bc)c.Bc=null,km(a,b,!0,0,!1)} | |
function lm(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.I&&(b.video&&km(a,b.video,c,d,e,f),b.audio&&km(a,b.audio,c,d,e,f))}function mm(a,b){P(function(c){if(1==c.g)return a.H=null,a.u=b,a.I?b.segmentIndex?c.A(2):G(c,b.createSegmentIndex(),2):c.return();km(a,b,!0,0,!1);H(c)})}function nm(a,b){for(var c=u(a.J.entries()),d=c.next();!d.done;d=c.next()){var e=u(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.J.delete(d))}} | |
function km(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Wc?g&&(g.Bc&&(b.trickModeVideo?(g.Bc=b,b=b.trickModeVideo):g.Bc=null),g.stream!=b||e)&&(a.s.has(b)?g.ha=a.s.get(b):g.ha&&Ql(g.ha,b),b.type==Wc&&(e=Af(b.mimeType,b.codecs),ik(a.g.ma,e,a.l.sequenceMode,b.external)),!a.s.has(g.stream)&&g.stream.closeSegmentIndex&&(g.$a?(e="("+g.type+":"+g.stream.id+")",a.J.has(e)||a.J.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,g.stream= | |
b,g.wa=null,g.Ch=!!f,e?om(a,!0,!1):(c?g.Kd?g.Gf=!0:g.$a?(g.Hc=!0,g.Ee=d,g.Gf=!0):($l(g),pm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.$a||g.Ab||hm(a,g,0),qm(a,g).catch(function(h){if(a.g)a.g.onError(h)}))):fm(a,b)} | |
function qm(a,b){var c,d;return P(function(e){if(1==e.g){if(!b.Gb)return e.return();c=b.stream;d=b.Gb;return c.segmentIndex?e.A(2):G(e,c.createSegmentIndex(),2)}if(b.Gb!=d||b.stream!=c)return e.return();var f=a.g.Qd();var g=ok(a.g.ma,b.type),h=b.stream.segmentIndex.find(b.pb?b.pb.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Na?k.Na-k.eb:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.qa)&&(h+=(k.Na?k.Na-k.eb:null)||0),k=a.g.getBandwidthEstimate(), | |
f=8*h/k<(g||0)-f-a.h.rebufferingGoal||b.Gb.h.g>h?!0:!1):f=!1;f&&b.Gb.abort();H(e)})} | |
p.Cd=function(){if(this.g)for(var a=this.g.Qd(),b=u(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.ma;d==Wc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=nk(e,d),e=ej(e,a));if(!e){c.ha&&(c.ha.g=null);if("audio"===c.type){e=u(this.s.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.wa=null;(null!=ok(this.g.ma,d)||c.$a)&&rm(this,c);c.Gb&&(c.Gb.abort(),c.Gb=null);d===Wc&&(d=this.g.ma,d.L&&d.L.g());c.Cd=!0}}}; | |
function rm(a,b){b.Kd||b.Hc||(b.$a?(b.Hc=!0,b.Ee=0):null==mk(a.g.ma,b.type)?null==b.Ab&&hm(a,b,0):($l(b),pm(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))} | |
function em(a,b){var c,d,e,f,g,h,k,l,m,n;return P(function(q){if(1==q.g){c=Yc;if(!a.j)throw new U(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.ba,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.Ca,a.j.video),e.add(a.j.video));a.u&&(d.set(c.Oa,a.u),e.add(a.u));f=a.g.ma;return G(q,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}th(a.m);a.updateDuration();g=u(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=gm(a,l),b.has(l.id)&&(n= | |
b.get(l.id),Gl(n,function(r,t,w){return sm(r,t,w||null,a.h.retryParameters,a.g.nc)}),m.ha=n),a.i.set(k,m),hm(a,m,0));H(q)})}function gm(a,b){return{stream:b,type:b.type,wa:null,ha:bm(a,b),pb:null,sd:null,We:null,Vc:null,Uc:null,Bc:null,endOfStream:!1,$a:!1,Ab:null,Hc:!1,Ee:0,Gf:!1,Kd:!1,Cd:!0,Xg:!1,Td:!1,Gb:null}} | |
function bm(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Wc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Wc&&a.h.disableTextPrefetch)return null;if(a.s.has(b))return a.s.get(b);var c=a.i.get(b.type);return(c=c&&c.ha)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new Fl(a.h.segmentPrefetchLimit,b,function(d,e,f){return sm(d,e,f||null,a.h.retryParameters,a.g.nc)},0>a.g.Xa()):null} | |
function cm(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=u(a.l.variants),e=d.next(),f={};!e.done;f={Jb:void 0},e=d.next())if(f.Jb=e.value,f.Jb.audio)if(a.s.has(f.Jb.audio)){if(e=a.s.get(f.Jb.audio),Pl(e,b),!(0<b&&c.some(function(h){return function(k){return bd(h.Jb.audio.language,k)}}(f)))){var g=a.i.get(f.Jb.audio.type);e!==(g&&g.ha)&&Ol(e);a.s.delete(f.Jb.audio)}}else 0>=b||!c.some(function(h){return function(k){return bd(h.Jb.audio.language,k)}}(f))||!(e=bm(a,f.Jb.audio))|| | |
(f.Jb.audio.segmentIndex||f.Jb.audio.createSegmentIndex(),a.s.set(f.Jb.audio,e))}p.updateDuration=function(){var a=(a=window.ManagedMediaSource||window.MediaSource)&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1;var b=this.l.presentationTimeline.getDuration();Infinity>b?(a&&(this.B&&this.B.stop(),Fk(this.g.ma)),this.g.ma.sb(b)):a?(this.B&&this.B.xa(.5),this.g.ma.sb(Infinity)):this.g.ma.sb(Math.pow(2,32))}; | |
function tm(a,b){var c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:th(a.m);if(b.$a||null==b.Ab||b.Kd)return k.return();b.Ab=null;if(!b.Hc){k.A(2);break}return G(k,pm(a,b,b.Gf,b.Ee),3);case 3:return k.return();case 2:nm(a,b);if(b.stream.segmentIndex){k.A(4);break}c=b.stream;ta(k,5);return G(k,b.stream.createSegmentIndex(),7);case 7:wa(k,6);break;case 5:return d=ya(k),G(k,um(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.$a||b.Ab|| | |
hm(a,b,0),k.return();case 4:ta(k,9);e=vm(a,b);null!=e&&(hm(a,b,e),b.Td=!1);wa(k,10);break;case 9:return f=ya(k),G(k,um(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.I||!g.every(function(l){return l.endOfStream})){k.A(0);break}return G(k,a.g.ma.endOfStream(),13);case 13:th(a.m),h=a.g.ma.getDuration(),0!=h&&h<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.sb(h),H(k)}})} | |
function vm(a,b){if(wm(b))return wk(a.g.ma,b.stream.originalId||""),null;b.type==Wc&&xk(a.g.ma);if(b.stream.isAudioMuxedInVideo)return null;if(!lk(a.g.ma)&&b.type!=Wc)return a.h.updateIntervalSeconds/2;var c=a.g.Qd();if("audio"===b.type)for(var d=u(a.s.keys()),e=d.next();!e.done;e=d.next())e=a.s.get(e.value),e.bb(c,!0),Hl(e,c);d=b.pb?b.pb.endTime:c;var f=pk(a.g.ma,b.type,c),g=Math.max(1,Math.max(a.h.rebufferingGoal,a.h.bufferingGoal)*a.G),h=a.l.presentationTimeline.getDuration()-d;e=ok(a.g.ma,b.type); | |
if(1E-6>h&&e)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(Wc))&&wm(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.wa;e=xm(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.Ch&&(f=!0,b.Ch=!1);g=Infinity;h=Array.from(a.i.values());h=u(h);for(var k=h.next();!k.done;k=h.next())k=k.value,wm(k)||k.wa&&!k.wa.current()||(g=Math.min(g,k.pb?k.pb.endTime:c));if(d>=g+a.l.presentationTimeline.h)return a.h.updateIntervalSeconds;b.ha&&b.wa&&!a.s.has(b.stream)&& | |
(b.ha.bb(e.startTime),Hl(b.ha,e.startTime));ym(a,b,c,e,f).catch(function(){});return null} | |
function xm(a,b,c,d){if(b.wa)return b.wa.current();if(b.pb||d)return c=b.pb?b.pb.endTime:d,a=0>a.g.Xa(),b.stream.segmentIndex&&(b.wa=b.stream.segmentIndex.ec(c,!1,a)),b.wa&&b.wa.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Xa();var f=null;d&&(b.stream.segmentIndex&&(b.wa=b.stream.segmentIndex.ec(e,!1,a)),f=b.wa&&b.wa.next().value);f||(b.stream.segmentIndex&&(b.wa=b.stream.segmentIndex.ec(c,!1,a)),f=b.wa&&b.wa.next().value);return f} | |
function ym(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C;return P(function(B){switch(B.g){case 1:f=Yc;g=b.stream;h=b.wa;b.$a=!0;ta(B,2);if(2==d.xc())throw new U(1,1,1011);return G(B,zm(a,b,d,e),4);case 4:th(a.m);if(a.C)return B.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.l.isLowLatency)&&l&&k&&("HLS"!=a.l.type||d.m))return r=new Uint8Array(0),w=t=!1,z=function(D){var I,F,L,J;return P(function(K){switch(K.g){case 1:if(t)return K.return(); | |
w=!0;th(a.m);if(a.C)return K.return();ta(K,2);r=Am(r,D);I=!1;F=0;(new zh).box("mdat",function(O){F=O.size+O.start;I=!0}).parse(r,!1,!0);if(!I){K.A(4);break}L=r.subarray(0,F);r=r.subarray(F);return G(K,Bm(a,b,c,g,d,L,!0,e),5);case 5:b.ha&&b.wa&&Hl(b.ha,d.startTime,!0);case 4:wa(K,0);break;case 2:v=J=ya(K),H(K)}})},G(B,Cm(a,b,d,z),9);n=Cm(a,b,d);return G(B,n,7);case 7:q=B.h;th(a.m);if(a.C)return B.return();th(a.m);return b.Hc?(b.$a=!1,hm(a,b,0),B.return()):G(B,Bm(a,b,c,g,d,q,!1,e),6);case 9:y=B.h;if(v)throw v; | |
if(w){B.A(10);break}t=!0;th(a.m);return a.C?B.return():b.Hc?(b.$a=!1,hm(a,b,0),B.return()):G(B,Bm(a,b,c,g,d,y,!1,e),10);case 10:b.ha&&b.wa&&Hl(b.ha,d.startTime,!0);case 6:th(a.m);if(a.C)return B.return();b.pb=d;h.next();b.$a=!1;b.Xg=!1;A=a.g.ma.Yb();E=A[b.type];gb(JSON.stringify(E));b.Hc||a.g.Rg(d,b.stream);hm(a,b,0);wa(B,0);break;case 2:C=ya(B);th(a.m,C);if(a.C)return B.return();b.$a=!1;if(7001==C.code)b.$a=!1,$l(b),hm(a,b,0),B.A(0);else if(b.type==f.Oa&&a.h.ignoreTextStreamFailures)a.i.delete(f.Oa), | |
B.A(0);else{if(3017==C.code)return G(B,Dm(a,b,C),0);b.Td=!0;1==C.category&&b.ha&&Nl(b.ha,d);C.severity=2;return G(B,um(a,b,C),0)}}})}function Am(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c} | |
function Dm(a,b,c){var d,e,f,g,h,k;return P(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.Xg}))return l.A(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();h=Math.round(100*a.G);if(20<h)a.G-=.2;else if(4<h)a.G-=.04;else return b.Td=!0,a.C=!0,a.g.onError(c),l.return();b.Xg=!0;k=a.g.Qd();return G(l,Em(a,b,k),2)}hm(a,b,4);H(l)})} | |
function zm(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A;return P(function(E){switch(E.g){case 1:e=Yc;f=null==b.pb;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.R)-.1);k=Math.min(c.appendWindowEnd,a.P)+.01;l=c.codecs||b.stream.codecs;m=Jf(l);n=Kf(c.mimeType||b.stream.mimeType);q=c.timestampOffset;if(q==b.We&&h==b.Vc&&k==b.Uc&&m==b.Kg&&n==b.Lg){E.A(2);break}r=b.Kg&&b.Lg&&Mk(a.g.ma,b.type,n,l);if(!r){E.A(3);break}t=null;b.type===e.Ca?t=a.i.get(e.ba):b.type===e.ba&&(t=a.i.get(e.Ca));if(!t){E.A(3); | |
break}return G(E,am(t).catch(function(){}),5);case 5:t.sd=null,t.Vc=null,t.Uc=null,rm(a,t);case 3:return G(E,Fm(a,b,q,h,k,c,m,n),2);case 2:return Yi(c.qa,b.sd)||(b.sd=c.qa,c.l&&c.qa&&(w=Cm(a,b,c.qa),v=function(){var C,B,D,I,F,L,J;return P(function(K){switch(K.g){case 1:return ta(K,2),G(K,w,4);case 4:return C=K.h,th(a.m),B=null,D=new Map,I={projection:null,hfov:null},F=new zh,F.box("moov",Eh).box("trak",Eh).box("mdia",Eh).X("mdhd",function(O){B=vj(O.reader,O.version).timescale}).box("hdlr",function(O){O= | |
O.reader;O.skip(8);switch(O.Xc()){case "soun":D.set(e.ba,B);break;case "vide":D.set(e.Ca,B)}B=null}).box("minf",Eh).box("stbl",Eh).X("stsd",Gh).box("encv",Hh).box("avc1",Hh).box("avc3",Hh).box("hev1",Hh).box("hvc1",Hh).box("dvav",Hh).box("dva1",Hh).box("dvh1",Hh).box("dvhe",Hh).box("dvc1",Hh).box("dvi1",Hh).box("vexu",Eh).box("proj",Eh).X("prji",function(O){O=O.reader.Xc();I.projection=O}).box("hfov",function(O){O=O.reader.V()/1E3;I.hfov=O}).parse(C),Gm(a,I),D.has(b.type)?c.qa.timescale=D.get(b.type): | |
null!=B&&(c.qa.timescale=B),L=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,G(K,a.g.Hh(b.type,C),5);case 5:return G(K,rk(a.g.ma,b.type,C,null,b.stream,L,b.Cd,d),6);case 6:wa(K,0);break;case 2:throw J=ya(K),b.sd=null,J;}})},z=c.startTime,f&&(y=ok(a.g.ma,b.type),null!=y&&(z=y)),a.g.Ck(z,c.qa),g.push(v()))),A=b.pb?b.pb.i:null,c.i!=A&&g.push(Ck(a.g.ma,b.type,c.startTime)),G(E,Promise.all(g),0)}})} | |
function Fm(a,b,c,d,e,f,g,h){var k,l,m,n;return P(function(q){if(1==q.g)return k=Yc,l=new Map,a.j.audio&&l.set(k.ba,a.j.audio),a.j.video&&l.set(k.Ca,a.j.video),ta(q,2),b.Vc=d,b.Uc=e,g&&(b.Kg=g),h&&(b.Lg=h),b.We=c,m=a.l.sequenceMode||"HLS"==a.l.type,G(q,Ak(a.g.ma,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=q.g)return wa(q,0);n=ya(q);b.Vc=null;b.Uc=null;b.Kg=null;b.Lg=null;b.We=null;throw n;})} | |
function Bm(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,q,r;return P(function(t){switch(t.g){case 1:return k=d.closedCaptions&&0<d.closedCaptions.size,a.h.shouldFixTimestampOffset&&(m="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType,n=null,e.qa&&(n=e.qa.timescale),(q=m&&n&&"video"===d.type&&"DASH"==a.l.type)&&(l=new zh),q&&l.box("moof",Eh).box("traf",Eh).X("tfdt",function(w){var v,z,y,A,E,C;return P(function(B){v=uj(w.reader,w.version);z=v.baseMediaDecodeTime;if(!z)return B.return(); | |
y=-z/n;A=Number(b.We)||0;if(!(A<y))return B.A(0);E=b.Vc;C=b.Uc;return G(B,Fm(a,b,y,E,C,e),0)})}),q&&l.parse(f,!1,g)),G(t,Em(a,b,c),2);case 2:return th(a.m),r=b.Cd,b.Cd=!1,G(t,a.g.Hh(b.type,f),3);case 3:return G(t,rk(a.g.ma,b.type,f,e,d,k,r,h,g),4);case 4:th(a.m),H(t)}})} | |
function Em(a,b,c){var d,e,f,g,h;return P(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof tl&&d.bb(a.l.presentationTimeline.Eb());e=Math.max(a.h.bufferBehind*a.G,a.l.presentationTimeline.h);f=mk(a.g.ma,b.type);if(null==f)return a.H==b&&(a.H=null),k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():G(k,a.g.ma.remove(b.type,f,f+h),2)}if(4!=k.g)return th(a.m),a.H?G(k,Em(a,a.H,c),4):k.A(0);th(a.m);H(k)})} | |
function wm(a){return a&&a.type==Wc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)} | |
function Cm(a,b,c,d){var e,f,g,h,k;return P(function(l){switch(l.g){case 1:if(e=c.hc())return l.return(e);f=null;if(b.ha){var m=b.ha,n=m.h;c instanceof Xi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.oh=d),f=m.ce):f=null}f||(f=sm(c,b.stream,d||null,a.h.retryParameters,a.g.nc));g=0;b.wa&&(g=b.wa.h);b.Gb=f;return G(l,f.promise,2);case 2:h=l.h;b.Gb=null;k=h.data;if(!c.aesKey){l.A(3);break}return G(l,Wl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})} | |
function sm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof Zi?a:void 0,h=g?1:0;a=Xl(a.S(),a.eb,a.Na,d,c);a.contentType=b.type;return e.request(qh,a,{type:h,stream:b,segment:g,isPreload:f})} | |
function pm(a,b,c,d){var e,f;return P(function(g){if(1==g.g)return b.Hc=!1,b.Gf=!1,b.Ee=0,b.Kd=!0,b.pb=null,b.wa=null,b.ha&&!a.s.has(b.stream)&&Ol(b.ha),d?(e=a.g.Qd(),f=a.g.ma.getDuration(),G(g,a.g.ma.remove(b.type,e+d,f),3)):G(g,zk(a.g.ma,b.type),4);if(3!=g.g)return th(a.m),c?G(g,a.g.ma.flush(b.type),3):g.A(3);th(a.m);b.Kd=!1;b.endOfStream=!1;b.$a||b.Ab||hm(a,b,0);H(g)})} | |
function hm(a,b,c){var d=b.type;if(d!=Wc||a.i.has(d))b.Ab=(new Zb(function(){var e;return P(function(f){if(1==f.g)return ta(f,2),G(f,tm(a,b),4);if(2!=f.g)return wa(f,0);e=ya(f);if(a.g)a.g.onError(e);H(f)})})).Y(c)}function $l(a){null!=a.Ab&&(a.Ab.stop(),a.Ab=null)}function am(a){return P(function(b){return a.Gb?G(b,a.Gb.abort(),0):b.A(0)})} | |
function um(a,b,c){var d;return P(function(e){if(1==e.g)return G(e,Vg(a.M),2);th(a.m);if(1===c.category&&1003!=c.code){if(b.Bc)return jm(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})} | |
function om(a,b,c){b=void 0===b?!1:b;c=void 0===c?!0:c;var d,e,f,g,h,k;return P(function(l){if(1==l.g){d=Date.now()/1E3;e=a.h.minTimeBetweenRecoveries;if(!b){if(!a.h.allowMediaSourceRecoveries||d-a.O<e)return l.return(!1);a.O=d}f=Yc;if(g=a.i.get(f.ba))g.sd=null,g.Vc=null,g.Uc=null,c&&rm(a,g),am(g).catch(function(){}),g.wa&&g.wa.Zg();if(h=a.i.get(f.Ca))h.sd=null,h.Vc=null,h.Uc=null,c&&rm(a,h),am(h).catch(function(){}),h.wa&&h.wa.Zg();k=new Map;a.j.audio&&k.set(f.ba,a.j.audio);a.j.video&&k.set(f.Ca, | |
a.j.video);return G(l,Kk(a.g.ma,k),2)}!h||h.$a||h.Ab||hm(a,h,0);!g||g.$a||g.Ab||hm(a,g,0);return l.return(!0)})}function Gm(a,b){if(a.K.projection!=b.projection||a.K.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new T("spatialvideoinfo",c)}else c=new T("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.K=b}};function Hm(){} | |
function Im(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=be(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=be(n)),m=Im(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(bb("Invalid config, wrong type for "+m), | |
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&cb("Unexpected number of arguments for "+m),a[l]=b[l]):(bb("Invalid config, unrecognized key "+m),k=!1)}return k}function Jm(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Km(a,b){return a&&b} | |
function Lm(a,b){function c(g){for(var h=u(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&(c(g[k]),0===Object.keys(g[k]).length&&delete g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0<Object.keys(m).length||!f(m))k[l]=m}else e(m)&&e(h[l])||Number.isNaN(m)&&Number.isNaN(h[l])||m!==h[l]&&(k[l]= | |
m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Hm);Hm.getDifferenceFromConfigObjects=Lm;Hm.convertToConfigObject=Jm;Hm.mergeConfigObjects=Im;function Mm(){this.g=null}Mm.prototype.configure=function(a){this.g=a}; | |
Mm.prototype.create=function(a){var b=[];b=Nm(a,this.g.language);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Om(b,this.g.role);a.length&&(b=a);this.g.videoLayout&&(a=Pm(b,this.g.videoLayout),a.length&&(b=a));this.g.pd&&(a=Qm(b,this.g.pd),a.length&&(b=a));this.g.channelCount&&(a=Rm(b,this.g.channelCount),a.length&&(b=a));this.g.ed&&(a=Sm(b,this.g.ed),a.length&&(b=a));this.g.Hd&&(a=Tm(b,this.g.Hd),a.length&&(b=a));a=Um(b,this.g.spatialAudio);a.length&&(b=a);this.g.audioCodec&& | |
(a=Vm(b,this.g.audioCodec),a.length&&(b=a));return new Ai(b[0],b,!("smooth"==this.g.codecSwitchingStrategy&&Bd()))};function Nm(a,b){b=cd(b);var c=kd(b,a.map(function(d){return jd(d)}));return c?a.filter(function(d){return c==jd(d)}):[]}function Om(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Sm(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})} | |
function Tm(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function Rm(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Qm(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?a.some(function(c){return c.video&&c.video.hdr&&"HLG"==c.video.hdr?!0:!1})?"HLG":"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})} | |
function Pm(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Um(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Vm(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Wm(){}function Xm(a){a=Ec(a);return(new sb(a)).Kb}function Ym(a,b,c){function d(h){Qb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Mb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new U(2,6,6015);var e;"string"==typeof b?e=Gc(b,!0):e=b;a=Ec(a);a=Gc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Zm(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split("skd://").pop();return Ym(a,c,b)} | |
function $m(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",Wm);Wm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Bc(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Nb(Mc(c)))}};Wm.expressplayFairPlayRequest=function(a,b){$m(a,b)}; | |
Wm.conaxFairPlayRequest=function(a,b){$m(a,b)};Wm.ezdrmFairPlayRequest=function(a,b){$m(a,b)};Wm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Mb(b.body),a=Lc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Fc("spc="+a))};Wm.expressplayInitDataTransform=function(a,b,c){return Zm(a,b,c)}; | |
Wm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Pb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Ym(a,d,b)};Wm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split(";").pop();return Ym(a,c,b)};Wm.verimatrixInitDataTransform=function(a,b,c){return Zm(a,b,c)};Wm.initDataTransform=Ym; | |
Wm.defaultGetContentId=Xm;Wm.isFairPlaySupported=function(){var a;return P(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ta(b,2),G(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);ya(b);return b.return(!1)})};function an(){} | |
function bn(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ug(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,q){yc()&&"skd"==n&&(n=q.serverCertificate,q=Xm(m),m=Ym(m,q,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:fc(),minHdcpVersion:"",ignoreDuplicateInitData:!gc("Tizen 2"), | |
defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"};(fc()||oc())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;!Bd()||hc()||oc()||pc()||jc()&&79===lc()||!(!kc()||kc()&&uc()||kc()&&gc("Fuchsia"))||tc()&&ec()||(c="smooth",d=!0);d={retryParameters:Ug(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1, | |
raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha", | |
"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:cn,manifestPreprocessorTXml:dn,sequenceMode:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1,enableFastSwitching:!0,ignoreSupplementalCodecs:!1},hls:{ignoreTextStreamFailures:!1, | |
ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:ic()||gc("Tizen 2")||jc()&&38===lc()||oc()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,updatePeriod:-1,allowLowLatencyByteRangeOptimization:!0,ignoreSupplementalCodecs:!1}, | |
mss:{manifestPreprocessor:cn,manifestPreprocessorTXml:dn,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Ug(),failureCallback:function(m){return Km([m])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:.01,gapJumpTimerTime:.25, | |
durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5, | |
maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:oc()||pc(),dontChooseCodecs:!1,shouldFixTimestampOffset:jc()||hc()};if(jc()||hc()||kc()||qc())e.stallSkip= | |
0;hc()&&(e.gapPadding=2);var f={trackSelectionCallback:function(m){return P(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return P(function(q){if(1==q.g)return navigator.storage&&navigator.storage.estimate?G(q,navigator.storage.estimate(),3):q.return(!0);n=q.h;return q.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return Km([m,n])},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8, | |
bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:mc()? | |
.5:0,preferNetworkInformationBandwidth:!1};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return Km([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return Km([m,n])},dispatchAllEmsgBoxes:!1};var g=!1,h=!1,k=!0;vc()&&(h=g=!0,k=!1);var l={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new Og},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(Mm,[null].concat(x(Ma.apply(0, | |
arguments)))))},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity, | |
minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g, | |
skipPlayDetection:h,supportsMultipleMediaElements:k,disableHLSInterstitial:!1,disableDASHInterstitial:!1},ignoreHardwareResolution:!1};f.trackSelectionCallback=function(m){return P(function(n){return n.return(en(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l} | |
function fn(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}} | |
function gn(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Im(a,b,c||bn(),d,"")} | |
function en(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?a.some(function(h){return h.hdr&&"HLG"==h.hdr?!0:!1})?"HLG":"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=kd(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return cd(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&& | |
480>=h.height});g.length&&(g.sort(function(h,k){return k.height-h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Wc&&"image"!=c.type||b.push(c);return b}function cn(a){return Km([a],a)}function dn(a){return Km([a],a)}S("shaka.util.PlayerConfiguration",an);an.mergeConfigObjects=gn;an.createDefaultForLL=fn; | |
an.createDefault=bn;function hn(){this.g=null;this.h=[]}function jn(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=u(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function kn(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=u(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function ln(){this.i=this.h=null;this.g=[]}function mn(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function nn(){this.Ic=this.ii=this.u=this.B=this.K=this.C=this.s=this.j=this.J=this.G=this.i=this.R=this.U=this.M=this.O=this.P=this.l=this.m=NaN;this.L=0;this.H=this.I=NaN;this.g=new hn;this.h=new ln};function on(a,b,c,d){kb.call(this);this.O=a;this.U=b;this.Ea=d.networkingEngine;this.C=c;this.s=null;this.Aa=0;this.Sa=d.hd;this.H=d.wk;this.Za=d.xk;this.g=d.config;this.j=this.I=this.h=null;this.ka=!1;this.J=d.Hk;this.ra=!1;this.l=null;this.aa=!1;this.i=this.G=null;this.Z=!1;this.M=new Map;this.sa=!1;this.Ga=d.Gk;this.W=new nn;this.ea=new Wg;this.m=new Wg;this.P=null;this.u=!1;this.La=d.jj;this.na=null;this.Ka=d.ij;this.R=!1;this.L=[];this.K=[];this.B=!0}pa(on,kb); | |
function pn(a,b,c){(a=b?a.K:a.L)?a.push(c):c()}function qn(a){if(a.K)for(var b=u(a.K),c=b.next();!c.done;c=b.next())c=c.value,c();a.K=null}function rn(a,b){a.P=b;a.R=!0;if(a.L){b=u(a.L);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.L=null}p=on.prototype;p.getStartTime=function(){return this.C};p.nd=function(){return this.O};p.yg=function(){return this.h};function sn(a){a.Z=!0;return a.i}function tn(a){a.ra=!0;return a.J}p.getStats=function(){return this.W}; | |
function un(a){a.aa=!0;return a.l}function vn(a){a.sa=!0;return a.M}p.start=function(){var a=this;(function(){var b;return P(function(c){switch(c.g){case 1:return G(c,Promise.resolve(),2);case 2:return ta(c,3),G(c,wn(a),5);case 5:return xn(a),G(c,yn(a),6);case 6:return xn(a),G(c,zn(a),7);case 7:return xn(a),G(c,vi(a.l),8);case 8:xn(a);a.m.resolve();wa(c,0);break;case 3:b=ya(c),b instanceof U&&(7001==b.code||7003==b.code)||a.m.reject(b),H(c)}})})()}; | |
p.dispatchEvent=function(a){return this.P?this.P.dispatchEvent(a):kb.prototype.dispatchEvent.call(this,a)};p.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function xn(a){if(a.u)throw new U(2,7,7003);}function An(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))} | |
function wn(a){var b,c,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:An(a,"manifest-parser");a.j||(a.I=Ri(a.O,a.U),a.j=a.I(),a.j.configure(a.g.manifest,function(){return a.B}));b=Date.now()/1E3;An(a,"manifest");if(a.h){m.A(2);break}return G(m,a.j.start(a.O,a.Za),3);case 3:a.h=m.h;if(1!=a.h.variants.length){m.A(2);break}c=[];d=a.h.variants[0];e=u([d.video,d.audio]);for(f=e.next();!f.done;f=e.next())(g=f.value)&&!g.segmentIndex&&c.push(g.createSegmentIndex());if(!(0<c.length)){m.A(2);break}return G(m, | |
Promise.all(c),2);case 2:return a.ea.resolve(),h=new T("manifestparsed",void 0),G(m,Promise.resolve(),7);case 7:a.dispatchEvent(h);if(0==a.h.variants.length)throw new U(2,4,4036);Bn(a.h);k=Date.now()/1E3;l=k-b;a.W.J=l;H(m)}})} | |
function yn(a){var b,c,d,e,f;return P(function(g){switch(g.g){case 1:An(a,"drm-engine");a.Aa=Date.now()/1E3;a.l=a.Sa();a.H.h=a.l;a.l.configure(a.g.drm,function(){return a.B});b=Mi(a.H,a.h);if(!b){g.A(2);break}c=new T("trackschanged",void 0);return G(g,Promise.resolve(),3);case 3:xn(a),a.dispatchEvent(c);case 2:return d=Kg(a.h.variants),G(g,Th(a.l,d,a.h.offlineSessionIds),4);case 4:return xn(a),G(g,Ki(a.H,a.h),5);case 5:e=g.h;if(!e){g.A(0);break}f=new T("trackschanged",void 0);return G(g,Promise.resolve(), | |
7);case 7:a.dispatchEvent(f),H(g)}})}p.configure=function(a,b){a=Jm(a,b);gn(this.g,a)};p.getConfiguration=function(){return be(this.g)}; | |
function zn(a){var b,c,d,e,f,g;return P(function(h){a.s||(a.s=a.g.adaptationSetCriteriaFactory(),a.s.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredVariantRole,channelCount:a.g.preferredAudioChannelCount,pd:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,ed:a.g.preferredAudioLabel,Hd:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:""}));a.Ka&&(b=a.g.abrFactory,a.G=b,a.i=b(),a.i.configure(a.g.abr)); | |
if(!a.La)return h.A(0);c=a.h.presentationTimeline.T();d=Kg(a.h.variants);e=a.s.create(d);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));f=a.i.chooseVariant();if(!f)return h.A(0);g=[];a.na=f;f.video&&g.push(Cn(a,f.video,c));f.audio&&g.push(Cn(a,f.audio,c));return G(h,Promise.all(g),0)})} | |
function Cn(a,b,c){var d,e,f,g,h;return P(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Fl(d,b,function(l,m,n){return sm(l,m,n||null,a.g.streaming.retryParameters,a.Ea,a.B)},!1),a.M.set(b.id,e),b.segmentIndex?k.A(2):G(k,b.createSegmentIndex(),2);f=a.C||0;(h=(g=b.segmentIndex.ec(f))?g.current():null)||(h=Dg(b.segmentIndex));return h?c?h.qa?G(k,Il(e,h.qa),0):k.A(0):G(k,Hl(e,h.startTime),0):k.A(0)})}p.rl=function(){return this.m}; | |
p.destroy=function(){var a=this,b,c,d;return P(function(e){switch(e.g){case 1:a.u=!0;if(!a.j||a.ka){e.A(2);break}return G(e,a.j.stop(),2);case 2:if(!a.i||a.Z){e.A(4);break}return G(e,a.i.stop(),4);case 4:a.J&&!a.ra&&a.J.release();if(!a.l||a.aa){e.A(6);break}return G(e,a.l.destroy(),6);case 6:if(0<a.M.size&&!a.sa)for(b=u(a.M.values()),c=b.next();!c.done;c=b.next())d=c.value,Ol(d);H(e)}})}; | |
function Bn(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",on);on.prototype.destroy=on.prototype.destroy;on.prototype.waitForFinish=on.prototype.rl;function Dn(a,b){kb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{dd:null,cd:En,Pc:function(d,e){return Fn(c,"enter",d,e)}},{dd:Gn,cd:En,Pc:function(d,e){return Fn(c,"enter",d,e)}},{dd:Hn,cd:En,Pc:function(d,e){return Fn(c,"enter",d,e)}},{dd:En,cd:Gn,Pc:function(d,e){return Fn(c,"exit",d,e)}},{dd:En,cd:Hn,Pc:function(d,e){return Fn(c,"exit",d,e)}},{dd:Gn,cd:Hn,Pc:function(d,e){return Fn(c,"skip",d,e)}},{dd:Hn,cd:Gn,Pc:function(d,e){return Fn(c,"skip",d,e)}}];this.h=new td;this.h.o(this.i, | |
"regionremove",function(d){c.g.delete(d.region)})}pa(Dn,kb);Dn.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;kb.prototype.release.call(this)};Dn.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=u(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Gn:a>d.endTime?Hn:En;this.g.set(d,f);for(var g=u(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.dd==e&&h.cd==f&&h.Pc(d,b)}}}; | |
function Fn(a,b,c,d){b=new T(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Gn=1,En=2,Hn=3;function In(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:var n=(new sb(a)).rb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Jn[d])return m.return(e);f=0;g=kh([a],c);ta(m,2);g.method="HEAD";return G(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];wa(m,3);break;case 2:k=ya(m);if(!k||1002!=k.code&&1001!=k.code){m.A(3);break}g.method="GET";return G(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e? | |
e.toLowerCase().split(";").shift():"")}})} | |
var Jn={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",mov:"video/quicktime",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc", | |
ssa:"text/x-ssa",ass:"text/x-ssa",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",html:"text/html",htm:"text/html"};function Kn(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Kn(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=kf,e=a.fontStyle==lf,f=a.textDecoration.includes(mf);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Ln(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Ln(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=u(h);h=k.next().value; | |
k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)} | |
function Ln(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red"; | |
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Mn(a,b){var c=[];a=u(Nn(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(Mn(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Kn(d,b);c.push(e)}return c} | |
function Nn(a){var b=[];a=u(a);for(var c=a.next(),d={};!c.done;d={$f:void 0},c=a.next())d.$f=c.value,b.some(function(e){return function(f){return af(e.$f,f)}}(d))||b.push(d.$f);return b} | |
function On(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&& | |
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c} | |
function Pn(a){if(Infinity===a.endTime||a.endTime<a.startTime)return null;var b=new Pe(a.startTime,a.endTime,a.text);b.line="number"===typeof a.line?a.line:null;a.lineAlign&&(b.lineAlign=a.lineAlign);b.lineInterpretation=a.snapToLines?Ue:1;b.position="number"===typeof a.position?a.position:null;a.positionAlign&&(b.positionAlign=a.positionAlign);b.size=a.size;b.textAlign=a.align;"lr"===a.vertical?b.writingMode="vertical-lr":"rl"===a.vertical&&(b.writingMode="vertical-rl");a.region&&(b.region.id=a.region.id, | |
b.region.height=a.region.lines,b.region.heightUnits=2,b.region.regionAnchorX=a.region.regionAnchorX,b.region.regionAnchorY=a.region.regionAnchorY,b.region.scroll=a.region.scroll,b.region.viewportAnchorX=a.region.viewportAnchorX,b.region.viewportAnchorY=a.region.viewportAnchorY,b.region.viewportAnchorUnits=Od,b.region.width=a.region.width,b.region.widthUnits=Od);bf(b);return b};function Qn(a,b){this.h=a;this.i=b;this.g=null;a=u(Array.from(this.h.textTracks));for(b=a.next();!b.done;b=a.next())b=b.value,"metadata"!==b.kind&&"chapters"!==b.kind&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}p=Qn.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;Rn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0}; | |
p.append=function(a){if(this.g){var b=Mn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=u(b);for(var d=b.next(),e={};!d.done;e={qd:void 0},d=b.next())e.qd=d.value,!a.some(function(f){return function(g){return g.startTime==f.qd.startTime&&g.endTime==f.qd.endTime&&g.text==f.qd.payload?!0:!1}}(e))&&e.qd.payload&&(d=On(e.qd))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)- | |
c.indexOf(f):c.indexOf(f)-c.indexOf(g)});a=u(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)}};p.destroy=function(){this.g&&(Rn(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?"showing"==this.g.mode:!1};p.setTextVisibility=function(a){a&&!this.g&&Sn(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){Sn(this)}; | |
function Sn(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}function Rn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=u(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",Qn);Qn.prototype.enableTextDisplayer=Qn.prototype.enableTextDisplayer;Qn.prototype.setTextLanguage=Qn.prototype.setTextLanguage;Qn.prototype.setTextVisibility=Qn.prototype.setTextVisibility; | |
Qn.prototype.isTextVisible=Qn.prototype.isTextVisible;Qn.prototype.destroy=Qn.prototype.destroy;Qn.prototype.append=Qn.prototype.append;Qn.prototype.remove=Qn.prototype.remove;Qn.prototype.configure=Qn.prototype.configure;function Tn(){}p=Tn.prototype;p.configure=function(){};p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){};S("shaka.text.StubTextDisplayer",Tn);Tn.prototype.enableTextDisplayer=Tn.prototype.enableTextDisplayer;Tn.prototype.setTextLanguage=Tn.prototype.setTextLanguage;Tn.prototype.setTextVisibility=Tn.prototype.setTextVisibility; | |
Tn.prototype.isTextVisible=Tn.prototype.isTextVisible;Tn.prototype.destroy=Tn.prototype.destroy;Tn.prototype.append=Tn.prototype.append;Tn.prototype.remove=Tn.prototype.remove;Tn.prototype.configure=Tn.prototype.configure;function Un(a,b){var c=this;document.fullscreenEnabled||cb("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen");this.m=!1;this.h=[];this.B=a;this.u=b;this.l=null;this.g=W("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.u.appendChild(this.g);this.G=(new ac(function(){c.B.paused|| | |
Vn(c)})).xa(.25);this.i=new Map;this.j=new td;this.j.o(document,"fullscreenchange",function(){Vn(c,!0)});this.j.o(this.B,"seeking",function(){Vn(c,!0)});this.j.o(this.B,"resize",function(){var d=c.B,e=d.videoWidth;d=d.videoHeight;e&&d?c.l=e/d:c.l=null});this.s=null;"ResizeObserver"in window&&(this.s=new ResizeObserver(function(){Vn(c,!0)}),this.s.observe(this.g));this.C=new Map}p=Un.prototype;p.configure=function(a){this.G&&this.G.xa(a.captionsUpdatePeriod)}; | |
p.append=function(a){var b=[].concat(x(this.h));a=u(Nn(a));for(var c=a.next(),d={};!c.done;d={ag:void 0},c=a.next())d.ag=c.value,b.some(function(e){return function(f){return af(f,e.ag)}}(d))||this.h.push(d.ag);Vn(this)};p.destroy=function(){if(!this.g)return Promise.resolve();this.u.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.G&&this.G.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.s&&(this.s.disconnect(),this.s=null);return Promise.resolve()}; | |
p.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Vn(this,c>this.h.length);return!0};p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){this.m=a;Vn(this,!0)};p.setTextLanguage=function(a){a&&"und"!=a?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function Wn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1} | |
function Xn(a,b,c,d,e){var f=!1,g=[],h=[];b=u(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.aj:null;l&&(g.push(l.cg),l.Zc&&g.push(l.Zc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Wn(a,n)||(f=!0):(Yn(a,k,e),l=a.i.get(k),n=l.aj,f=!0));0<k.nestedCues.length&&n&&Xn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=u(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,r){return q.startTime!= | |
r.startTime?q.startTime-r.startTime:q.endTime-r.endTime});h=u(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.Zc?(d.Zc.contains(c)&&d.Zc.removeChild(c),c.appendChild(d.Zc),d.Zc.appendChild(d.cg)):c.appendChild(d.cg)}}function Vn(a,b){if(a.g){var c=a.B.currentTime;if(!a.m||(void 0===b?0:b)){b=u(a.C.values());for(var d=b.next();!d.done;d=b.next())lj(d.value);lj(a.g);a.i.clear();a.C.clear()}a.m&&Xn(a,a.h,a.g,c,[])}} | |
function Yn(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=W(e);"br"!=e&&Zn(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Od?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Od?"%":"px");if(a.C.has(c))c=a.C.get(c);else{e=W("span");var k=g.heightUnits==Od?"%":"px",l=g.widthUnits==Od?"%":"px",m=g.viewportAnchorUnits== | |
Od?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,q=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(q=g.width*h,l="%");e.style.height=n+k;e.style.width=q+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.l===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*q/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*n/100+m,e.style.left= | |
g.viewportAnchorX-g.regionAnchorX*q/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start": | |
"center"==b.displayAlign?"center":"flex-end";a.C.set(c,e);c=e}}e=f;d&&(e=W("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{cg:f,aj:e,Zc:c})}function $n(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Qe?c:"left"===a||"start"===a&&b===Se||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Se?"line-right":"center"} | |
function Zn(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=ao(c.linePadding,c,a.u);f.paddingRight=ao(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage= | |
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=W("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=bo(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}if(h&&!d[d.length-1].isContainer)f.display= | |
"inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ao(c.fontSize, | |
c,a.u);d=c.line;null!=d&&(g=c.lineInterpretation,g==Ue&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Te?(f.width="100%",c.lineAlign==Ve?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Ve?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Ve?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=$n(c);"line-left"==a?(f.cssFloat= | |
"left",null!==c.position&&(f.position="absolute",c.writingMode==Te?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Te?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Te?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode= | |
c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Te?f.width=c.size+"%":f.height=c.size+"%")}function ao(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}} | |
function bo(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",Un);Un.prototype.enableTextDisplayer=Un.prototype.enableTextDisplayer;Un.prototype.setTextLanguage=Un.prototype.setTextLanguage;Un.prototype.setTextVisibility=Un.prototype.setTextVisibility;Un.prototype.isTextVisible=Un.prototype.isTextVisible;Un.prototype.remove=Un.prototype.remove;Un.prototype.destroy=Un.prototype.destroy;Un.prototype.append=Un.prototype.append; | |
Un.prototype.configure=Un.prototype.configure;function co(a,b){function c(f){for(var g=f,h=u(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Mn(a);a="WEBVTT\n\n";d=u(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left"); | |
break;case "right":g.push("align:right");break;case Re:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function eo(a,b){this.h=a;this.g=b;this.i=void 0;this.u=!1;this.H=!0;this.l=this.C=!1;this.s=this.m=void 0;this.B=0;this.I=!1;this.G=new td;this.j=null}eo.prototype.setMediaElement=function(a){this.j=a;fo(this)};eo.prototype.configure=function(a){this.g=a};function go(a){a.u=!1;a.H=!0;a.C=!1;a.l=!1;a.m=0;a.s=0;a.B=0;a.I=!1;a.j=null;a.G.Ua()}function ho(a,b){a.l=b;a.l?a.i==io?a.i=jo:a.i==ko&&(a.i=lo):a.i==jo?a.i=io:a.i==lo&&(a.i=ko)} | |
function mo(a,b){if(a.j){var c=a.j.play();c&&c.then(function(){a.B=b}).catch(function(){a.B=0})}} | |
function no(a,b,c){try{if(!a.g.enabled)return b;var d=oo(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=po;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=qo;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=ro;break a}e=void 0}d.ot=e;d.su= | |
!0;var f=so(d);return to(b,f)}catch(g){return db("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function fo(a){a.G.oa(a.j,"play",function(){a.m||(a.m=Date.now())});a.G.oa(a.j,"playing",function(){a.s||(a.s=Date.now())})}function oo(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}} | |
function uo(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,oo(a));c.pr=a.h.Xa();var e=c.ot===vo||c.ot===qo;a.C&&e&&(c.bs=!0,c.su=!0,a.C=!1);null==c.su&&(c.su=a.H);c.v===wo&&(a.h.T()&&(c.ltc=a.h.Le()),e=!a.I&&a.s&&a.m?a.s-(a.B||a.m):void 0,void 0!=e&&(c.msd=e,a.I=!0));a=xo(a,c);if(d)d=yo(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=so(a);f&&(b.uris=b.uris.map(function(g){return to(g,f)}))}}} | |
function xo(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}function zo(a){if(0===a.type)return Ao;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?qo:vo;if("audio"==b)return po;if("text"==b)return"application/mp4"===a.mimeType?Bo:Co}} | |
function Do(a,b){b=a.h.Yb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}function Eo(a,b){b=a.h.Yb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0} | |
function Fo(a,b){var c=a.h.Ob();if(!c.length)return NaN;a=c[0];c=u(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case vo:return a.videoBandwidth||NaN;case po:return a.audioBandwidth||NaN;default:return a.bandwidth}} | |
function so(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=u(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"=== | |
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function yo(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=so(e[a]))&&(c["CMCD-"+d[a]]=f);return c} | |
function to(a,b){if(!b||a.includes("offline:"))return a;a=new sb(a);a.g.set("CMCD",b);return a.toString()}var ro="m",po="a",vo="v",qo="av",Ao="i",Co="c",Bo="tt",wo=2,io="d",jo="ld",ko="h",lo="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:io,Ol:jo,HLS:ko,Pl:lo,bm:"s",OTHER:"o"});function Go(a){this.h=a;this.g=null}p=Go.prototype;p.configure=function(a){this.h=a};p.Wh=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Ho)?1E3*this.g.get(Ho):null};p.Vh=function(){return this.h.enabled&&this.g&&this.g.has(Io)?1E3*this.g.get(Io):null};p.Rj=function(){return this.h.enabled&&this.g&&this.g.has(Jo)?this.g.get(Jo):null};p.Sj=function(){return this.h.enabled&&this.g&&this.g.has(Ko)?this.g.get(Ko):null}; | |
p.getBandwidthEstimate=function(a){var b=this.Vh();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Lo(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Go);Go.prototype.getBandwidthEstimate=Go.prototype.getBandwidthEstimate;Go.prototype.getRoundTripTime=Go.prototype.Sj;Go.prototype.getResponseDelay=Go.prototype.Rj;Go.prototype.getEstimatedThroughput=Go.prototype.Vh; | |
Go.prototype.getMaxBitrate=Go.prototype.Wh;var Io="etp",Ho="mb",Jo="rd",Ko="rtt";function Mo(){this.g=null;this.h=[]}function No(a,b){return P(function(c){if(1==c.g)return a.g?G(c,new Promise(function(d){return a.h.push(d)}),2):c.A(2);a.g=b;H(c)})}Mo.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function Y(a,b,c){b=void 0===b?null:b;kb.call(this);var d=this;this.m=Oo;this.h=null;this.If=b;this.ra=!1;this.se=new td;this.ie=new td;this.l=new td;this.La=new td;this.Fb=new td;this.I=this.K=this.G=this.H=null;this.ve=0;this.Z=new Mo;this.na=this.Sa=this.U=this.i=this.Za=this.J=this.j=this.Ac=this.O=this.Bh=this.ea=this.M=this.fe=this.P=this.sa=this.L=this.jc=null;this.Aa=!1;this.Ga=this.s=null;this.Lf=1E9;this.pe=[];this.Kf=-1;this.g=Po(this);this.Nf=fn();this.R=null;this.we=-1;this.Ka=null;this.ka= | |
{width:Infinity,height:Infinity};this.Hf=new Ji(this.g,this.ka,null);this.qe=[];this.B=null;this.W=this.g.adaptationSetCriteriaFactory();this.W.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:this.g.preferredAudioChannelCount,pd:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,ed:this.g.preferredAudioLabel,Hd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy, | |
audioCodec:""});this.Qb=this.g.preferredTextLanguage;this.me=this.g.preferredTextRole;this.le=this.g.preferForcedSubs;this.je=[];c&&c(this);this.M=Qo(this);this.ea=new Go(this.g.cmsd);this.H=Ro(this);this.H.ih(this.g.streaming.forceHTTP);this.H.jh(this.g.streaming.forceHTTPS);this.H.s=this.g.streaming.minBytesForProgressEvents;this.mc=this.aa=this.u=null;this.Qf=!1;this.Pf=new ac(function(){return P(function(e){if(1==e.g)return d.aa?G(e,d.ac(d.mc,!0),3):e.A(0);if(4!=e.g)return G(e,d.load(d.aa),4); | |
d.Qf?d.mc.pause():d.mc.play();d.aa=null;d.Qf=!1;H(e)})});So&&(this.u=So(),this.u.configure(this.g.ads),this.Fb.o(this.u,"ad-content-pause-requested",function(e){var f;return P(function(g){if(1==g.g){d.Pf.stop();if(d.aa)return g.A(0);d.mc=d.h;d.Qf=d.isEnded();f=e.saveLivePosition||!1;return G(g,d.Ph(!0,f),3)}d.aa=g.h;H(g)})}),this.Fb.o(this.u,"ad-content-resume-requested",function(e){e=e.offset||0;if(d.aa){var f=d.aa;f.C&&e&&(f.C+=e)}d.Pf.Y(.1)}),this.Fb.o(this.u,"ad-content-attach-requested",function(){return P(function(e){return d.h|| | |
!d.mc?e.A(0):G(e,d.ac(d.mc,!0),0)})}));this.se.o(window,"online",function(){To(d);d.$g()});this.Jf=new ac(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=u(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,0<k.disabledUntilTime&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),0<k.disabledUntilTime&&(g=!1);g&&d.Jf.stop();f&&Uo(d,!1,void 0,!1,!1)});this.Ea=null;a&&(Dd("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.ac(a, | |
!0));this.C=null}pa(Y,kb);function Vo(a){null!=a.O&&(Xj(a.O),a.O.release(),a.O=null)}function Wo(a,b){b.lcevc.enabled?(Vo(a),null==a.O&&(a.O=new Wj(a.h,a.Bh,b.lcevc),a.K&&(a.K.aa=a.O))):Vo(a)}function Xo(a,b){return new T(a,b)}p=Y.prototype; | |
p.destroy=function(){var a=this,b;return P(function(c){switch(c.g){case 1:if(a.m==lp)return c.return();Vo(a);b=a.detach();a.m=lp;return G(c,b,2);case 2:return G(c,a.eg(),3);case 3:a.se&&(a.se.release(),a.se=null);a.ie&&(a.ie.release(),a.ie=null);a.l&&(a.l.release(),a.l=null);a.La&&(a.La.release(),a.La=null);a.Fb&&(a.Fb.release(),a.Fb=null);a.Ga=null;a.g=null;a.B=null;a.If=null;a.M=null;a.ea=null;if(!a.H){c.A(4);break}return G(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.s&&(a.s.release(),a.s=null), | |
kb.prototype.release.call(a),H(c)}})};function mp(){window.Promise||cb("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||gc("Trident/"))return!1;var a=rc();return a&&9>a?!1:bc()?!0:cc("application/x-mpegurl")}function np(a,b){a.dispatchEvent(Xo("onstatechange",(new Map).set("state",b)))} | |
p.ac=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return P(function(g){switch(g.g){case 1:if(c.m==lp)throw new U(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.A(2);break}return G(g,c.detach(),2);case 2:return G(g,op(c,"attach"),4);case 4:if(g.h)return g.return();ta(g,5,6);d||(np(c,"attach"),e=function(){var h=pp(c,!1);h&&qp(c,h)},c.ie.o(a,"error",e),c.h=a,c.M&&c.M.setMediaElement(a));if(!b||!bc()||c.K){g.A(6);break}return G(g,rp(c),6);case 6:Ca(g);c.Z.release();Da(g,0);break;case 5:return f=ya(g), | |
G(g,c.detach(),10);case 10:throw f;}})};p.Dh=function(a){this.Bh=a};p.detach=function(a){a=void 0===a?!1:a;var b=this;return P(function(c){if(1==c.g){if(b.m==lp)throw new U(2,7,7E3);return G(c,b.sc(!1,a),2)}if(3!=c.g)return G(c,op(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.ie.Ua(),b.h=null),np(b,"detach"),b.u&&!a&&b.u.release()}finally{b.Z.release()}H(c)})}; | |
function op(a,b){var c;return P(function(d){return 1==d.g?(c=++a.ve,G(d,No(a.Z,b),2)):c!=a.ve?(a.Z.release(),d.return(!0)):d.return(!1)})} | |
p.sc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q;return P(function(r){switch(r.g){case 1:return c.m!=lp&&(c.m=Oo),G(r,op(c,"unload"),2);case 2:if(r.h)return r.return();ua(r,3);c.Aa=!1;np(c,"unload");a&&!bc()&&(a=!1);Vo(c);d=c.je.map(function(t){return t()});c.je=[];return G(r,Promise.all(d),5);case 5:c.dispatchEvent(Xo("unloading"));c.fe&&(c.fe.release(),c.fe=null);c.h&&(c.l.Ua(),c.La.Ua());c.Jf.stop();c.jc&&(c.jc.release(),c.jc=null);c.sa&&(c.sa.stop(),c.sa=null); | |
if(!c.J){r.A(6);break}return G(r,c.J.stop(),7);case 7:c.J=null,c.Za=null;case 6:if(!c.s){r.A(8);break}return G(r,c.s.stop(),8);case 8:if(!c.j){r.A(10);break}return G(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.L&&(c.L.release(),c.L=null);c.I&&(c.I.release(),c.I=null);if(!yc("webkit")||!c.G){r.A(12);break}return G(r,c.G.destroy(),13);case 13:c.G=null;case 12:if(!c.K){r.A(14);break}return G(r,c.K.destroy(),15);case 15:c.K=null;case 14:if(c.u&&!b)c.u.onAssetUnload();c.aa&&!b&&(c.aa.destroy(),c.aa= | |
null);b||c.Pf.stop();c.M&&go(c.M);c.ea&&(c.ea.g=null);if(!c.C){r.A(16);break}return G(r,c.C.destroy(),17);case 17:c.C=null;case 16:c.h&&(lj(c.h),c.h.src&&(c.h.removeAttribute("src"),c.h.load()));if(!c.G){r.A(18);break}return G(r,c.G.destroy(),19);case 19:c.G=null;case 18:c.Ea&&c.U!=c.Ea.nd()&&(c.Ea.u||c.Ea.destroy(),c.Ea=null);c.U=null;c.Sa=null;c.P=null;if(c.i){e=u(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=u([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&& | |
l.segmentIndex.release();m=u(c.i.textStreams);for(n=m.next();!n.done;n=m.next())q=n.value,q.segmentIndex&&q.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(sg={},Yb.clear());c.i=null;c.B=new nn;c.ue=null;c.Ka=null;c.R=null;c.we=-1;c.pe=[];c.Kf=-1;c.H&&c.H.Lh();sp(c);case 3:Ca(r);c.Z.release();Da(r,4);break;case 4:if(a&&bc()&&!c.K&&c.h)return G(r,rp(c),0);r.A(0)}})};p.ql=function(a){this.na=a}; | |
p.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,r,t,w,v;return P(function(z){switch(z.g){case 1:if(d.m==lp)throw new U(2,7,7E3);e=null;f="";a instanceof on?(e=a,f=e.nd()||""):f=a||"";return G(z,No(d.Z,"load"),2);case 2:d.Z.release();if(!d.h)throw new U(2,7,7002);if(!d.U){z.A(3);break}d.U=f;return G(z,d.sc(!1),3);case 3:g=++d.ve;h=function(){return P(function(y){if(1==y.g)return d.ve==g?y.A(0):e?G(y,e.destroy(),3):y.A(3);throw new U(2,7,7E3);})};k=function(y,A){return P(function(E){switch(E.g){case 1:return ua(E, | |
2),G(E,No(d.Z,A),4);case 4:return G(E,h(),5);case 5:return G(E,y(),6);case 6:return G(E,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Ca(E),d.Z.release(),Da(E,0)}})};ta(z,5,6);null==b&&e&&(b=e.getStartTime());d.na=b;d.Aa=!1;d.dispatchEvent(Xo("loading"));if(e){c=e.U;z.A(8);break}if(c){z.A(8);break}return G(z,k(function(){return P(function(y){if(1==y.g)return G(y,tp(d,f),2);c=y.h;H(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){rn(e,d);d.B=e.getStats();z.A(11);break}return G(z,up(d,f,b,c,!0),12);case 12:(e= | |
z.h)?(e.B=!1,rn(e,d),d.B=e.getStats(),e.start(),e.m.catch(function(){})):d.B=new nn;case 11:return m=!e,n=Date.now()/1E3,d.B=e?e.getStats():new nn,d.U=f,d.Sa=c||null,m?G(z,k(function(){return P(function(y){return G(y,vp(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):G(z,k(function(){return P(function(y){if(1==y.g)return G(y,Promise.race([e.ea,e.m]),2);d.Za=e.I;var A=e;A.ka=!0;d.J=A.j;d.i=e.yg();H(y)})},"waitForFinish"),15);case 15:if(d.K){z.A(16);break}return G(z,k(function(){return P(function(y){return G(y, | |
rp(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&&(d.C.enableTextDisplayer?d.C.enableTextDisplayer():Dd("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),G(z,k(function(){return P(function(y){return G(y,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Hf=e.H;d.J&&d.J.setMediaElement&&d.h&&d.J.setMediaElement(d.h);d.fe=tn(e);d.Ac=e.Ga;if(q=e.s)d.W=q;l&&d.h&&"AUDIO"===d.h.nodeName&&(wp(d), | |
d.configure("manifest.disableVideo",!0));d.G=un(e);return G(z,k(function(){return P(function(y){return G(y,d.G.ac(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.G)||d.Ga&&d.Ga==r||(d.s=sn(e),d.Ga=e.G,"function"!=typeof d.s.setMediaElement&&(Dd("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(Dd("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."), | |
d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(Dd("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.s.trySuggestStreams=function(){})),t=vn(e),w=e.na,G(z,k(function(){return P(function(y){return G(y,xp(d,n,w,t),0)})},"loadInner_"),20);case 20:qn(e);d.Sa&&rc()&&Mf(d.Sa)&&dk(d.K,d.U,d.Sa);z.A(14);break;case 21:return G(z,k(function(){return P(function(y){return G(y,yp(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(Xo("loaded")); | |
case 6:Ca(z);if(!e){z.A(23);break}return G(z,e.destroy(),23);case 23:d.Ea=null;Da(z,0);break;case 5:v=ya(z);if(!v||7E3==v.code){z.A(25);break}return G(z,d.sc(!1),25);case 25:throw v;}})};function wp(a){for(var b=u(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})} | |
p.jl=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return P(function(e){return 1==e.g?G(e,zp(c),2):3!=e.g?(d=e.h,G(e,c.sc(a,b),3)):e.return(d)})};p.Ph=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return P(function(e){return 1==e.g?G(e,zp(c,b),2):3!=e.g?(d=e.h,G(e,c.detach(a),3)):e.return(d)})}; | |
function zp(a,b){b=void 0===b?!1:b;var c,d;return P(function(e){if(1==e.g){c=null;if(!(a.i&&a.J&&a.Za&&a.U))return e.A(2);d=a.h.currentTime;a.T()&&!b&&(d=null);return G(e,Ap(a,a.U,d,a.Sa,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.qe.push(c);a.J&&a.J.setMediaElement&&a.J.setMediaElement(null);var f=c,g=a.J,h=a.Za;f.h=a.i;f.j=g;f.I=h;f=c;g=a.Ga;f.i=a.s;f.G=g;c.s=a.W;c.start();a.i=null;a.J=null;a.Za=null;a.s=null;a.Ga=null}return e.return(c)})} | |
p.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return P(function(f){if(1==f.g)return G(f,up(d,a,b,c),2);(e=f.h)?e.start():qp(d,new U(2,7,7005));return f.return(e)})};p.eg=function(){var a=this,b,c,d,e;return P(function(f){b=[];c=u(a.qe);for(d=c.next();!d.done;d=c.next())e=d.value,e.u||b.push(e.destroy());a.qe=[];return G(f,Promise.all(b),0)})}; | |
function up(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return P(function(l){if(1==l.g)return d?l.A(2):G(l,tp(a,b),3);2!=l.g&&(d=l.h);if(f=Bp(a,d))return l.return(null);g=!1;h=!0;e&&(a.s&&a.Ga==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=Ap(a,b,c,d||null,!e,g,h);k=e?k.then(function(m){m.B=!1;return m}):k.then(function(m){a.qe.push(m);return m});return l.return(k)})} | |
function Ap(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,q,r,t,w,v,z,y,A,E;return P(function(C){if(1==C.g)return h=null,k=be(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.R&&h.u?null:h},m=function(){return l()?l().getConfiguration():a.g},Infinity!=a.ka.width||Infinity!=a.ka.height||a.g.ignoreHardwareResolution?C.A(2):G(C,zc(),3);2!=C.g&&(n=C.h,a.ka.width=n.width,a.ka.height=n.height);q=new Ji(k,a.ka,null);r={networkingEngine:a.H,filter:function(B){var D, | |
I;return P(function(F){if(1==F.g)return G(F,Ki(q,B),2);if(4!=F.g){D=F.h;if(!D)return F.A(0);I=Xo("trackschanged");return G(F,Promise.resolve(),4)}h.dispatchEvent(I);H(F)})},makeTextStreamsForClosedCaptions:function(B){return Cp(a,B)},onTimelineRegionAdded:function(B){var D=h.J;a:{var I=u(D.g);for(var F=I.next();!F.done;F=I.next())if(F=F.value,F.schemeIdUri==B.schemeIdUri&&F.id==B.id&&F.startTime==B.startTime&&F.endTime==B.endTime){I=F;break a}I=null}null==I&&(D.g.add(B),B=new T("regionadd",new Map([["region", | |
B]])),D.dispatchEvent(B))},onEvent:function(B){return h.dispatchEvent(B)},onError:function(B){return h.onError(B)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.j&&h.R&&a.j.updateDuration()},newDrmInfo:function(B){var D=h.l,I=D?D.h:null;I&&D.B&&Ni(q,I.keySystem,B)},onManifestUpdated:function(){var B=(new Map).set("isLive",a.T());h.dispatchEvent(Xo("manifestupdated",B));pn(h,!1,function(){if(a.u)a.u.onManifestUpdated(a.T())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()}, | |
onMetadata:function(B,D,I,F){var L=B;if("com.apple.hls.interstitial"==B&&(L="com.apple.quicktime.HLS",B={startTime:D,endTime:I,values:F},a.u))a.u.onHLSInterstitialMetadata(a,a.h,B);F=u(F);B=F.next();for(var J={};!B.done;J={Vg:void 0},B=F.next())J.Vg=B.value,"ID"!=J.Vg.name&&pn(h,!1,function(K){return function(){Dp(a,D,I,L,K.Vg)}}(J))},disableStream:function(B){return a.disableStream(B,a.g.streaming.maxDisabledTime)},addFont:function(B,D){return a.addFont(B,D)}};t=new El(function(){return a.za()}); | |
t.addEventListener("regionadd",function(B){var D=B.region;Ep(a,"timelineregionadded",D,h);pn(h,!1,function(){a.u&&(a.u.onDashTimedMetadata(D),a.u.onDASHInterstitialMetadata(a,a.h,D))})});w=null;k.streaming.observeQualityChanges&&(w=new yl(function(){return a.Yb()}),w.addEventListener("qualitychange",function(B){Fp(a,B.quality,B.position)}),w.addEventListener("audiotrackchange",function(B){Fp(a,B.quality,B.position,!0)}));v=!0;z={nc:a.H,onError:function(B){return h.onError(B)},ef:function(B){pn(h, | |
!0,function(){a:{var D=B,I=Xo("keystatuschanged");a.dispatchEvent(I);var F=Object.keys(D);1==F.length&&""==F[0]&&(F=["00"],D={"00":D[""]});I=1==F.length&&"00"==F[0];var L=!1;if(F.length){F=u(a.i.variants);for(var J=F.next();!J.done;J=F.next()){J=J.value;var K=[];J.audio&&K.push(J.audio);J.video&&K.push(J.video);K=u(K);for(var O=K.next();!O.done;O=K.next()){var M=O.value;O=J.allowedByKeySystem;if(M.keyIds.size){J.allowedByKeySystem=!0;M=u(M.keyIds);for(var N=M.next();!N.done;N=M.next())if(N=N.value, | |
(N=D[I?"00":N])||a.G.H)J.allowedByKeySystem=J.allowedByKeySystem&&!!N&&!Pi.includes(N)}O!=J.allowedByKeySystem&&(L=!0)}}}if(L&&(Gp(a),!Hp(a)))break a;(D=a.j.j)&&!D.allowedByKeySystem&&Uo(a)}})},onExpirationUpdated:function(B,D){var I=Xo("expirationupdated");h.dispatchEvent(I);if((I=h.j)&&I.onExpirationUpdated)I.onExpirationUpdated(B,D)},onEvent:function(B){h.dispatchEvent(B);"drmsessionupdate"==B.type&&v&&(v=!1,B=Date.now()/1E3-h.Aa,(a.B||h.getStats()).j=B,a.O&&Xj(a.O))}};y=Ro(a,l);jh(a.H,y);A=function(){return a.hd(z)}; | |
E={config:k,xk:r,Hk:t,Gk:w,hd:A,wk:q,networkingEngine:y,jj:e,ij:g};h=new on(b,d,c,E);return C.return(h)})}function tp(a,b){var c,d;return P(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,G(e,In(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&mc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})} | |
function Bp(a,b){if(!bc())return!0;if(b){if(""==(a.h||dc()).canPlayType(b))return!1;if(!(bc()&&b in Si))return!0;if(Mf(b))return mc()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if("application/dash+xml"===b||"video/vnd.mpeg.dash.mpd"===b)return a.g.streaming.preferNativeDash}return!1} | |
function Ip(a){var b=a.g.textDisplayFactory;b!==a.ue&&(a.C=b(),a.C.configure?a.C.configure(a.g.textDisplayer):Dd("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.ue=b,a.C.setTextVisibility(a.ra))} | |
function rp(a){var b,c,d;return P(function(e){if(1==e.g)return np(a,"media-source"),a.h.removeAttribute("src"),lj(a.h),Ip(a),b=Jp(a.h,a.C,{Hj:function(){return a.keySystem()},onMetadata:function(f,g,h){f=u(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&"number"==typeof k.cueTime&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=u(k.frames),q=n.next();!q.done;q=n.next())Dp(a,l,m,"org.id3",q.value);if(a.u)a.u.onHlsTimedMetadata(k,l)}},onEvent:function(f){return a.dispatchEvent(f)}, | |
Dk:function(){a.J&&a.J.update&&a.J.update()}},a.O),b.configure(a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Va=d,G(e,b.I,2);a.K=b;H(e)})} | |
function Kp(a,b,c){function d(){return Lp(a)}a.l.o(b,"playing",d);a.l.o(b,"pause",d);a.l.o(b,"ended",d);a.l.o(b,"ratechange",function(){var e=a.h.playbackRate;0!=e&&(a.L&&a.L.set(e),e=Xo("ratechange"),a.dispatchEvent(e))});b.remote&&(a.l.o(b.remote,"connect",function(){return Gp(a)}),a.l.o(b.remote,"connecting",function(){return Gp(a)}),a.l.o(b.remote,"disconnect",function(){return P(function(e){if(1==e.g)return a.j&&"disconnected"==b.remote.state?G(e,om(a.j),2):e.A(2);Gp(a);H(e)})}));b.audioTracks&& | |
(a.l.o(b.audioTracks,"addtrack",function(){return Gp(a)}),a.l.o(b.audioTracks,"removetrack",function(){return Gp(a)}),a.l.o(b.audioTracks,"change",function(){return Gp(a)}));b.textTracks&&(a.l.o(b.textTracks,"addtrack",function(e){if(e.track)switch(e=e.track,e.kind){case "metadata":Mp(a,e);break;case "chapters":Np(a,e);break;default:Gp(a)}}),a.l.o(b.textTracks,"removetrack",function(){return Gp(a)}),a.l.o(b.textTracks,"change",function(){return Gp(a)}));"none"!=b.preload&&a.l.oa(b,"loadedmetadata", | |
function(){a.B.G=Date.now()/1E3-c})} | |
function xp(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I;return P(function(F){switch(F.g){case 1:np(a,"load"),e=a.h,a.L=new ul({Ne:function(){return e.playbackRate},Mc:function(){return e.defaultPlaybackRate},kh:function(L){e.playbackRate=L},ni:function(L){e.currentTime+=L}}),Kp(a,e,b),Wo(a,a.g),a.Qb=a.g.preferredTextLanguage,a.me=a.g.preferredTextRole,a.le=a.g.preferForcedSubs,Op(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.s.init(function(L,J,K){a.i&&a.j&&L!=a.j.j&& | |
Pp(a,L,!0,void 0===J?!1:J,void 0===K?0:K)}),a.s.setMediaElement(e),a.s.setCmsdManager(a.ea),a.j=Qp(a),a.j.configure(a.g.streaming),a.m=Rp,a.dispatchEvent(Xo("streaming")),f=c;case 2:(h=a.j.j)||f||(f=Hp(a)?a.s.chooseVariant():null);k=[];g=h||f;l=u([g.video,g.audio]);for(m=l.next();!m.done;m=l.next())(n=m.value)&&!n.segmentIndex&&k.push(n.createSegmentIndex());if(!(0<k.length)){F.A(4);break}return G(F,Promise.all(k),4);case 4:if(!g||0!=g.disabledUntilTime){F.A(2);break}if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(g); | |
a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?a.configure(a.Nf):cb("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."));a.M&&(ho(a.M,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),mo(a.M,1E3*b));Op(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);dm(a.j,a.g.playRangeStart,a.g.playRangeEnd);q=function(L){a.I=Sp(a,L);a.jc=Tp(a,L);Up(a,e,a.g.streaming.rebufferingGoal)}; | |
a.g.streaming.startAtSegmentBoundary||(r=a.na,null==r&&a.i.startTime&&(r=a.i.startTime),q(r));if(h){F.A(7);break}if(!a.g.streaming.startAtSegmentBoundary){F.A(8);break}t=a.i.presentationTimeline;w=a.na||a.h.currentTime;null==a.na&&a.i.startTime&&(w=a.i.startTime);v=t.fc();z=t.Mb();w<v?w=v:w>z&&(w=z);return G(F,Vp(f,w),9);case 9:y=F.h,q(y);case 8:Pp(a,f,!0,!1,0);case 7:return a.I.ready(),A=a.ic().find(function(L){return L.active}),A||((E=Lg(a.i.textStreams,a.Qb,a.me,a.le)[0]||null)&&mn(a.B.h,E,!0), | |
f&&(E?(Wp(a,f.audio,E)&&(a.ra=!0),a.ra&&a.C.setTextVisibility(!0),Xp(a)):a.ra=!1),E&&(a.g.streaming.alwaysStreamText||a.Tc())&&(mm(a.j,E),Yp(a))),G(F,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),Zp(a));Gp(a);Hp(a);a.i.variants.some(function(L){return L.primary});if((C=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)B=function(){return $p(a)},a.l.o(e,"timeupdate",B);C||(D=function(){return aq(a)}, | |
a.l.o(e,"timeupdate",D),aq(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(I=function(){var L;return P(function(J){if(1==J.g){L=a.za().end-a.h.currentTime;if(isNaN(L)||!(L<=a.g.streaming.preloadNextUrlWindow))return J.A(0);a.l.Ja(e,"timeupdate",I);return G(J,a.preload(a.i.nextUrl),4)}a.Ea=J.h;H(J)})},a.l.o(e,"timeupdate",I)),a.l.o(e,"ended",function(){a.load(a.Ea||a.i.nextUrl)})));if(a.u)a.u.onManifestUpdated(C);a.Aa=!0;H(F)}})} | |
function vp(a,b){var c,d,e,f,g;return P(function(h){return 1==h.g?(c=Yc,d=Date.now()/1E3,e=!0,a.G=a.hd({nc:a.H,onError:function(k){qp(a,k)},ef:function(){},onExpirationUpdated:function(){var k=Xo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.B.j=Date.now()/1E3-d)}}),a.G.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}, | |
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Kf(b):"",codecs:b?Lf(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.Ca,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1},g.fullMimeTypes.add(Af(g.mimeType, | |
g.codecs)),b.startsWith("audio/")?(g.type=c.ba,f.audio=g):f.video=g,a.G.aa=!0,G(h,Th(a.G,[f],[]),2)):G(h,a.G.ac(a.h),0)})} | |
function yp(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t;return P(function(w){switch(w.g){case 1:np(a,"src-equals");d=a.h;a.I=new kl(d);e=!1;a.je.push(function(){e=!0});null!=a.na&&a.I.Of(a.na);a.L=new ul({Ne:function(){return d.playbackRate},Mc:function(){return d.defaultPlaybackRate},kh:function(v){d.playbackRate=v},ni:function(v){d.currentTime+=v}});f=a.g.streaming.rebufferingGoal;Up(a,d,f);d.textTracks&&(Ip(a),g=function(){var v=bq(a).find(function(z){return"disabled"!==z.mode});v&&(v.mode="showing")}, | |
h=function(){var v=bq(a).find(function(z){return"disabled"!==z.mode});v&&(v.mode="hidden")},a.l.o(d,"enterpictureinpicture",function(){return g()}),a.l.o(d,"leavepictureinpicture",function(){return h()}),d.remote?(a.l.o(d.remote,"connect",function(){return h()}),a.l.o(d.remote,"connecting",function(){return h()}),a.l.o(d.remote,"disconnect",function(){return h()})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.l.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){return h()}),k=d,k.webkitSupportsFullscreen&& | |
a.l.o(k,"webkitpresentationmodechanged",function(){"inline"!=k.webkitPresentationMode?g():h()}));Kp(a,d,b);l=no(a.M,a.U,c);!l.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(l+="#t=",0<a.g.playRangeStart&&(l+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(l+=","+a.g.playRangeEnd));if(!a.K){w.A(2);break}return G(w,a.K.destroy(),3);case 3:a.K=null;case 2:return lj(d),d.src=l,(hc()||jc())&&d.load(),"none"!=d.preload&&!d.autoplay&&Mf(c)&&rc()&&d.load(),a.m=cq,a.dispatchEvent(Xo("streaming")), | |
m=new Wg,bl(d,HTMLMediaElement.HAVE_METADATA,a.l,function(){a.I.ready();m.resolve()}),bl(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.l,function(){var v,z,y,A,E;return P(function(C){if(1==C.g)return dq(a),v=bq(a),v.find(function(B){return"disabled"!=B.mode})?(0<v.length&&(a.ra=!0,a.C.setTextVisibility(!0)),C.A(2)):G(C,new Promise(function(B){a.l.oa(d.textTracks,"change",B);(new ac(B)).Y(1)}),2);if(e)return C.return();bq(a).length&&(a.C.enableTextDisplayer?a.C.enableTextDisplayer():Dd("Text displayer w/ enableTextDisplayer", | |
'Text displayer should have a "enableTextDisplayer" method!'));z=!1;y=u(v);for(A=y.next();!A.done;A=y.next())E=A.value,"disabled"!==E.mode&&(z?(E.mode="disabled",cb("Found more than one enabled text track, disabling it",E)):(eq(a,E),z=!0));fq(a);H(C)})}),d.error?m.reject(pp(a)):"none"==d.preload&&(cb('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'), | |
m.resolve()),a.l.oa(d,"error",function(){m.reject(pp(a))}),G(w,Yf(a.g.streaming.loadTimeout,m),4);case 4:if((n=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return $p(a)},a.l.o(d,"timeupdate",q);n||(r=function(){return aq(a)},a.l.o(d,"timeupdate",r),aq(a));a.u&&(a.u.onManifestUpdated(n),n&&(t=a.za().end,a.l.o(d,"progress",function(){var v=a.za().end;t!=v&&(a.u.onManifestUpdated(a.T()),t=v)}))); | |
a.Aa=!0;H(w)}})}function dq(a){var b=a.g.preferredAudioLanguage;""!=b&&a.bh(b,a.g.preferredVariantRole)}function fq(a){var b=a.g.preferredTextLanguage;""!=b&&a.dh(b,a.g.preferredTextRole,a.g.preferForcedSubs)} | |
function Mp(a,b){if("metadata"==b.kind){b.mode="hidden";a.l.o(b,"cuechange",function(){if(b.activeCues)for(var d=u(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Dp(a,e.startTime,e.endTime,e.type,e.value),a.u)a.u.onCueMetadataChange(e.value);if(b.cues){d=[];e=u(b.cues);for(var f=e.next(),g={};!f.done;g={uc:void 0},f=e.next())g.uc=f.value,"com.apple.quicktime.HLS"==g.uc.type&&null!=g.uc.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.uc.startTime&&k.endTime==h.uc.endTime}}(g)), | |
f||(f={startTime:g.uc.startTime,endTime:g.uc.endTime,values:[]},d.push(f)),f.values.push(g.uc.value));d=u(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.u&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.T()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.u.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new ac(function(){var d=gq(a);d=u(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ia().Y(.5); | |
a.je.push(function(){c.stop()})}}function Dp(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Xo("metadata",b))}function Np(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new ac(function(){b.mode="hidden"})).Ia().Y(.5);a.je.push(function(){c.stop()})}}p.Lk=function(){for(var a=this.Z;a.g;)a.release()};p.hd=function(a){return new Mh(a)}; | |
function Ro(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?pn(b(),!0,e):e()}b||(b=function(){return null});return new fh(function(e,f,g,h){var k=b()?b().i:a.s;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Xo("downloadheadersreceived",f));d(function(){if(a.ea){var h=a.ea;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0], | |
Lo(n[1]))}}catch(v){}if(l=e["cmsd-dynamic"]){try{var q=new Map,r=l.split(";");for(l=1;l<r.length;l++){var t=r[l].split("=");q.set(t[0],Lo(t[1]))}var w=q}catch(v){w=null}w&&(h.g=w)}}}})},function(e,f){e=(new Map).set("request",e).set("response",f);c(Xo("downloadcompleted",e))},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(Xo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.M,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)uo(h, | |
f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=h.l?jo:io;break a;case 3:case 2:l=h.l?lo:ko;break a;case 5:l="s";break a}l=void 0}h.i=l}uo(h,f,{ot:ro,su:!h.u})}}catch(M){db("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case qh:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.T()?"l":"v"};n.ot=zo(k);var q=n.ot===vo||n.ot===po||n.ot===qo||n.ot===Bo,r=k.stream;if(r){var t=h.h.Xa();if(q&&(n.bl=Do(h, | |
r.type),n.ot!==Bo)){var w=Eo(h,r.type);n.dl=t?w/Math.abs(t):w}r.bandwidth&&(n.br=r.bandwidth/1E3);if(r.segmentIndex&&m){var v=r.segmentIndex.ec(m.endTime,!0,0>t);if(v){var z=v.next().value;if(z&&z!=m){if(!Td(m.S(),z.S())){var y=z.S()[0],A=f.uris[0],E=new URL(y),C=new URL(A);if(E.origin!==C.origin)var B=y;else{for(var D=E.pathname.split("/").slice(1),I=C.pathname.split("/").slice(1,-1);D[0]===I[0];)D.shift(),I.shift();for(;I.length;)I.shift(),D.unshift("..");B=D.join("/")}n.nor=B}if((z.eb||z.Na)&& | |
(m.eb!=z.eb||m.Na!=z.Na)){var F=z.eb+"-";z.Na&&(F+=z.Na);n.nrr=F}}}var L=h.h.Xa()||1,J=Eo(h,r.type)||500,K=r.bandwidth;var O=K?K*(m.endTime-m.startTime)/1E3/(J/L/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(O)||(n.rtp=O)}}q&&n.ot!==Bo&&(n.tb=Fo(h,n.ot)/1E3);uo(h,f,n)}}catch(M){db("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:uo(h,f,{ot:"k"});break;case 4:uo(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f= | |
f.data.byteLength;var g=b()?b().getStats():a.B;g&&(g.Ic=isNaN(g.Ic)?f:g.Ic+f,0===e&&(g.ii=f))}})}function Sp(a,b){return new ll(a.h,a.i,a.g.streaming,b,function(){a.jc&&xl(a.jc,!0);a.j&&a.j.Cd();a.P&&hq(a)},function(c){return a.dispatchEvent(c)})} | |
function Tp(a,b){b=new Dn(a.fe,a.T()||0<b);b.addEventListener("enter",function(d){Ep(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Ep(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Ep(a,"timelineregionenter",e),Ep(a,"timelineregionexit",e))});var c=new wl(a.h);c.g.add(b);a.Ac&&c.g.add(a.Ac);return c} | |
function Up(a,b,c){a.P=new Ei;a.P.g=Gi;Hi(a.P,c,Math.min(.5,c/2));sp(a);a.sa=new ac(function(){hq(a)});a.g.streaming.rebufferingGoal&&a.sa.xa(.25);a.l.o(b,"waiting",function(){return hq(a)});a.l.o(b,"stalled",function(){return hq(a)});a.l.o(b,"canplaythrough",function(){return hq(a)});a.l.o(b,"progress",function(){return hq(a)});a.l.o(b,"seeked",function(){return hq(a)})} | |
function hq(a){switch(a.m){case cq:if(a.isEnded())var b=!0;else{var c=dj(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Rp:a:if(a.isEnded()||fk(a.K))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.wc();var d=dj(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=fj(a.h.buffered,a.h.currentTime);c=a.P;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f&&0<d?Fi:Gi;c.g=d;(b=b!=d)&&d===Fi&&(c.h=Date.now());b&&sp(a)}function Jp(a,b,c,d){return new Zj(a,b,c,d)} | |
function Qo(a){return new eo({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Yb:function(){return a.Yb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Xa:function(){return a.Xa()},Db:function(){return a.Db()},Ob:function(){return a.Ob()},T:function(){return a.T()},Le:function(){return a.Le()}},a.g.cmcd)} | |
function Qp(a){return new Yl(a.i,{Qd:function(){return a.I?a.I.xe():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},Xa:function(){return a.Xa()},ma:a.K,nc:a.H,onError:function(b){return qp(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Rg:function(b,c){var d=b.startTime;b=b.endTime;var e=c.type;c=c.codecs.includes(",");if(e!=Wc){if(a.I){a.I.oi();var f=mk(a.K,e);!a.T()&&a.h.paused&&null!=f&&0<f&&a.I.xe()<f&&a.I.Of(f)}hq(a)}d=(new Map).set("start",d).set("end",b).set("contentType", | |
e).set("isMuxed",c);a.dispatchEvent(Xo("segmentappended",d))},Ck:function(b,c){(c=c.ud)&&a.Ac&&Al(a.Ac,c,b)},Hh:function(b,c){var d=a.G;if(d.g.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){b=new Kh(Mb(c));c=0;for(var e=u(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=u(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;ei(d,"cenc",c);d=d.m}}else d=Promise.resolve();return d},disableStream:function(b, | |
c){return a.disableStream(b,c)}})} | |
p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Jm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Dd("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(Dd("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux); | |
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&(Dd("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),a.streaming.preferNativeHls=a.streaming.useNativeHlsOnSafari&&mc(),delete a.streaming.useNativeHlsOnSafari);if(a.streaming&&"boolean"==typeof a.streaming.liveSync){Dd("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var c=a.streaming.liveSync;a.streaming.liveSync={};a.streaming.liveSync.enabled= | |
c}if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){c=a.streaming.liveSyncMinLatency||0;var d=Math.abs((a.streaming.liveSyncMaxLatency||1)-c)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=c+d;a.streaming.liveSync.targetLatencyTolerance=d}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(Dd("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"), | |
delete a.streaming.liveSyncMaxLatency);a.streaming&&"liveSyncMinLatency"in a.streaming&&(Dd("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete a.streaming.liveSyncMinLatency);a.streaming&&"liveSyncTargetLatency"in a.streaming&&(Dd("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatency= | |
a.streaming.liveSyncTargetLatency,delete a.streaming.liveSyncTargetLatency);a.streaming&&"liveSyncTargetLatencyTolerance"in a.streaming&&(Dd("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatencyTolerance=a.streaming.liveSyncTargetLatencyTolerance,delete a.streaming.liveSyncTargetLatencyTolerance);a.streaming&&"liveSyncPlaybackRate"in a.streaming&&(Dd("streaming.liveSyncPlaybackRate", | |
"Please Use streaming.liveSync.maxPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.maxPlaybackRate=a.streaming.liveSyncPlaybackRate,delete a.streaming.liveSyncPlaybackRate);a.streaming&&"liveSyncMinPlaybackRate"in a.streaming&&(Dd("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.minPlaybackRate=a.streaming.liveSyncMinPlaybackRate,delete a.streaming.liveSyncMinPlaybackRate); | |
a.streaming&&"liveSyncPanicMode"in a.streaming&&(Dd("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicMode=a.streaming.liveSyncPanicMode,delete a.streaming.liveSyncPanicMode);a.streaming&&"liveSyncPanicThreshold"in a.streaming&&(Dd("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicThreshold= | |
a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){Dd("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var e=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return e};delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(Dd("manifest.hls.useSafariBehaviorForLive configuration", | |
"Please Use liveSync config to keep on live Edge instead."),delete a.manifest.hls.useSafariBehaviorForLive);a.streaming&&"parsePrftBox"in a.streaming&&(Dd("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in a.manifest.dash&&(Dd("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete a.manifest.dash.enableAudioGroups);a.streaming&& | |
"dispatchAllEmsgBoxes"in a.streaming&&(Dd("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),a.mediaSource.dispatchAllEmsgBoxes=a.streaming.dispatchAllEmsgBoxes,delete a.streaming.dispatchAllEmsgBoxes);a.streaming&&"autoLowLatencyMode"in a.streaming&&(Dd("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),a.streaming.lowLatencyMode=a.streaming.autoLowLatencyMode,delete a.streaming.autoLowLatencyMode);if(a.drm&& | |
a.drm.advanced){c=!1;for(var f in a.drm.advanced){var g=a.drm.advanced[f];d=g.videoRobustness;g=g.audioRobustness;"videoRobustness"in a.drm.advanced[f]&&!Array.isArray(a.drm.advanced[f].videoRobustness)&&(a.drm.advanced[f].videoRobustness=[d],c=!0);"audioRobustness"in a.drm.advanced[f]&&!Array.isArray(a.drm.advanced[f].audioRobustness)&&(a.drm.advanced[f].audioRobustness=[g],c=!0)}c&&Dd("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}f= | |
gn(this.g,a,Po(this));iq(this);return f};p.oj=function(a){this.Nf=a}; | |
function iq(a){a.Hf=new Ji(a.g,a.ka,a.G);if(a.J){var b=be(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.G&&a.G.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.m!=lp&&Li(a.Hf,a.i)&&Gp(a)}catch(e){qp(a,e)}a.s&&Hp(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Uo(a)}a.H&&(a.H.ih(a.g.streaming.forceHTTP),a.H.jh(a.g.streaming.forceHTTPS),a.H.s=a.g.streaming.minBytesForProgressEvents);a.K&&(a.K.configure(a.g.mediaSource),a.K.Va=a.g.manifest.segmentRelativeVttTiming); | |
if(a.C)if(b=a.g.textDisplayFactory,a.ue!=b){var c=a.C;a.C=b();a.C.configure?a.C.configure(a.g.textDisplayer):Dd("Text displayer w/ configure",'Text displayer should have a "configure" method!');a.C.setTextLanguage||Dd("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!');a.C.setTextVisibility(c.isTextVisible());c.destroy();if(a.K){c=a.K;var d=a.C;c.ea=d;c.h&&(c.h.j=d)}a.ue=b;a.j&&(b=a.j,(c=b.i.get(Wc))&&km(b,c.stream,!0,0,!0))}else a.C.configure&&a.C.configure(a.g.textDisplayer); | |
a.s&&(a.s.configure(a.g.abr),a.g.abr.enabled?a.s.enable():a.s.disable(),Zp(a));a.P&&(b=a.g.streaming.rebufferingGoal,Hi(a.P,b,Math.min(.5,b/2)));a.sa&&(a.g.streaming.rebufferingGoal?a.sa.xa(.25):a.sa.stop());a.i&&Op(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u&&a.u.configure(a.g.ads);a.M&&a.M.configure(a.g.cmcd);a.ea&&a.ea.configure(a.g.cmsd)}p.getConfiguration=function(){var a=Po(this);gn(a,this.g,Po(this));return a};p.yj=function(){return this.Nf}; | |
p.Xh=function(){var a=Po(this);gn(a,this.g,Po(this));return Lm(this.g,Po(this))};p.Th=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.za().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};p.Pk=function(){for(var a in this.g)delete this.g[a];gn(this.g,Po(this),Po(this));iq(this)};p.od=function(){return this.m}; | |
p.Me=function(){return this.i?this.i.type:null};p.Oj=function(){return this.h};p.Db=function(){return this.H};p.nd=function(){return this.U};p.Ie=function(){return this.u?this.u:null};p.T=function(){return this.i&&!this.cb()?this.i.presentationTimeline.T():this.h&&this.h.src?Infinity==this.h.duration:!1};p.Rc=function(){return this.i?this.i.presentationTimeline.Rc():!1}; | |
p.Qc=function(){if(this.i&&!this.cb()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1}; | |
p.za=function(){if(this.i&&!this.cb()){if(!this.Aa&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.fc(),end:a.Mb()}}if(this.h&&this.h.src&&(a=this.h.seekable)&&a.length){var b=this.g?this.g.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.g?this.g.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};p.ek=function(){this.T()&&(this.h.currentTime=this.za().end)};p.ci=function(){return this.Aa}; | |
p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.G?this.G.h:null};p.Pd=function(){return this.G?this.G.Pd():Infinity};p.vg=function(){return this.G?this.G.vg():[]};p.Ke=function(){return this.G?this.G.Ke():{}};p.Se=function(){return this.P?this.P.g==Gi:!1};p.Xa=function(){return this.h?this.L?this.L.i:1:0}; | |
p.Gc=function(a,b){var c=this;b=void 0===b?!0:b;0==a?cb("A trick play rate of 0 is unsupported!"):(this.La.Ua(),this.L.set(a),this.m==Rp&&(this.s.playbackRateChanged(a),jm(this.j,b&&1<Math.abs(a))),this.T()&&this.La.o(this.h,"timeupdate",function(){var d=c.h.currentTime,e=c.za(),f=c.g.streaming.safeSeekOffset;0<a?Math.floor(d)>=Math.floor(e.end)&&c.fd():Math.floor(d)<=Math.floor(e.start+f)&&c.fd()}))}; | |
p.fd=function(){var a=this.L.Mc();this.m==cq&&this.L.set(a);this.m==Rp&&(this.L.set(a),this.s.playbackRateChanged(a),jm(this.j,!1));this.La.Ua()}; | |
p.Ob=function(){if(this.i&&!this.cb()){for(var a=this.j?this.j.j:null,b=[],c=0,d=u(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Jg(e)){var f=Ag(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return Ig(g)}):[]}; | |
p.ic=function(){if(this.i&&!this.cb()){for(var a=this.j?this.j.u:null,b=[],c=u(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Bg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?bq(this).map(function(f){return Gg(f)}):[]};p.Je=function(){var a=this.pe;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Cg(b)})}; | |
p.rj=function(a){var b=this,c,d,e,f;return P(function(g){if(1==g.g){if(b.m!=Rp&&b.m!=cq)return g.return(null);c=b.pe;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.A(2):G(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Xb(function(h){var k=jq(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Jc;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.Ag(a,h.startTime+l*m/k))}}),G(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})}; | |
function jq(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Jc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null} | |
p.Ag=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E;return P(function(C){if(1==C.g){if(c.m!=Rp&&c.m!=cq)return C.return(null);d=c.pe;c.i&&(d=c.i.imageStreams);return(e=d.find(function(B){return B.id==a}))?e.segmentIndex?C.A(2):G(C,e.createSegmentIndex(),2):C.return(null)}f=e.segmentIndex.find(b);if(null==f)return C.return(null);g=e.segmentIndex.get(f);h=jq(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.Jc;n=l/h.rows;q=h.Jc*h.rows;r=g.j-g.startTime; | |
t=g.B||r/q;w=g.startTime;z=v=0;1<q&&(y=Math.floor((b-g.startTime)/t),w=g.startTime+y*t,v=y%h.Jc*m,z=Math.floor(y/h.Jc)*n);A=!1;if(E=g.thumbnailSprite)A=!0,n=E.height,v=E.positionX,z=E.positionY,m=E.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:v,positionY:z,startTime:w,duration:t,uris:g.S(),width:m,sprite:A})})}; | |
p.eh=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.j.u&&(mn(c.B.h,d,!1),mm(c.j,d),kq(c),Yp(c),c.Qb=d.language)}var c=this;if(this.i&&this.I&&(b(),!this.cb()))return;(function(){if(c.h&&c.h.textTracks){var d=bq(c),e=d.find(function(f){return"disabled"!==f.mode});if(d=d.find(function(f){return Eg(f)===a.id}))e!==d&&(e&&(e.mode="disabled",c.l.Ja(e,"cuechange"),c.C.remove(0,Infinity)),d&&eq(c,d)),kq(c),Yp(c)}})()}; | |
function eq(a,b){a.l.o(b,"cuechange",function(){a.C.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c=Array.from(b.activeCues||[]).map(Pn).filter(Xf);a.C.append(c)});b.mode=document.pictureInPictureElement?"showing":"hidden"} | |
p.qf=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&Jg(f)){var g=e.j.j;e.g.abr.enabled&&(g.video!=f.video||g.audio&&f.audio&&g.audio.language==f.audio.language&&g.audio.channelsCount==f.audio.channelsCount)&&cb("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.cb()?Pp(e,f,!1,!1,0):Pp(e,f,!1,b||!1,c||0);e.W=new Ii(f,e.g.mediaSource.codecSwitchingStrategy, | |
e.g.adaptationSetCriteriaFactory);Hp(e)}}var e=this;b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.I&&(d(),!this.cb()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks);f=u(f);for(var g=f.next();!g.done;g=f.next())if(g=g.value,Eg(g)==a.id){lq(e,g);break}}})()};p.tj=function(){return mq(this.Ob())};p.Vj=function(){return mq(this.ic())};p.sj=function(){return Array.from(nq(this.Ob()))};p.Uj=function(){return Array.from(nq(this.ic()))}; | |
p.bh=function(a,b,c,d,e,f){function g(){function k(r,t){return r.video||t.video?r.video&&t.video?Math.abs((r.video.height||0)-(t.video.height||0))+Math.abs((r.video.width||0)-(t.video.width||0)):Infinity:0}h.W=h.g.adaptationSetCriteriaFactory();h.W.configure({language:a,role:b||"",channelCount:c||0,pd:"",spatialAudio:f||!1,videoLayout:"",ed:"",Hd:"",codecSwitchingStrategy:h.g.mediaSource.codecSwitchingStrategy,audioCodec:e||""});var l=h.j.j,m=h.W.create(h.i.variants),n=null;m=u(m.values());for(var q= | |
m.next();!q.done;q=m.next())q=q.value,Jg(q)&&(!n||k(n,l)>k(q,l))&&(n=q);n!=l&&(n?(l=Ag(n),h.qf(l,!0,d||0)):Uo(h))}var h=this;c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;f=void 0===f?!1:f;if(this.i&&this.I&&(g(),!this.cb()))return;(function(){if(h.h&&h.h.audioTracks){var k=Lg(h.Ob(),a,b||"",!1)[0];k&&h.qf(k)}})()}; | |
p.dh=function(a,b,c){function d(){e.Qb=a;e.me=b||"";e.le=c||!1;var f=Lg(e.i.textStreams,e.Qb,e.me,e.le)[0]||null;f&&f!=e.j.u&&(mn(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.Tc())&&(mm(e.j,f),kq(e),Yp(e))}var e=this;c=void 0===c?!1:c;if(this.i&&this.I&&(d(),!this.cb()))return;(function(){var f=Lg(e.ic(),a,b||"",c||!1)[0];f&&e.eh(f)})()}; | |
p.Vk=function(a,b,c){function d(){for(var f=null,g=u(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}null!=f&&(e.W=e.g.adaptationSetCriteriaFactory(),e.W.configure({language:f.language,role:"",channelCount:0,pd:"",spatialAudio:!1,videoLayout:"",label:a,Hd:"",ed:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),Uo(e,b,c))}var e=this;b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.I&&(d(),!this.cb()))return;(function(){if(e.h&&e.h.audioTracks){var f= | |
Array.from(e.h.audioTracks),g=null;f=u(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&lq(e,g)}})()};p.Tc=function(){var a=this.ra;return this.C?this.C.isTextVisible():a};p.Uh=function(){return this.h&&this.h.currentSrc&&this.h.textTracks?oq(this).map(function(a){return Gg(a)}):[]}; | |
p.wg=function(a){if(!this.h||!this.h.currentSrc||!this.h.textTracks)return[];var b=cd(a),c=oq(this).filter(function(h){return cd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=u(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=u(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a}; | |
function bq(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function gq(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function oq(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})} | |
p.tf=function(a){a=!!a;this.ra!=a&&(this.ra=a,this.m==Rp?(this.C.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.u||(a=Lg(this.i.textStreams,this.Qb,this.me,this.le),0<a.length&&(mm(this.j,a[0]),kq(this),Yp(this))):im(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.C.setTextVisibility(a),Xp(this))}; | |
p.Pj=function(){if(this.I)var a=this.I.xe();else{if(null==this.na)return new Date;a=this.na}if(this.i&&!this.cb()){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};p.Yh=function(){if(this.i&&!this.cb()){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null}; | |
p.Oe=function(){return this.T()?this.i?this.i.presentationTimeline.Oe():null:null};p.Yb=function(){if(this.m==Rp)return this.K.Yb();var a={total:[],audio:[],video:[],text:[]};this.m==cq&&(a.total=gj(this.h.buffered));return a};p.Le=function(){if(!this.h)return null;var a=this.Yh().getTime()+1E3*this.h.currentTime;return Date.now()-a}; | |
p.getStats=function(){if(this.m!=Rp&&this.m!=cq)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[], | |
stateHistory:[]};Lp(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.T()){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.I&&(this.B.R=this.I.yh(),this.B.U=this.I.Ah());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.B;var d=Number(c.totalVideoFrames);b.P=Number(c.droppedVideoFrames);b.O=d;this.B.M=Number(c.corruptedVideoFrames)}this.G?(c=this.G,c=c.J?c.J:NaN):c=NaN;this.B.s=c;if(this.m==Rp){c=this.j.j;b=this.j.u;if(c){d=this.L?this.L.i:1; | |
var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.B.B=e}c&&c.video&&(b=this.B,d=c.video.height||NaN,b.m=c.video.width||NaN,b.l=d);this.T()&&(c=this.Le()||0,this.B.C=c/1E3);this.i&&(this.B.I=this.i.periodCount,this.B.H=this.i.gapCount,this.i.presentationTimeline&&(this.B.K=this.i.presentationTimeline.h));c=this.s.getBandwidthEstimate();this.B.u=c}this.m==cq&&(c=this.B,c.Ic=isNaN(c.Ic)?NaN:c.Ic+NaN,c=this.B,b=a.videoHeight||NaN,c.m=a.videoWidth||NaN,c.l=b);var f=this.B;a=f.m;c=f.l;b=f.B;d= | |
f.O;e=f.P;var g=f.M,h=f.U,k=f.R,l=f.u,m=f.i,n=f.G,q=f.J,r=f.j,t=jn(f.g,"playing"),w=jn(f.g,"paused"),v=jn(f.g,"buffering"),z=f.s,y=f.C,A=f.K,E=f.ii,C=f.Ic,B=f.L,D=f.I,I=f.H,F=kn(f.g),L=[];f=u(f.h.g);for(var J=f.next();!J.done;J=f.next())J=J.value,L.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m, | |
loadLatency:n,manifestTimeSeconds:q,drmTimeSeconds:r,playTime:t,pauseTime:w,bufferingTime:v,licenseTime:z,liveLatency:y,maxSegmentDuration:A,manifestSizeBytes:E,bytesDownloaded:C,nonFatalErrorCount:B,manifestPeriodCount:D,manifestGapCount:I,stateHistory:F,switchHistory:L}}; | |
p.ej=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,r,t,w,v,z,y,A,E;return P(function(C){switch(C.g){case 1:if(h.m!=Rp&&h.m!=cq)throw new U(1,7,7004);"subtitles"!=c&&"captions"!=c&&cb("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){C.A(2);break}return G(C,pq(h,a),3);case 3:d=C.h;case 2:k=[];h.u&&(k=h.u.getCuePoints());if(h.m!=cq){C.A(4);break}g&&(c="forced");return G(C,qq(h,a,b,c,d,f||"",k),5);case 5:l=cd(b);m=h.ic();if(n=m.find(function(B){return cd(B.language)== | |
l&&B.label==(f||"")&&B.kind==c}))return Gp(h),C.return(n);throw new U(1,2,2012);case 4:q=Yc;r=h.za();t=r.end-r.start;h.i&&(t=h.i.presentationTimeline.getDuration());if(Infinity==t)throw new U(1,4,4033);if(!k.length){C.A(6);break}return G(C,rq(h,a,h.H,h.g.streaming.retryParameters),7);case 7:w=C.h,v=sq(h,w,d,k),z=new Blob([v],{type:"text/vtt"}),a=ck(z),d="text/vtt";case 6:y={id:h.Lf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:sl(0,t,[a]),mimeType:d|| | |
"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.Oa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Af(d||"",e||"")]),isAudioMuxedInVideo:!1};A=Af(y.mimeType,y.codecs);E=Of(A);if(!E)throw new U(2,2,2014,d);h.i.textStreams.push(y);Gp(h);return C.return(Bg(y))}})}; | |
p.fj=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E;return P(function(C){switch(C.g){case 1:if(c.m!=Rp&&c.m!=cq)throw new U(1,7,7004);if(b){C.A(2);break}return G(C,pq(c,a),3);case 3:b=C.h;case 2:if("text/vtt"!=b)throw new U(1,2,2017,a);d=Yc;e=c.za();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(Infinity==f)throw new U(1,4,4045);return G(C,rq(c,a,c.H,c.g.streaming.retryParameters),4);case 4:g=C.h;h=Pf[b];if(!h)throw new U(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0, | |
segmentEnd:f,vttOffset:0};m=Mb(g);n=k.parseMedia(m,l,a,[]);q=[];r=u(n);t=r.next();for(w={};!t.done;w={Ef:void 0,jd:void 0},t=r.next())w.jd=t.value,w.Ef=null,v=function(B){return function(){null==B.Ef&&(B.Ef=Qc([a],[B.jd.payload]));return B.Ef||[]}}(w),z=new Zi(w.jd.startTime,w.jd.endTime,v,0,null,null,0,0,Infinity),w.jd.payload.includes("#xywh")&&(y=w.jd.payload.split("#xywh=")[1].split(","),4===y.length&&z.vf({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2], | |
10)})),q.push(z);A=b;if(!q.length){C.A(5);break}return G(C,In(q[0].S()[0],c.H,c.g.manifest.retryParameters),6);case 6:A=C.h;case 5:return E={id:c.Lf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ql(q),mimeType:A||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Mf,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null, | |
spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Af(A||"","")]),isAudioMuxedInVideo:!1},c.m==cq?c.pe.push(E):c.i.imageStreams.push(E),Gp(c),C.return(Cg(E))}})}; | |
p.dj=function(a,b,c){var d=this,e,f,g,h;return P(function(k){switch(k.g){case 1:if(d.m!=Rp&&d.m!=cq)throw new U(1,7,7004);if(c){k.A(2);break}return G(k,pq(d,a),3);case 3:c=k.h;case 2:return e=[],d.u&&(e=d.u.getCuePoints()),G(k,qq(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Uh();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return G(k,new Promise(function(l,m){d.l.oa(f,"load",l);d.l.oa(f,"error",function(){m(new U(1,2,2015))})}),6);case 6:return Gp(d),k.return(h);case 5:throw new U(1, | |
2,2012);}})};function pq(a,b){var c;return P(function(d){switch(d.g){case 1:return ta(d,2),G(d,In(b,a.H,a.g.streaming.retryParameters),4);case 4:c=d.h;wa(d,3);break;case 2:ya(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})} | |
function qq(a,b,c,d,e,f,g){var h,k,l,m;return P(function(n){if(1==n.g)return"text/vtt"!=e||g.length?G(n,rq(a,b,a.H,a.g.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=sq(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=ck(l),e="text/vtt");m=document.createElement("track");var q=a.M,r=b;try{if(q.g.enabled){var t=oo(q);t.ot=Co;t.su=!0;var w=so(t);var v=to(r,w)}else v=r}catch(z){db("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),v=r}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")|| | |
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function rq(a,b,c,d){var e,f,g;return P(function(h){if(1==h.g){e=qh;f=kh([b],d);f.method="GET";var k=a.M;try{k.g.enabled&&uo(k,f,{ot:Co,su:!0})}catch(l){db("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return G(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})} | |
function sq(a,b,c,d){var e=Pf[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Mb(b),b=c.parseMedia(b,a,null,[]),co(b,d);throw new U(2,2,2014,c);}p.al=function(a,b){this.ka.width=a;this.ka.height=b};p.$g=function(a){if(this.m==Rp){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.C)b=!1;else{for(var c=u(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Td||d.$a||d.Ab||(d.Td=!1,hm(b,d,a));b=!0}}else b=!1;return b}; | |
p.yg=function(){cb("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};p.Lj=function(){return this.Za}; | |
p.Ej=function(){var a={video:null,audio:null,text:null};if(this.m!=Rp)return a;var b=this.j.j,c=this.h.currentTime;b=u([b.video,b.audio,this.j.u]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};"video"==d.type?(e.width=d.width,e.height=d.height,a.video=e):"audio"==d.type?a.audio=e:d.type==Wc&&(a.text=e)}return a}; | |
function Po(a){var b=bn();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.$g(d))}};b.textDisplayFactory=function(){return!a.If||rc()&&!document.fullscreenEnabled?HTMLMediaElement.prototype.addTextTrack?new Qn(a.h,"Shaka Player TextTrack"):new Tn:new Un(a.h,a.If)};return b}p.mh=function(a){this.If=a}; | |
function Cp(a,b){for(var c=new Set,d=u(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=u(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=u(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new tl,l=e.closedCaptions.get(g);h={id:a.Lf++,originalId:g,groupId:null, | |
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Wc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Af(h,"")]),isAudioMuxedInVideo:!1};b.textStreams.push(h);c.add(g)}} | |
function Vp(a,b){var c,d,e,f,g;return P(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return P(function(r){if(1==r.g)return k?k.segmentIndex?r.A(2):G(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.ec(l))?m.next().value:null;if(!n)return r.return(null);q=n.startTime;return r.return(q)})},G(h,e(c,b),2);if(3!=h.g)return f=h.h,G(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})} | |
function sp(a){var b=a.Se();if(a.B&&a.P&&a.I){if(0==a.g.streaming.rebufferingGoal){var c=a.L;c.j=!1;vl(c)}else c=a.L,c.j=b,vl(c);a.M&&(c=a.M,b||c.u||(c.u=!0),c.u&&b&&(c.C=!0),c.H=b);Lp(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.we<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.R&&(a.R=Math.min(a.R+ | |
++a.we*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(Xo("buffering",b))}function Lp(a){if(a.B&&a.P){var b=a.B.g,c="playing";a.P.g==Gi?c="buffering":a.isEnded()?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(Xo("statechanged",c)))}} | |
function $p(a){var b=a.h.playbackRate,c=a.T();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Th();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Gc(d,!1):1==e&&b!==a.L.Mc()&&a.fd()}if(c&&(c=a.za(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold; | |
if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency? | |
k=Math.max(0,a.i.serviceDescription.targetLatency-d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.R||"number"!==typeof g||(a.R=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Ka&&null!==a.R&&"number"===typeof g&&a.we<n&&Date.now()-a.Ka>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency, | |
a.R=Math.max(a.R-(g-f)/2,f+d),a.Ka=Date.now());e&&null!==a.R&&(h=a.R+d,k=a.R-d);g=c.end-a.h.currentTime;d=0;a.m==cq&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.P.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.Gc(m,!1):void 0!=h&&l&&g-d>h?(b!=l&&a.Gc(l,!1),a.Ka=null):void 0!=k&&m&&g-d<k?(b!=m&&a.Gc(m,!1),a.Ka=null):b!==a.L.Mc()&&(a.fd(),a.Ka=Date.now())}} | |
function aq(a){if(a.h){var b=function(e,f){var g=void 0===g?Number.EPSILON:g;if(e===f)g=!0;else{var h=Math.abs(e-f);g=h<=g?!0:g!==Number.EPSILON?Math.abs(h-g)<=Number.EPSILON:!1}return(g||f>e)&&a.Kf<e?(a.Kf=e,!0):!1},c=a.za();c=c.end-c.start;c=0<c?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=Xo("started");else b(25,c)?d=Xo("firstquartile"):b(50,c)?d=Xo("midpoint"):b(75,c)?d=Xo("thirdquartile"):(b(100,c)&&(d=Xo("complete")),a.g&&Infinity!=a.g.playRangeEnd&&a.isEnded()&&a.h.pause());d&& | |
a.dispatchEvent(d)}}}function Hp(a){try{Oi(a.Hf,a.i)}catch(c){return qp(a,c),!1}var b=Kg(a.i.variants);b=a.W.create(b);a.s.setVariants(Array.from(b.values()));return!0}function Uo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=Hp(a)?a.s.chooseVariant():null)&&Pp(a,f,e,b,c,d)} | |
function Pp(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&lm(a.j,b,d,e,!0);else{var h=a.B.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));lm(a.j,b,d,e,f,c);d=null;g&&(d=Ag(g));b=Ag(b);b.active=!0;c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.O&&Yj(a.O,b,a.Me()),c=Xo("adaptation",c),tq(a,c)):uq(a,d,b)}} | |
function lq(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=Ig(c),b=Ig(b),uq(a,c,b))}function Wp(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=cd(a.g.preferredTextLanguage);c=cd(c.language);if(2==a.g.autoShowText)return bd(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=cd(b.language);return bd(c,d)&&!bd(a,c)}cb("Invalid autoShowText setting!");return!1} | |
function Gp(a){var b=Xo("trackschanged");tq(a,b)}function uq(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.O&&Yj(a.O,c,a.Me());c=Xo("variantchanged",b);tq(a,c)}function kq(a){var b=Xo("textchanged");tq(a,b)}function Xp(a){var b=Xo("texttrackvisibility");tq(a,b)}function Zp(a){a.g.abr.enabled||To(a);var b=(new Map).set("newStatus",a.g.abr.enabled);tq(a,Xo("abrstatuschanged",b))} | |
function Yp(a){var b=a.ic().find(function(c){return c.active});b&&a.C&&a.C.setTextLanguage&&a.C.setTextLanguage(b.language)}function To(a,b){b=void 0===b?!0:b;if(a.m==Rp){a.Jf.stop();for(var c=u(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Hp(a)}} | |
p.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===lp||!navigator.onLine||0==b||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?"audio"==a.type?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=u(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.Jf.xa(1);b=this.Yb().video.reduce(function(h, | |
k){return h+k.end-k.start},0);Uo(this,!1,b,!0,!1);return!0}return!1}; | |
function qp(a,b){var c,d,e,f;return P(function(g){switch(g.g){case 1:if(a.m==lp)return g.return();1===b.severity&&a.B.L++;c=!0;if(!(a.Aa&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){g.A(2);break}ta(g,3);return G(g,om(a.j),5);case 5:d=g.h;c=!d;d&&(e=Xo("mediasourcerecovered"),a.dispatchEvent(e));wa(g,2);break;case 3:ya(g),c=!0;case 2:if(!c)return g.return();2===b.severity&&To(a,!1);f=Xo("error",(new Map).set("detail",b));a.dispatchEvent(f);f.defaultPrevented&&(b.handled=!0); | |
H(g)}})}p.addFont=function(a,b){var c,d,e,f,g;return P(function(h){if(1==h.g)return"fonts"in document&&"FontFace"in window?G(h,document.fonts.ready,3):h.A(0);if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();!1===m.done;)l.push(m.value),m=k.next();return l};d=u(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family==a&&"swap"==f.display)return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);H(h)})}; | |
function Ep(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(Xo(b,a))} | |
function Fp(a,b,c,d){d=void 0===d?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(Xo(d?"audiotrackchanged":"mediaqualitychanged",b))} | |
function pp(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new U(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new U(2,3,3016,c,b,a.h.error.message)}function Op(a,b,c){0<b&&(a.T()||a.Mi(b));b=a.getDuration();c<b&&(a.T()||a.sb(c))}function tq(a,b){P(function(c){if(1==c.g)return G(c,Promise.resolve(),2);a.m!=lp&&a.dispatchEvent(b);H(c)})} | |
function nq(a){var b=new Set;a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(cd(c.language)):b.add("und");return b} | |
function mq(a){var b=new Map,c=new Map;a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=cd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=u(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=u(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m)); | |
h.push({language:l,role:m,label:n})}});return h}p.cb=function(){return this.h&&this.h.remote?"disconnected"!=this.h.remote.state:!1};p.isEnded=function(){return!this.h||this.h.ended?!0:this.Aa&&!this.T()&&this.h.currentTime>=this.za().end};S("shaka.Player",Y);Y.prototype.isEnded=Y.prototype.isEnded;Y.prototype.isRemotePlayback=Y.prototype.cb;Y.prototype.addFont=Y.prototype.addFont;Y.prototype.setVideoContainer=Y.prototype.mh;Y.prototype.getFetchedPlaybackInfo=Y.prototype.Ej; | |
Y.prototype.getManifestParserFactory=Y.prototype.Lj;Y.prototype.getManifest=Y.prototype.yg;Y.prototype.retryStreaming=Y.prototype.$g;Y.prototype.setMaxHardwareResolution=Y.prototype.al;Y.prototype.addChaptersTrack=Y.prototype.dj;Y.prototype.addThumbnailsTrack=Y.prototype.fj;Y.prototype.addTextTrackAsync=Y.prototype.ej;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getBufferedInfo=Y.prototype.Yb;Y.prototype.getSegmentAvailabilityDuration=Y.prototype.Oe; | |
Y.prototype.getPresentationStartTimeAsDate=Y.prototype.Yh;Y.prototype.getPlayheadTimeAsDate=Y.prototype.Pj;Y.prototype.setTextTrackVisibility=Y.prototype.tf;Y.prototype.getChapters=Y.prototype.wg;Y.prototype.getChaptersTracks=Y.prototype.Uh;Y.prototype.isTextTrackVisible=Y.prototype.Tc;Y.prototype.selectVariantsByLabel=Y.prototype.Vk;Y.prototype.selectTextLanguage=Y.prototype.dh;Y.prototype.selectAudioLanguage=Y.prototype.bh;Y.prototype.getTextLanguages=Y.prototype.Uj; | |
Y.prototype.getAudioLanguages=Y.prototype.sj;Y.prototype.getTextLanguagesAndRoles=Y.prototype.Vj;Y.prototype.getAudioLanguagesAndRoles=Y.prototype.tj;Y.prototype.selectVariantTrack=Y.prototype.qf;Y.prototype.selectTextTrack=Y.prototype.eh;Y.prototype.getThumbnails=Y.prototype.Ag;Y.prototype.getAllThumbnails=Y.prototype.rj;Y.prototype.getImageTracks=Y.prototype.Je;Y.prototype.getTextTracks=Y.prototype.ic;Y.prototype.getVariantTracks=Y.prototype.Ob;Y.prototype.cancelTrickPlay=Y.prototype.fd; | |
Y.prototype.trickPlay=Y.prototype.Gc;Y.prototype.getPlaybackRate=Y.prototype.Xa;Y.prototype.isBuffering=Y.prototype.Se;Y.prototype.getKeyStatuses=Y.prototype.Ke;Y.prototype.getActiveSessionsMetadata=Y.prototype.vg;Y.prototype.getExpiration=Y.prototype.Pd;Y.prototype.drmInfo=Y.prototype.drmInfo;Y.prototype.keySystem=Y.prototype.keySystem;Y.prototype.isFullyLoaded=Y.prototype.ci;Y.prototype.goToLive=Y.prototype.ek;Y.prototype.seekRange=Y.prototype.za;Y.prototype.isAudioOnly=Y.prototype.Qc; | |
Y.prototype.isInProgress=Y.prototype.Rc;Y.prototype.isLive=Y.prototype.T;Y.prototype.getAdManager=Y.prototype.Ie;Y.prototype.getAssetUri=Y.prototype.nd;Y.prototype.getNetworkingEngine=Y.prototype.Db;Y.prototype.getMediaElement=Y.prototype.Oj;Y.prototype.getManifestType=Y.prototype.Me;Y.prototype.getLoadMode=Y.prototype.od;Y.prototype.resetConfiguration=Y.prototype.Pk;Y.prototype.getBufferFullness=Y.prototype.Th;Y.prototype.getNonDefaultConfiguration=Y.prototype.Xh; | |
Y.prototype.getConfigurationForLowLatency=Y.prototype.yj;Y.prototype.getConfiguration=Y.prototype.getConfiguration;Y.prototype.configurationForLowLatency=Y.prototype.oj;Y.prototype.configure=Y.prototype.configure;Y.prototype.releaseAllMutexes=Y.prototype.Lk;Y.prototype.destroyAllPreloads=Y.prototype.eg;Y.prototype.preload=Y.prototype.preload;Y.prototype.detachAndSavePreload=Y.prototype.Ph;Y.prototype.unloadAndSavePreload=Y.prototype.jl;Y.prototype.load=Y.prototype.load; | |
Y.prototype.updateStartTime=Y.prototype.ql;Y.prototype.unload=Y.prototype.sc;Y.prototype.detach=Y.prototype.detach;Y.prototype.attachCanvas=Y.prototype.Dh;Y.prototype.attach=Y.prototype.ac; | |
Y.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:b={};if(!a){k.A(2);break}return G(k,yi(),3);case 3:b=k.h;case 2:var l={};if(bc())for(var m in Si)l[m]=!0;m=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=bc()?!!Si[n]:cc(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(Bf)); | |
l={};m=u(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Of(n)?!0:bc()?zd(n)||(uf(n)?!0:!1):cc(n);var q=n.split(";")[0];l[q]=l[q]||l[n]}d=l;return G(k,zc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=vq;for(h in g)f[h]=g[h]();return k.return(f)}})};Y.isBrowserSupported=mp;Y.setAdManagerFactory=function(a){So=a};Y.registerSupportPlugin=function(a,b){vq[a]=b};Y.prototype.destroy=Y.prototype.destroy;var lp=0,Oo=1,Rp=2,cq=3; | |
Y.LoadMode={DESTROYED:lp,NOT_LOADED:Oo,MEDIA_SOURCE:Rp,SRC_EQUALS:cq};Y.version="v4.13.0";var wq=["4","13"];Ed=new function(a){this.g=a;this.i=Fd;this.h=Gd}(new Cd(Number(wq[0]),Number(wq[1])));var vq={},So=null;function xq(){this.g=[];this.i=this.l=this.j=this.h=0}function yq(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function zq(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new td;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=zq.prototype;p.needsSkipUI=function(){return!1};p.isClientRendering=function(){return!0};p.isUsingAnotherMediaElement=function(){return!0};p.getDuration=function(){return this.g.getDuration()};p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()}; | |
p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};p.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()}; | |
p.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};p.isMuted=function(){return 0==this.h.getVolume()};p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};p.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)}; | |
p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()}; | |
p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",zq);zq.prototype.release=zq.prototype.release; | |
zq.prototype.getPodIndex=zq.prototype.getPodIndex;zq.prototype.getTimeOffset=zq.prototype.getTimeOffset;zq.prototype.getMediaUrl=zq.prototype.getMediaUrl;zq.prototype.getAdvertiserName=zq.prototype.getAdvertiserName;zq.prototype.getCreativeAdId=zq.prototype.getCreativeAdId;zq.prototype.getAdId=zq.prototype.getAdId;zq.prototype.getVastMediaWidth=zq.prototype.getVastMediaWidth;zq.prototype.getVastMediaHeight=zq.prototype.getVastMediaHeight;zq.prototype.getVastMediaBitrate=zq.prototype.getVastMediaBitrate; | |
zq.prototype.getDescription=zq.prototype.getDescription;zq.prototype.getTitle=zq.prototype.getTitle;zq.prototype.getPositionInSequence=zq.prototype.getPositionInSequence;zq.prototype.getSequenceLength=zq.prototype.getSequenceLength;zq.prototype.setMuted=zq.prototype.setMuted;zq.prototype.resize=zq.prototype.resize;zq.prototype.isLinear=zq.prototype.isLinear;zq.prototype.isMuted=zq.prototype.isMuted;zq.prototype.setVolume=zq.prototype.setVolume;zq.prototype.getVolume=zq.prototype.getVolume; | |
zq.prototype.play=zq.prototype.play;zq.prototype.pause=zq.prototype.pause;zq.prototype.skip=zq.prototype.skip;zq.prototype.canSkipNow=zq.prototype.canSkipNow;zq.prototype.getTimeUntilSkippable=zq.prototype.getTimeUntilSkippable;zq.prototype.isSkippable=zq.prototype.isSkippable;zq.prototype.isPaused=zq.prototype.isPaused;zq.prototype.getRemainingTime=zq.prototype.getRemainingTime;zq.prototype.getMinSuggestedDuration=zq.prototype.getMinSuggestedDuration;zq.prototype.getDuration=zq.prototype.getDuration; | |
zq.prototype.isUsingAnotherMediaElement=zq.prototype.isUsingAnotherMediaElement;zq.prototype.isClientRendering=zq.prototype.isClientRendering;zq.prototype.needsSkipUI=zq.prototype.needsSkipUI;function Aq(){} | |
function Bq(a,b){var c=[];a=u(me(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=qe(d.value,"InLine"))if(d=qe(d,"Creatives")){d=u(me(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=qe(e,"Linear");f&&Cq(c,b,f);if(e=qe(e,"NonLinearAds")){e=me(e,"NonLinear");e=u(e);for(var g=e.next();!g.done;g=e.next())a:{f=c;var h=b,k=g.value,l=qe(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=qe(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=oe(l)){"text/html"===g&&(l="data:text/html;charset=UTF-8,"+ | |
encodeURIComponent(l));var m=we(k,"width",Ce)||we(k,"expandedWidth",Ce),n=we(k,"height",Ce)||we(k,"expandedHeight",Ce);if(m||n){var q=null;(k=k.attributes.minSuggestedDuration)&&(q=ae(k));k=0;null!=h&&(k=h);f.push({id:null,groupId:null,startTime:k,endTime:null,uri:l,mimeType:g,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:q,once:!0,pre:null==h,post:Infinity==h,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:m||0,y:n||0}}})}}}}}}return c} | |
function Cq(a,b,c){var d=0;null!=b&&(d=b);var e=null;c.attributes.skipoffset&&(e=ae(c.attributes.skipoffset),isNaN(e)&&(e=null));if(c=qe(c,"MediaFiles")){var f=me(c,"MediaFile");c=f;f=f.filter(function(h){return"streaming"==h.attributes.delivery});f.length&&(c=f);c=c.sort(function(h,k){return(parseInt(k.attributes.height,10)||0)-(parseInt(h.attributes.height,10)||0)});c=u(c);for(f=c.next();!f.done;f=c.next())if(f=f.value,!f.attributes.apiFramework){var g=oe(f);if(g){a.push({id:null,groupId:null,startTime:d, | |
endTime:null,uri:g,mimeType:f.attributes.type||null,isSkippable:null!=e,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1,loop:!1,overlay:null});break}}}}S("shaka.ads.Utils",Aq);Aq.ADS_LOADED="ads-loaded";Aq.AD_STARTED="ad-started";Aq.AD_FIRST_QUARTILE="ad-first-quartile";Aq.AD_MIDPOINT="ad-midpoint";Aq.AD_THIRD_QUARTILE="ad-third-quartile";Aq.AD_COMPLETE="ad-complete";Aq.AD_STOPPED="ad-stopped";Aq.AD_SKIPPED="ad-skipped"; | |
Aq.AD_VOLUME_CHANGED="ad-volume-changed";Aq.AD_MUTED="ad-muted";Aq.AD_PAUSED="ad-paused";Aq.AD_RESUMED="ad-resumed";Aq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Aq.CUEPOINTS_CHANGED="ad-cue-points-changed";Aq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Aq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Aq.AD_CLICKED="ad-clicked";Aq.AD_PROGRESS="ad-progress";Aq.AD_BUFFERING="ad-buffering";Aq.AD_IMPRESSION="ad-impression";Aq.AD_DURATION_CHANGED="ad-duration-changed";Aq.AD_CLOSED="ad-closed"; | |
Aq.AD_LOADED="ad-loaded";Aq.ALL_ADS_COMPLETED="all-ads-completed";Aq.AD_LINEAR_CHANGED="ad-linear-changed";Aq.AD_METADATA="ad-metadata";Aq.AD_RECOVERABLE_ERROR="ad-recoverable-error";Aq.AD_ERROR="ad-error";Aq.AD_BREAK_READY="ad-break-ready";Aq.AD_INTERACTION="ad-interaction";Aq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Aq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Aq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Dq(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.H=!1;this.B=this.s=null;this.I=NaN;this.l=e;this.j=null;this.h=new td;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.u,this.i);this.G.initialize();this.m=new google.ima.AdsLoader(this.G);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.13.0");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m, | |
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Eq(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Fq(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.oa(this.i,"play",function(){f.H=!0})}Dq.prototype.configure=function(a){this.s=a};Dq.prototype.stop=function(){this.g&&this.g.stop();this.u&&lj(this.u)}; | |
Dq.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.G.destroy()};function Fq(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new T("ad-error",b));Gq(a,null);a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))} | |
function Eq(a,b){a.l(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.C);a.l(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager", | |
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=u(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Hq(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Iq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Iq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth, | |
a.i.offsetHeight,Iq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Iq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.H||a.s.skipPlayDetection?a.g.start():a.h.oa(a.i,"play",function(){a.H=!0;a.g.start()})}catch(f){Gq(a,null)}} | |
function Iq(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1} | |
function Hq(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new T(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Fq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Jq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Jq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE, | |
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Gq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Gq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")}); | |
a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")}); | |
a.h.o(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g, | |
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})} | |
function Jq(a,b){var c=b.getAd();c?(a.j=new zq(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.s.supportsMultipleMediaElements||a.l(new T("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new T("ad-started",b)),a.j.isLinear()&&(a.u.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):cb("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")} | |
function Gq(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.s.supportsMultipleMediaElements&&a.l(new T("ad-content-resume-requested"));a.l(new T("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.u.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function Kq(a,b,c,d,e,f){this.g=a;this.i=b;this.j=(this.h=b.isSkippable)?b.skipOffset||0:b.skipOffset;this.l=b.skipFor;this.B=c;this.s=d;this.m=e;this.u=f;this.C=b.overlay}p=Kq.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.isUsingAnotherMediaElement=function(){return this.u};p.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};p.getMinSuggestedDuration=function(){return this.getDuration()}; | |
p.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return this.h&&null!=this.l?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h};p.getTimeUntilSkippable=function(){if(this.isSkippable()){var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)}return Math.max(this.getRemainingTime(),0)};p.canSkipNow=function(){return this.h&&0==this.getTimeUntilSkippable()}; | |
p.skip=function(){this.canSkipNow()&&this.B()};p.pause=function(){return this.g.pause()};p.play=function(){return this.g.play()};p.getVolume=function(){return this.g.volume};p.setVolume=function(a){this.g.volume=a};p.isMuted=function(){return this.g.muted};p.isLinear=function(){return null==this.C};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.s};p.getPositionInSequence=function(){return this.m};p.getTitle=function(){return""}; | |
p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};p.getVastMediaWidth=function(){return 0};p.getAdId=function(){return this.i.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.i.uri};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){this.g=null};S("shaka.ads.InterstitialAd",Kq);Kq.prototype.release=Kq.prototype.release; | |
Kq.prototype.getPodIndex=Kq.prototype.getPodIndex;Kq.prototype.getTimeOffset=Kq.prototype.getTimeOffset;Kq.prototype.getMediaUrl=Kq.prototype.getMediaUrl;Kq.prototype.getAdvertiserName=Kq.prototype.getAdvertiserName;Kq.prototype.getCreativeAdId=Kq.prototype.getCreativeAdId;Kq.prototype.getAdId=Kq.prototype.getAdId;Kq.prototype.getVastMediaWidth=Kq.prototype.getVastMediaWidth;Kq.prototype.getVastMediaHeight=Kq.prototype.getVastMediaHeight;Kq.prototype.getVastMediaBitrate=Kq.prototype.getVastMediaBitrate; | |
Kq.prototype.getDescription=Kq.prototype.getDescription;Kq.prototype.getTitle=Kq.prototype.getTitle;Kq.prototype.getPositionInSequence=Kq.prototype.getPositionInSequence;Kq.prototype.getSequenceLength=Kq.prototype.getSequenceLength;Kq.prototype.setMuted=Kq.prototype.setMuted;Kq.prototype.resize=Kq.prototype.resize;Kq.prototype.isLinear=Kq.prototype.isLinear;Kq.prototype.isMuted=Kq.prototype.isMuted;Kq.prototype.setVolume=Kq.prototype.setVolume;Kq.prototype.getVolume=Kq.prototype.getVolume; | |
Kq.prototype.play=Kq.prototype.play;Kq.prototype.pause=Kq.prototype.pause;Kq.prototype.skip=Kq.prototype.skip;Kq.prototype.canSkipNow=Kq.prototype.canSkipNow;Kq.prototype.getTimeUntilSkippable=Kq.prototype.getTimeUntilSkippable;Kq.prototype.isSkippable=Kq.prototype.isSkippable;Kq.prototype.isPaused=Kq.prototype.isPaused;Kq.prototype.getRemainingTime=Kq.prototype.getRemainingTime;Kq.prototype.getMinSuggestedDuration=Kq.prototype.getMinSuggestedDuration;Kq.prototype.getDuration=Kq.prototype.getDuration; | |
Kq.prototype.isUsingAnotherMediaElement=Kq.prototype.isUsingAnotherMediaElement;Kq.prototype.isClientRendering=Kq.prototype.isClientRendering;Kq.prototype.needsSkipUI=Kq.prototype.needsSkipUI;function Lq(a,b,c){this.g=a;this.j=b;this.h=c;this.i=null==a.overlay}p=Lq.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return-1};p.isPaused=function(){return!1};p.isSkippable=function(){return!1};p.getTimeUntilSkippable=function(){return 0};p.canSkipNow=function(){return!1}; | |
p.skip=function(){};p.pause=function(){};p.play=function(){};p.getVolume=function(){return 1};p.setVolume=function(){};p.isMuted=function(){return!1};p.isLinear=function(){return this.i};p.resize=function(){};p.setMuted=function(){};p.getSequenceLength=function(){return this.j};p.getPositionInSequence=function(){return this.h};p.getTitle=function(){return""};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0}; | |
p.getVastMediaWidth=function(){return 0};p.getAdId=function(){return this.g.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.g.uri};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){};S("shaka.ads.InterstitialStaticAd",Lq);Lq.prototype.release=Lq.prototype.release;Lq.prototype.getPodIndex=Lq.prototype.getPodIndex;Lq.prototype.getTimeOffset=Lq.prototype.getTimeOffset; | |
Lq.prototype.getMediaUrl=Lq.prototype.getMediaUrl;Lq.prototype.getAdvertiserName=Lq.prototype.getAdvertiserName;Lq.prototype.getCreativeAdId=Lq.prototype.getCreativeAdId;Lq.prototype.getAdId=Lq.prototype.getAdId;Lq.prototype.getVastMediaWidth=Lq.prototype.getVastMediaWidth;Lq.prototype.getVastMediaHeight=Lq.prototype.getVastMediaHeight;Lq.prototype.getVastMediaBitrate=Lq.prototype.getVastMediaBitrate;Lq.prototype.getDescription=Lq.prototype.getDescription;Lq.prototype.getTitle=Lq.prototype.getTitle; | |
Lq.prototype.getPositionInSequence=Lq.prototype.getPositionInSequence;Lq.prototype.getSequenceLength=Lq.prototype.getSequenceLength;Lq.prototype.setMuted=Lq.prototype.setMuted;Lq.prototype.resize=Lq.prototype.resize;Lq.prototype.isLinear=Lq.prototype.isLinear;Lq.prototype.isMuted=Lq.prototype.isMuted;Lq.prototype.setVolume=Lq.prototype.setVolume;Lq.prototype.getVolume=Lq.prototype.getVolume;Lq.prototype.play=Lq.prototype.play;Lq.prototype.pause=Lq.prototype.pause;Lq.prototype.skip=Lq.prototype.skip; | |
Lq.prototype.canSkipNow=Lq.prototype.canSkipNow;Lq.prototype.getTimeUntilSkippable=Lq.prototype.getTimeUntilSkippable;Lq.prototype.isSkippable=Lq.prototype.isSkippable;Lq.prototype.isPaused=Lq.prototype.isPaused;Lq.prototype.getRemainingTime=Lq.prototype.getRemainingTime;Lq.prototype.getMinSuggestedDuration=Lq.prototype.getMinSuggestedDuration;Lq.prototype.getDuration=Lq.prototype.getDuration;Lq.prototype.isUsingAnotherMediaElement=Lq.prototype.isUsingAnotherMediaElement; | |
Lq.prototype.isClientRendering=Lq.prototype.isClientRendering;Lq.prototype.needsSkipUI=Lq.prototype.needsSkipUI;function Mq(a,b,c,d){function e(){if(!f.K&&f.m&&!f.C.cb()){f.m=f.h.currentTime;f.u&&!f.u.pre&&!f.u.post&&f.m<f.u.startTime&&(f.u=null);var k=Nq(f);k&&Oq(f,k,1,1,Date.now())}}var f=this;this.P=null;this.I=a;this.C=b;this.h=c;this.J=null;this.B=!0;this.g=this.h;this.i=d;this.L=new Set;this.H=new Set;this.G=new Map;this.j=new Y;Pq(this);this.M=new td;this.l=new td;this.K=!1;this.U=this.s=this.u=this.m=null;this.M.o(this.h,"timeupdate",function(){if(!(f.K||f.m||f.C.cb())){f.m=f.h.currentTime;var k=Nq(f, | |
!0);k&&Oq(f,k,1,1,Date.now())}});this.M.o(this.h,"ended",function(){e()});this.O=new ac(e);if("requestVideoFrameCallback"in this.h&&!vc()){var g=this.h,h=function(){e();g.requestVideoFrameCallback(h)};g.requestVideoFrameCallback(h)}else this.O.xa(.025);this.R=(new ac(function(){var k,l,m,n,q,r,t,w,v,z,y;return P(function(A){switch(A.g){case 1:if(!f.H.size||null==f.m){A.A(0);break}k=f.C.od();if(k==lp||k==Oo)return A.return();l=!1;m=Array.from(f.H);n=f.C.za();q=u(m);r=q.next();case 3:if(r.done){A.A(5); | |
break}t=r.value;if(t==f.u){A.A(4);break}w=t.endTime||t.startTime;if(!(1<=n.start-w)){v=t.startTime-f.m;0<v&&10>=v&&!f.G.has(t)&&Qq(t)&&f.G.set(t,f.j.preload(t.uri,null,t.mimeType||void 0));A.A(4);break}if(!f.G.has(t)){A.A(7);break}return G(A,f.G.get(t),8);case 8:(z=A.h)&&z.destroy(),f.G.delete(t);case 7:y=JSON.stringify(t),f.L.has(y)&&f.L.delete(y),f.H.delete(t),t.overlay||(l=!0);case 4:r=q.next();A.A(3);break;case 5:l&&Rq(f),H(A)}})})).xa(1)}p=Mq.prototype;p.configure=function(a){this.P=a;Sq(this)}; | |
function Sq(a){if(a.I&&a.P&&!a.K){var b=a.P.supportsMultipleMediaElements,c=a.h;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.B==b&&(a.B=!b,a.B?(a.g=a.h,a.J&&(a.J.parentElement&&a.I.removeChild(a.J),a.J=null)):(a.J||(b=document.createElement(a.h.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.backgroundColor="rgb(0, 0, 0)",b.style.display="none",b.setAttribute("playsinline",""),a.J=b),a.g=a.J))}} | |
p.stop=function(){this.l&&this.l.Ua();this.L.clear();this.H.clear();this.j.eg();this.G.clear();this.j.detach();this.K=!1;this.u=this.m=null;this.B=!0;this.g=this.h;this.J=null;this.I&&lj(this.I);this.s&&(this.s.stop(),this.s=null)};p.release=function(){this.stop();this.M&&this.M.release();this.l&&this.l.release();this.O&&(this.O.stop(),this.O=null);this.R&&(this.R.stop(),this.R=null);this.j.destroy()};p.vc=function(){return this.j}; | |
function Tq(a,b){var c;P(function(d){if(1==d.g)return Pq(a),G(d,Uq(a,b),2);c=d.h;c.length?Vq(a,c):cb("Unsupported HLS interstitial",b);H(d)})} | |
function Wq(a,b){var c=qe(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f="true"==c.attributes.loop;if(d&&e){var g={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920,y:1080}},h=qe(c,"Viewport"),k=qe(c,"TopLeft");c=qe(c,"Size");if(h&&k&&c){g=we(h,"x",Ce);if(null==g)return;h=we(h,"y",Ce);if(null==h)return;var l=we(k,"x",Ce);if(null==l)return;k=we(k,"y",Ce);if(null==k)return;var m=we(c,"x",Ce);if(null==m)return;c=we(c,"y",Ce);if(null==c)return;g={viewport:{x:g,y:h},topLeft:{x:l, | |
y:k},size:{x:m,y:c}}}Vq(a,[{id:b.id,groupId:null,startTime:b.startTime,endTime:b.endTime,uri:d,mimeType:e,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:f,overlay:g}])}} | |
p.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:return c={type:12},G(n,Xq(b,a,c),2);case 2:d=n.h;e=ee(d,"VAST,vmap:VMAP");if(!e)throw new U(2,10,10007);f=[];if("VAST"==e.tagName){f=Bq(e,b.m);n.A(3);break}if("vmap:VMAP"!=e.tagName){n.A(3);break}for(var q=[],r=u(me(e,"vmap:AdBreak")),t=r.next();!t.done;t=r.next()){var w=t.value,v=w.attributes.timeOffset;v&&(t=null,"start"==v?t=0:"end"==v?t=Infinity:t=ae(v),(w=qe(w,"vmap:AdSource"))&&(w=qe(w,"vmap:AdTagURI"))&& | |
(w=ne(w))&&q.push({time:t,uri:w}))}g=u(q);h=g.next();case 5:if(h.done){n.A(3);break}k=h.value;return G(n,Xq(b,k.uri,c),8);case 8:l=n.h;m=ee(l,"VAST");if(!m)throw new U(2,10,10007);f.push.apply(f,x(Bq(m,k.time)));h=g.next();n.A(5);break;case 3:Vq(b,f),H(n)}})}; | |
function Vq(a,b){var c,d,e,f,g,h,k,l;P(function(m){switch(m.g){case 1:c=!1,d=u(b),e=d.next();case 2:if(e.done){m.A(4);break}f=e.value;if(!f.uri){cb("Missing URL in interstitial",f);m.A(3);break}if(f.mimeType){m.A(5);break}ta(m,6);g=a.j.Db();return G(m,In(f.uri,g,a.C.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;wa(m,5);break;case 6:ya(m);case 5:h=f.id||JSON.stringify(f);if(a.L.has(h)){m.A(3);break}f.loop&&!f.overlay&&cb("Loop is only supported in overlay interstitials",f); | |
f.overlay||(c=!0);a.L.add(h);a.H.add(f);k=!1;f.pre&&null==a.m?k=!0:0!=f.startTime||f.canJump?null!=a.m&&(l=f.startTime-a.m,0<l&&10>=l&&(k=!0)):k=!0;k&&!a.G.has(f)&&Qq(f)&&a.G.set(f,a.j.preload(f.uri,null,f.mimeType||void 0));case 3:e=d.next();m.A(2);break;case 4:c&&Rq(a),H(m)}})} | |
function Nq(a,b,c){b=void 0===b?!1:b;c=void 0===c?null:c;var d=0,e=null;if(a.H.size&&null!=a.m){var f=a.h.ended,g=Array.from(a.H).sort(function(m,n){return n.startTime-m.startTime}),h=g;h=b?g.filter(function(m){return m.pre}):f?g.filter(function(m){return m.post}):g.filter(function(m){return!m.pre&&!m.post});g=u(h);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(b)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=a.m-Math.round(1E3*h.startTime)/1E3;0<l&&(1>=l||!h.canJump)&&(k=null== | |
c&&a.u&&!a.u.pre&&!a.u.post&&a.u.startTime>=h.startTime?!1:!0)}k&&(!a.u||h.startTime>=a.u.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&.001<Math.round(1E3*h.startTime)/1E3-Math.round(1E3*e.startTime)/1E3&&(e=h,d=0),d++)}}return e} | |
function Oq(a,b,c,d,e,f){f=void 0===f?0:f;a.u=b;Sq(a);!a.g.parentElement&&a.I&&a.I.appendChild(a.g);1==d&&1==c&&(c=Array.from(a.H).filter(function(g){return b.pre?g.pre==b.pre:b.post?g.post==b.post:.001>Math.abs(g.startTime-b.startTime)}).length);b.once&&(f++,a.H.delete(b),b.overlay||Rq(a));b.mimeType&&(b.mimeType.startsWith("image/")||"text/html"===b.mimeType)?b.overlay?Yq(a,b,c,d,f):cb("Unsupported interstitial",b):a.B&&b.overlay?cb("Unsupported interstitial",b):Zq(a,b,c,d,e,f)} | |
function Yq(a,b,c,d,e){function f(){a.s&&(a.s.stop(),a.s=null);a.I.removeChild(k);a.i(new T("ad-stopped"));var q=Nq(a,b.pre,d-e);q?(a.l.Ua(),Oq(a,q,c,++d,Date.now(),e)):a.K=!1}var g=b.overlay,h="text/html"==b.mimeType?"iframe":"img",k=document.createElement(h);k.style.objectFit="contain";k.style.position="absolute";k.style.border="none";a.i(new T("ad-started",(new Map).set("ad",new Lq(b,c,d))));"iframe"==h?k.src=b.uri:(k.src=b.uri,k.onerror=function(q){a.i(new T("ad-error",(new Map).set("originalEvent", | |
q)));f()});var l=g.viewport,m=g.topLeft;g=g.size;0==l.x&&0==l.y?(k.width=b.overlay.size.x,k.height=b.overlay.size.y,k.style.bottom="10%",k.style.left="0",k.style.right="0",k.style.width="100%",b.overlay.size.y||"iframe"!=h||(k.style.height="auto")):(k.style.height=g.y/l.y*100+"%",k.style.left=m.x/l.x*100+"%",k.style.top=m.y/l.y*100+"%",k.style.width=g.x/l.x*100+"%");a.I.appendChild(k);var n=Date.now();a.s&&a.s.stop();a.s=new ac(function(){b.playoutLimit&&(Date.now()-n)/1E3>b.playoutLimit?(a.i(new T("ad-complete")), | |
f()):b.endTime&&a.h.currentTime>b.endTime?(a.i(new T("ad-complete")),f()):a.h.currentTime<b.startTime&&(a.i(new T("ad-skipped")),f())});b.playoutLimit&&!b.endTime?a.s.Y(b.playoutLimit):b.endTime&&a.s.xa(.025)} | |
function Zq(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B;P(function(D){switch(D.g){case 1:g=Date.now();a.K=!0;if(!a.B||1!=d){D.A(2);break}a.i(new T("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new Wg;k=function(I){return P(function(F){if(1==F.g)return"detach"!=I.state?F.A(0):vc()?G(F,new Promise(function(L){return(new ac(L)).Y(.1)}),3):F.A(3);h.resolve();a.l.Ja(a.C,"onstatechange",k);H(F)})};a.l.o(a.C,"onstatechange",k);return G(D,h,2);case 2:return a.B||(a.g.style.display= | |
"",b.overlay?(a.g.loop=b.loop,l=b.overlay.viewport,m=b.overlay.topLeft,n=b.overlay.size,a.g.style.height=n.y/l.y*100+"%",a.g.style.left=m.x/l.x*100+"%",a.g.style.top=m.y/l.y*100+"%",a.g.style.width=n.x/l.x*100+"%"):(a.h.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(a.h.currentTime+=b.resumeOffset),a.g.loop=!1,a.g.style.height="100%",a.g.style.left="0",a.g.style.top="0",a.g.style.width="100%")),q=!1,r=function(){if(!a.B&&!b.overlay&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&&Infinity!= | |
b.endTime)a.h.currentTime!=b.endTime&&(a.h.currentTime=b.endTime);else{var I=Date.now();a.h.currentTime+=(I-e)/1E3;e=I}},t=function(I){var F,L;return P(function(J){if(1==J.g){r();F=Nq(a,b.pre,d-f);if(I&&b.groupId)for(;F&&F.groupId==b.groupId;)d++,F=Nq(a,b.pre,d-f);a.s&&(!b.groupId||F&&F.groupId!=b.groupId)&&(a.s.stop(),a.s=null);if(F&&!F.overlay)return J.A(2);b.post&&(a.m=null,a.u=null);return a.B?G(J,a.j.detach(),4):G(J,a.j.sc(),4)}2!=J.g&&(a.B&&(L=b.resumeOffset,null==L&&(L=b.timelineRange&&b.endTime&& | |
Infinity!=b.endTime?b.endTime-(a.m||0):(Date.now()-e)/1E3),a.i(new T("ad-content-resume-requested",(new Map).set("offset",L)))),a.i(new T("ad-stopped")),a.l.Ua(),a.K=!1,a.B?Rq(a):(a.g.style.display="none",r(),a.h.ended||a.h.play()));Sq(a);F&&(a.i(new T("ad-stopped")),a.l.Ua(),Oq(a,F,c,++d,e,f));H(J)})},w=function(I){return P(function(F){if(q)return F.return();q=!0;a.i(new T("ad-error",(new Map).set("originalEvent",I)));return G(F,t(!1),0)})},v=function(){return P(function(I){if(1==I.g){if(q)return I.return(); | |
q=!0;return G(I,t(!1),2)}a.i(new T("ad-complete"));H(I)})},a.U=function(){return P(function(I){if(q)return I.return();q=!0;a.i(new T("ad-skipped"));return G(I,t(!0),0)})},z=new Kq(a.g,b,a.U,c,d,!a.B),a.B||(z.setMuted(a.h.muted),z.setVolume(a.h.volume)),a.i(new T("ad-started",(new Map).set("ad",z))),(y=z.canSkipNow())&&a.i(new T("ad-skip-state-changed")),a.l.oa(a.j,"error",w),a.l.o(a.g,"timeupdate",function(){if(a.g.duration){var I=z.canSkipNow();y!=I&&0<z.getRemainingTime()&&0<z.getDuration()&&a.i(new T("ad-skip-state-changed")); | |
y=I}}),a.l.oa(a.j,"firstquartile",function(){r();a.i(new T("ad-first-quartile"))}),a.l.oa(a.j,"midpoint",function(){r();a.i(new T("ad-midpoint"))}),a.l.oa(a.j,"thirdquartile",function(){r();a.i(new T("ad-third-quartile"))}),a.l.oa(a.j,"complete",v),a.l.o(a.g,"play",function(){a.i(new T("ad-resumed"))}),a.l.o(a.g,"pause",function(){var I=a.j.getConfiguration();a.g.currentTime>=I.playRangeEnd?v():a.i(new T("ad-paused"))}),a.l.o(a.g,"volumechange",function(){a.g.muted?a.i(new T("ad-muted")):a.i(new T("ad-volume-changed"))}), | |
ta(D,4),Pq(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(A=b.endTime-b.startTime,0<A&&a.j.configure("playRangeEnd",A)),b.playoutLimit&&!a.s&&(a.s=(new ac(function(){a.U()})).Y(b.playoutLimit),a.j.configure("playRangeEnd",b.playoutLimit)),G(D,a.j.ac(a.g),6);case 6:return a.G.has(b)?G(D,a.G.get(b),10):G(D,a.j.load(b.uri,null,b.mimeType||void 0),8);case 10:return E=D.h,a.G.delete(b),E?G(D,a.j.load(E),8):G(D,a.j.load(b.uri,null,b.mimeType||void 0),8);case 8:C=(Date.now()-g)/ | |
1E3;a.i(new T("ads-loaded",(new Map).set("loadTime",C)));a.B&&a.h.play();wa(D,0);break;case 4:B=ya(D);if(!a.K)return D.return();w(B);H(D)}})} | |
function Uq(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N,R,Q,V,ba,ia,xa,Ea,va,Ba,La,za,Ua;return P(function(Qa){switch(Qa.g){case 1:c=[];if(!b)return Qa.return(c);d=b.values.find(function(Aa){return"X-ASSET-URI"==Aa.key});e=b.values.find(function(Aa){return"X-ASSET-LIST"==Aa.key});if(!d&&!e)return Qa.return(c);f=null;if(g=b.values.find(function(Aa){return"ID"==Aa.key}))f=g.data;h=null==f?Math.floor(10*b.startTime)/10:b.startTime;(k=b.endTime)&&Infinity!=b.endTime&&"number"== | |
typeof b.endTime&&(k=null==f?Math.floor(10*b.endTime)/10:b.endTime);l=b.values.find(function(Aa){return"X-RESTRICT"==Aa.key});n=m=!0;l&&l.data&&(q=l.data,m=!q.includes("SKIP"),n=!q.includes("JUMP"));r=m?0:null;if(t=b.values.find(function(Aa){return"X-ENABLE-SKIP-AFTER"==Aa.key}))w=t.data,r=parseFloat(w),isNaN(r)&&(r=m?0:null);v=null;if(z=b.values.find(function(Aa){return"X-ENABLE-SKIP-FOR"==Aa.key}))y=z.data,v=parseFloat(y),isNaN(r)&&(v=null);A=null;if(E=b.values.find(function(Aa){return"X-RESUME-OFFSET"== | |
Aa.key}))C=E.data,A=parseFloat(C),isNaN(A)&&(A=null);B=null;if(D=b.values.find(function(Aa){return"X-PLAYOUT-LIMIT"==Aa.key}))I=D.data,B=parseFloat(I),isNaN(B)&&(B=null);J=L=F=!1;if(K=b.values.find(function(Aa){return"CUE"==Aa.key}))O=K.data,F=O.includes("ONCE"),L=O.includes("PRE"),J=O.includes("POST");M=!1;(N=b.values.find(function(Aa){return"X-TIMELINE-OCCUPIES"==Aa.key}))?(R=N.data,M=R.includes("RANGE")):!E&&a.C.T()&&(M=!L&&!J);if(d){Q=d.data;if(!Q)return Qa.return(c);c.push({id:f,groupId:null, | |
startTime:h,endTime:k,uri:Q,mimeType:null,isSkippable:m,skipOffset:r,skipFor:v,canJump:n,resumeOffset:A,playoutLimit:B,once:F,pre:L,post:J,timelineRange:M,loop:!1,overlay:null});Qa.A(2);break}if(!e){Qa.A(2);break}V=e.data;if(!V)return Qa.return(c);ta(Qa,4);ba={type:11};return G(Qa,Xq(a,V,ba),6);case 6:ia=Qa.h;xa=Bc(ia);Ea=JSON.parse(xa);if(va=Ea["SKIP-CONTROL"])Ba=va["ENABLE-SKIP-AFTER"],"number"==typeof Ba&&(r=parseFloat(Ba),isNaN(Ba)&&(r=m?0:null)),La=va["ENABLE-SKIP-FOR"],"number"==typeof La&& | |
(v=parseFloat(La),isNaN(La)&&(v=null));for(za=0;za<Ea.ASSETS.length;za++)Ua=Ea.ASSETS[za],Ua.URI&&c.push({id:f+"_shaka_asset_"+za,groupId:f,startTime:h,endTime:k,uri:Ua.URI,mimeType:null,isSkippable:m,skipOffset:r,skipFor:v,canJump:n,resumeOffset:A,playoutLimit:B,once:F,pre:L,post:J,timelineRange:M,loop:!1,overlay:null});wa(Qa,2);break;case 4:ya(Qa);case 2:return Qa.return(c)}})} | |
function Rq(a){for(var b=[],c=u(a.H),d=c.next(),e={};!d.done;e={rc:void 0},d=c.next())d=d.value,d.overlay||(e.rc={start:d.startTime,end:null},d.pre?(e.rc.start=0,e.rc.end=null):d.post?(e.rc.start=-1,e.rc.end=null):d.timelineRange&&(e.rc.end=d.endTime),b.find(function(f){return function(g){return f.rc.start==g.start&&f.rc.end==g.end}}(e))||b.push(e.rc));a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))} | |
function Pq(a){a.j.configure(a.C.Xh());a.j.configure("ads.disableHLSInterstitial",!0);a.j.configure("ads.disableDASHInterstitial",!0);jh(a.C.Db(),a.j.Db())}function Xq(a,b,c){var d,e,f;return P(function(g){if(1==g.g)return d=kh([b],Ug()),e=a.C.Db().request(7,d,c),G(g,e.promise,2);f=g.h;return g.return(f.data)})}function Qq(a){return(a=a.mimeType)?!a.startsWith("image/")&&"text/html"!==a:!0};function $q(a,b,c,d,e){this.h=a;this.j=ae(this.h.skipOffset);this.g=e;this.i=b;this.l=c;this.s=d;this.m=!1}p=$q.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.h.durationInSeconds};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};p.isPaused=function(){return this.g.paused}; | |
p.isSkippable=function(){return"number"==typeof this.j?!0:!1};p.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};p.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};p.pause=function(){return this.g.pause()};p.play=function(){return this.g.play()};p.getVolume=function(){return this.g.volume}; | |
p.setVolume=function(a){this.g.volume=a};p.isMuted=function(){return this.g.muted};p.isLinear=function(){return this.s};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.l?this.l:1};p.getPositionInSequence=function(){return this.i?this.i:1};p.getTitle=function(){return this.h.adTitle};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};p.getVastMediaWidth=function(){return 0}; | |
p.getAdId=function(){return this.h.adId};p.getCreativeAdId=function(){return this.h.creativeId};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",$q);$q.prototype.release=$q.prototype.release;$q.prototype.getPodIndex=$q.prototype.getPodIndex;$q.prototype.getTimeOffset=$q.prototype.getTimeOffset; | |
$q.prototype.getMediaUrl=$q.prototype.getMediaUrl;$q.prototype.getAdvertiserName=$q.prototype.getAdvertiserName;$q.prototype.getCreativeAdId=$q.prototype.getCreativeAdId;$q.prototype.getAdId=$q.prototype.getAdId;$q.prototype.getVastMediaWidth=$q.prototype.getVastMediaWidth;$q.prototype.getVastMediaHeight=$q.prototype.getVastMediaHeight;$q.prototype.getVastMediaBitrate=$q.prototype.getVastMediaBitrate;$q.prototype.getDescription=$q.prototype.getDescription;$q.prototype.getTitle=$q.prototype.getTitle; | |
$q.prototype.getPositionInSequence=$q.prototype.getPositionInSequence;$q.prototype.getSequenceLength=$q.prototype.getSequenceLength;$q.prototype.setMuted=$q.prototype.setMuted;$q.prototype.resize=$q.prototype.resize;$q.prototype.isLinear=$q.prototype.isLinear;$q.prototype.isMuted=$q.prototype.isMuted;$q.prototype.setVolume=$q.prototype.setVolume;$q.prototype.getVolume=$q.prototype.getVolume;$q.prototype.play=$q.prototype.play;$q.prototype.pause=$q.prototype.pause;$q.prototype.skip=$q.prototype.skip; | |
$q.prototype.canSkipNow=$q.prototype.canSkipNow;$q.prototype.getTimeUntilSkippable=$q.prototype.getTimeUntilSkippable;$q.prototype.isSkippable=$q.prototype.isSkippable;$q.prototype.isPaused=$q.prototype.isPaused;$q.prototype.getRemainingTime=$q.prototype.getRemainingTime;$q.prototype.getMinSuggestedDuration=$q.prototype.getMinSuggestedDuration;$q.prototype.getDuration=$q.prototype.getDuration;$q.prototype.isUsingAnotherMediaElement=$q.prototype.isUsingAnotherMediaElement; | |
$q.prototype.isClientRendering=$q.prototype.isClientRendering;$q.prototype.needsSkipUI=$q.prototype.needsSkipUI;function ar(a,b,c,d){this.C=a;this.L=b;this.h=c;this.l=null;this.R=NaN;this.i=d;this.K=!1;this.B=null;this.j=[];this.O=[];this.M=this.G=this.g=null;this.H=new Map;this.m=[];this.u=[];this.I="";this.P=!0;this.J="";this.s=new td}ar.prototype.stop=function(){for(var a=u(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.Ja(b.target,b.type,b.listener);br(this);this.m=[];this.u=[];this.I="";this.P=!0;this.J="";this.B=null;this.j=[];this.O=[];this.H.clear()}; | |
ar.prototype.release=function(){this.stop();this.s&&this.s.release()};ar.prototype.onManifestUpdated=function(a){this.K=a;""!=this.I&&(cr(this,this.I,this.P),this.P=!1)};ar.prototype.getCuePoints=function(){for(var a=[],b=u(this.j),c=b.next();!c.done;c=b.next()){c=u(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a}; | |
function dr(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t;P(function(w){if(1==w.g)return d={type:7},e=kh([b],Ug()),e.method="POST",c&&(f=JSON.stringify(c),e.body=Fc(f)),g=a.L.request(7,e,d),ta(w,2),G(w,g.promise,4);if(2!=w.g){h=w.h;k=Bc(h.data);l=JSON.parse(k);if(l.manifestUrl&&l.trackingUrl)m=new sb(b),n=new sb(l.trackingUrl),a.I=m.resolve(n).toString(),q=Date.now()/1E3,r=q-a.R,a.i(new T("ads-loaded",(new Map).set("loadTime",r))),t=new sb(l.manifestUrl),a.l.resolve(m.resolve(t).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor."); | |
return wa(w,0)}ya(w);if(!a.J.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,w.return();a.l.resolve(a.J);a.l=null;H(w)})} | |
function cr(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y;P(function(A){if(1==A.g)return d={type:8},e=kh([b],Ug()),f=a.L.request(7,e,d),ta(A,2),G(A,f.promise,4);if(2!=A.g){g=A.h;h=[];k=Bc(g.data);l=JSON.parse(k);if(0<l.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(l.avails)){a.j=l.avails;m=u(a.j);for(n=m.next();!n.done;n=m.next())for(q=n.value,r=u(q.nonLinearAdsList),t=r.next();!t.done;t=r.next())for(w=t.value,v=u(w.nonLinearAdList),z=v.next();!z.done;z=v.next())y=z.value,er(a,y);h=a.getCuePoints(); | |
a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",h)))}}else a.j.length&&a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",h))),br(a),a.j=[];c&&(a.K||0<h.length)&&fr(a);return wa(A,0)}ya(A);H(A)})} | |
function er(a,b){var c,d,e,f,g,h,k,l,m;P(function(n){if(1==n.g){if(!b.staticResource)return n.return();c=gr(b);if(d=a.H.get(c))return n.return();e={type:9};f=kh([b.staticResource],Ug());g=a.L.request(7,f,e);ta(n,2);a.H.set(c,[]);return G(n,g.promise,4)}if(2!=n.g)return h=n.h,k=Bc(h.data),l=JSON.parse(k),m=l.apps,a.H.set(c,m),wa(n,0);ya(n);a.H.delete(c);H(n)})} | |
function gr(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function fr(a){hr(a);a.K||(ir(a),a.s.o(a.h,"seeked",function(){ir(a)}),a.s.o(a.h,"ended",function(){br(a)}));a.s.o(a.h,"timeupdate",function(){hr(a)})} | |
function ir(a){var b=a.h.currentTime;if(0!=b&&null==a.B){for(var c,d,e=u(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=u(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.O.includes(d.adId)&&(a.B=b,a.h.currentTime=c.startTimeInSeconds)}} | |
function hr(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.G,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.u.includes("firstQuartile")?(a.u.push("firstQuartile"),jr(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),jr(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),jr(a,"thirdQuartile"));d=a.g.getRemainingTime(); | |
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&jr(a,"skipStateChanged");0<e&&(0>=d||d>e)&&br(a)}if(!a.g||!a.g.isLinear()){a:for(d=u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.O.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}br(a);a.M=e;a.g=new $q(g,f+1,e.ads.length,!0,a.h);a.G=g;0===f&&jr(a,"breakStart");kr(a);break}}}if(!a.g)for(d= | |
u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.H.get(gr(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){br(a);h=a;k=u(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left|| | |
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.C.appendChild(m)}a.M=e;a.g=new $q(g,f+1,e.ads.length,!1,a.h);a.G=g;0===f&&jr(a,"breakStart");kr(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.B&&a.B>b&&(a.h.currentTime=a.B),a.B=null)}}} | |
function br(a){if(a.g){for(;a.C.lastChild;)a.C.removeChild(a.C.firstChild);a.K||a.O.push(a.G.adId);var b=a.g.m;(void 0===b?0:b)?jr(a,"skip"):jr(a,"complete");b=u(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.s.Ja(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&jr(a,"breakEnd");a.g=null;a.G=null;a.M=null}} | |
function kr(a){var b=!1;a.h.paused?b=!0:(jr(a,"impression"),jr(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&jr(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||jr(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(jr(a,"impression"),jr(a,"start"),b=!1):jr(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){jr(a,"pause")}});for(var c=u(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.s.o(d.target, | |
d.type,d.listener)} | |
function jr(a,b){var c=a.G.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.M.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=u(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&""!=e&&(e=kh([e],Ug()),e.method="POST",a.L.request(7,e,d))}switch(b){case "impression":a.i(new T("ad-impression"));break;case "start":a.i(new T("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new T("ad-muted"));break;case "unmute":a.i(new T("ad-volume-changed"));break; | |
case "resume":a.i(new T("ad-resumed"));break;case "pause":a.i(new T("ad-paused"));break;case "firstQuartile":a.i(new T("ad-first-quartile"));break;case "midpoint":a.i(new T("ad-midpoint"));break;case "thirdQuartile":a.i(new T("ad-third-quartile"));break;case "complete":a.i(new T("ad-complete"));a.i(new T("ad-stopped"));break;case "skip":a.i(new T("ad-skipped"));a.i(new T("ad-stopped"));break;case "breakStart":a.C.setAttribute("ad-active","true");break;case "breakEnd":a.C.removeAttribute("ad-active"); | |
break;case "skipStateChanged":a.i(new T("ad-skip-state-changed"))}};function lr(a,b){this.g=a;this.i=null;this.h=b}p=lr.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.i?this.i.duration:-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};p.isPaused=function(){return this.h.paused};p.isSkippable=function(){return this.g.isSkippable()}; | |
p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};p.skip=function(){this.h.currentTime+=this.getRemainingTime()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.play()};p.getVolume=function(){return this.h.volume};p.setVolume=function(a){this.h.volume=a};p.isMuted=function(){return this.h.muted};p.isLinear=function(){return!0};p.resize=function(){}; | |
p.setMuted=function(a){this.h.muted=a};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()}; | |
p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",lr);lr.prototype.release=lr.prototype.release; | |
lr.prototype.getPodIndex=lr.prototype.getPodIndex;lr.prototype.getTimeOffset=lr.prototype.getTimeOffset;lr.prototype.getMediaUrl=lr.prototype.getMediaUrl;lr.prototype.getAdvertiserName=lr.prototype.getAdvertiserName;lr.prototype.getCreativeAdId=lr.prototype.getCreativeAdId;lr.prototype.getAdId=lr.prototype.getAdId;lr.prototype.getVastMediaWidth=lr.prototype.getVastMediaWidth;lr.prototype.getVastMediaHeight=lr.prototype.getVastMediaHeight;lr.prototype.getVastMediaBitrate=lr.prototype.getVastMediaBitrate; | |
lr.prototype.getDescription=lr.prototype.getDescription;lr.prototype.getTitle=lr.prototype.getTitle;lr.prototype.getPositionInSequence=lr.prototype.getPositionInSequence;lr.prototype.getSequenceLength=lr.prototype.getSequenceLength;lr.prototype.setMuted=lr.prototype.setMuted;lr.prototype.resize=lr.prototype.resize;lr.prototype.isLinear=lr.prototype.isLinear;lr.prototype.isMuted=lr.prototype.isMuted;lr.prototype.setVolume=lr.prototype.setVolume;lr.prototype.getVolume=lr.prototype.getVolume; | |
lr.prototype.play=lr.prototype.play;lr.prototype.pause=lr.prototype.pause;lr.prototype.skip=lr.prototype.skip;lr.prototype.canSkipNow=lr.prototype.canSkipNow;lr.prototype.getTimeUntilSkippable=lr.prototype.getTimeUntilSkippable;lr.prototype.isSkippable=lr.prototype.isSkippable;lr.prototype.isPaused=lr.prototype.isPaused;lr.prototype.getRemainingTime=lr.prototype.getRemainingTime;lr.prototype.getMinSuggestedDuration=lr.prototype.getMinSuggestedDuration;lr.prototype.getDuration=lr.prototype.getDuration; | |
lr.prototype.isUsingAnotherMediaElement=lr.prototype.isUsingAnotherMediaElement;lr.prototype.isClientRendering=lr.prototype.isClientRendering;lr.prototype.needsSkipUI=lr.prototype.needsSkipUI;function mr(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.H=NaN;this.i=d;this.I=!1;this.B=this.m=this.s=null;this.C="";this.G=[];this.h=new td;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.u,a);this.i(new T("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){nr(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length? | |
e.j.resolve(e.C):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new lr(f,e.l);e.B&&(e.m.i=e.B);e.i(new T("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active"); | |
var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.B=f.getStreamData().adProgressData;e.m&&(e.m.i=e.B)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new T("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new T("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new T("ad-third-quartile"))}); | |
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new T("ad-complete"));e.i(new T("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new T("ad-skipped"));e.i(new T("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=u(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G= | |
f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=mr.prototype;p.configure=function(){};p.stop=function(){this.C="";this.s=null;this.G=[]};p.release=function(){this.stop();this.h&&this.h.release()};p.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};p.getCuePoints=function(){return this.G}; | |
function nr(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.I||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function or(){kb.call(this);this.h=this.i=this.j=this.g=null;this.m=new xq;this.s=navigator.language;this.l=null}pa(or,kb);p=or.prototype;p.setLocale=function(a){this.s=a};p.configure=function(a){this.l=a;this.g&&this.g.configure(this.l);this.j&&this.j.configure(this.l);this.h&&this.h.configure(this.l)};p.initInterstitial=function(a,b,c){var d=this;this.g&&this.g.release();this.g=new Mq(a,b,c,function(e){return pr(d,e)});this.g.configure(this.l)}; | |
p.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new U(2,10,1E4);this.j&&this.j.release();this.j=new Dq(a,b,this.s,c,function(e){return pr(d,e)});this.j.configure(this.l)};p.release=function(){this.g&&(this.g.release(),this.g=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);kb.prototype.release.call(this)}; | |
p.onAssetUnload=function(){this.g&&this.g.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.dispatchEvent(new T("ad-stopped"));this.dispatchEvent(new T("ad-content-attach-requested"));this.m=new xq};p.requestClientSideAds=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.I=Date.now()/1E3;b.m.requestAds(a)}; | |
p.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new ar(a,b,c,function(e){return pr(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new U(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new Wg,dr(d,a,b),d.J=c||"",d.R=Date.now()/1E3,a=d.l);return a}; | |
p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new U(1,10,10005);var b=this.i;b.I=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.h&&this.h.release();this.h=new mr(a,b,this.s,function(d){return pr(c,d)});this.h.configure(this.l)}; | |
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.h)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&cb('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.13.0";c=this.h;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&& | |
(c.I=!0),c.j=new Wg,c.g.requestStream(a),c.C=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new U(1,10,10003);(a.mpt||a.mpv)&&cb('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.mpt="Shaka Player";a.mpv="v4.13.0";this.h.g.replaceAdTagParameters(a)}; | |
p.getServerSideCuePoints=function(){Dd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.h&&(a=a.concat(this.h.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:yq(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)}; | |
p.onDashTimedMetadata=function(a){this.h&&"urn:google:dai:2018"==a.schemeIdUri&&this.h.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};p.onHlsTimedMetadata=function(a,b){this.h&&this.h.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.h)this.h.onCueMetadataChange(a)};p.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,a,b),this.g&&Tq(this.g,c))}; | |
p.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==d||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==d){if(this.g||this.initInterstitial(null,a,b),this.g){a=this.g;b=u(c.eventNode.children);for(d=b.next();!d.done;d=b.next())if(d=d.value,"AlternativeMPD"==d.tagName&&(d=d.attributes.uri)){var e=d;break}e?(b="urn:mpeg:dash:event:alternativeMPD:replace:2025"==c.schemeIdUri,d="urn:mpeg:dash:event:alternativeMPD:insert:2025"== | |
c.schemeIdUri,(b||d)&&Vq(a,[{id:c.id,groupId:null,startTime:c.startTime,endTime:c.endTime,uri:e,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:d?0:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:b&&!d,loop:!1,overlay:null}])):cb("Unsupported MPD alternate",c)}}else"urn:mpeg:dash:event:2012"==d&&c.eventNode&&qe(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&Wq(this.g,c))}}; | |
p.addCustomInterstitial=function(a){if(!this.g)throw new U(1,10,10006);Vq(this.g,[a])};p.addAdUrlInterstitial=function(a){if(!this.g)throw new U(1,10,10006);return this.g.addAdUrlInterstitial(a)};p.getInterstitialPlayer=function(){if(!this.g)throw new U(1,10,10006);return this.g.vc()}; | |
function pr(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;break;case "ad-complete":a.m.j++;break;case "ad-skipped":a.m.l++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",or);or.prototype.getInterstitialPlayer=or.prototype.getInterstitialPlayer;or.prototype.addAdUrlInterstitial=or.prototype.addAdUrlInterstitial;or.prototype.addCustomInterstitial=or.prototype.addCustomInterstitial; | |
or.prototype.onDASHInterstitialMetadata=or.prototype.onDASHInterstitialMetadata;or.prototype.onHLSInterstitialMetadata=or.prototype.onHLSInterstitialMetadata;or.prototype.onCueMetadataChange=or.prototype.onCueMetadataChange;or.prototype.onHlsTimedMetadata=or.prototype.onHlsTimedMetadata;or.prototype.onDashTimedMetadata=or.prototype.onDashTimedMetadata;or.prototype.onManifestUpdated=or.prototype.onManifestUpdated;or.prototype.getStats=or.prototype.getStats;or.prototype.getCuePoints=or.prototype.getCuePoints; | |
or.prototype.getServerSideCuePoints=or.prototype.getServerSideCuePoints;or.prototype.replaceServerSideAdTagParameters=or.prototype.replaceServerSideAdTagParameters;or.prototype.requestServerSideStream=or.prototype.requestServerSideStream;or.prototype.initServerSide=or.prototype.initServerSide;or.prototype.addMediaTailorTrackingUrl=or.prototype.addMediaTailorTrackingUrl;or.prototype.requestMediaTailorStream=or.prototype.requestMediaTailorStream;or.prototype.initMediaTailor=or.prototype.initMediaTailor; | |
or.prototype.updateClientSideAdsRenderingSettings=or.prototype.updateClientSideAdsRenderingSettings;or.prototype.requestClientSideAds=or.prototype.requestClientSideAds;or.prototype.onAssetUnload=or.prototype.onAssetUnload;or.prototype.release=or.prototype.release;or.prototype.initClientSide=or.prototype.initClientSide;or.prototype.initInterstitial=or.prototype.initInterstitial;or.prototype.configure=or.prototype.configure;or.prototype.setLocale=or.prototype.setLocale;or.ADS_LOADED="ads-loaded"; | |
or.AD_STARTED="ad-started";or.AD_FIRST_QUARTILE="ad-first-quartile";or.AD_MIDPOINT="ad-midpoint";or.AD_THIRD_QUARTILE="ad-third-quartile";or.AD_COMPLETE="ad-complete";or.AD_STOPPED="ad-stopped";or.AD_SKIPPED="ad-skipped";or.AD_VOLUME_CHANGED="ad-volume-changed";or.AD_MUTED="ad-muted";or.AD_PAUSED="ad-paused";or.AD_RESUMED="ad-resumed";or.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";or.CUEPOINTS_CHANGED="ad-cue-points-changed";or.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded"; | |
or.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";or.AD_CLICKED="ad-clicked";or.AD_PROGRESS="ad-progress";or.AD_BUFFERING="ad-buffering";or.AD_IMPRESSION="ad-impression";or.AD_DURATION_CHANGED="ad-duration-changed";or.AD_CLOSED="ad-closed";or.AD_LOADED="ad-loaded";or.ALL_ADS_COMPLETED="all-ads-completed";or.AD_LINEAR_CHANGED="ad-linear-changed";or.AD_METADATA="ad-metadata";or.AD_RECOVERABLE_ERROR="ad-recoverable-error";or.AD_ERROR="ad-error";or.AD_BREAK_READY="ad-break-ready"; | |
or.AD_INTERACTION="ad-interaction";or.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";or.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";or.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";So=function(){return new or};function qr(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof T){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=u(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=u(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof | |
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=u(gj(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=ArrayBuffer.isView(c)&&1===c.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})} | |
function rr(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=sr(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})} | |
function sr(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}} | |
var tr="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ur="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),vr=["loop","playbackRate"],wr=["pause","play"],xr={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2, | |
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1,isEnded:1},yr={getConfiguration:4,getConfigurationForLowLatency:4,getStats:5,getTextTracks:2,getVariantTracks:2},zr={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Ar=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Br=[["isTextTrackVisible","setTextTrackVisibility"]], | |
Cr="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure configurationForLowLatency getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),Dr=["attach","attachCanvas","detach","load","unload"];function Er(a,b,c,d,e,f,g){var h=this;this.I=a;this.L=g;this.l=new ac(b);this.M=c;this.u=!1;this.B=d;this.H=e;this.O=f;this.h=this.m=!1;this.K="";this.s=null;this.C=function(){return Fr(h)};this.G=function(k,l){k=rr(l);switch(k.type){case "event":var m=k.targetName,n=Za(k.event);h.B(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.u&&(h.M(),h.u=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new U(q.severity,q.category, | |
q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;Gr.add(this)}p=Er.prototype;p.destroy=function(){Gr.delete(this);Hr(this);Ir&&Jr(this);this.l&&(this.l.stop(),this.l=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.C=this.j=this.i=this.g=this.s=null;return Promise.resolve()};p.Ta=function(){return this.h};p.jf=function(){return this.K}; | |
p.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Ia();var a=new chrome.cast.SessionRequest(this.I,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=u(Gr),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Wg;d.u=!0;Kr(d,e)}},function(b){for(var c=u(Gr),d=c.next();!d.done;d=c.next())d=d.value,Lr="available"==b,d.l.Ia()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Lr&&this.l.Y(Mr);(a=Ir)&& | |
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Wg,this.u=!0,Kr(this,a)):Ir=null}else window.__onGCastApiAvailable!==Nr&&(Or=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Nr)};p.fh=function(a){this.s=a;this.h&&Pr(this,{type:"appData",appData:this.s})}; | |
p.cast=function(){var a=this;return P(function(b){if(!a.m)throw new U(1,8,8E3);if(!Lr)throw new U(1,8,8001);if(a.h)throw new U(1,8,8002);a.j=new Wg;chrome.cast.requestSession(function(c){return Kr(a,c)},function(c){return Qr(a,c)});return G(b,a.j,0)})};function Rr(a){a.h&&chrome.cast.requestSession(function(b){return Kr(a,b)},function(b){return Qr(a,b)})}p.md=function(){if(this.h){Hr(this);if(Ir){Jr(this);try{Ir.stop(function(){},function(){})}catch(a){}Ir=null}Fr(this)}}; | |
p.get=function(a,b){var c=this;if("video"==a){if(wr.includes(b))return function(){return c.Ai.apply(c,[a,b].concat(x(Ma.apply(0,arguments))))}}else if("player"==a){if(zr[b]&&!this.get("player","isLive")())return function(){};if(Cr.includes(b))return function(){return c.Ai.apply(c,[a,b].concat(x(Ma.apply(0,arguments))))};if(Dr.includes(b))return function(){return c.Mk.apply(c,[a,b].concat(x(Ma.apply(0,arguments))))};if(xr[b]||yr[b])return function(){return c.g[a][b]}}return this.g[a][b]}; | |
p.set=function(a,b,c){this.g[a][b]=c;Pr(this,{type:"set",targetName:a,property:b,value:c})};function Kr(a,b){var c=a.O();Ir=b;b.addUpdateListener(a.C);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);Fr(a);Pr(a,{type:"init",initState:c,appData:a.s});a.j.resolve()}function Qr(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new U(2,8,c,b))} | |
p.Ai=function(a,b){Pr(this,{type:"call",targetName:a,methodName:b,args:Ma.apply(2,arguments)})};p.Mk=function(a,b){var c=Ma.apply(2,arguments),d=new Wg,e=this.J.toString();this.J++;this.i[e]=d;try{Pr(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Jr(a){var b=Ir;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)} | |
function Fr(a){var b=Ir?"connected"==Ir.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Hr(a)}a.h=b;a.K=b?Ir.receiver.friendlyName:"";a.l.Ia()}function Hr(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new U(1,7,7E3))}}function Pr(a,b){b=qr(b);var c=Ir;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},fb)}catch(d){throw b=new U(2,8,8005,d),c=new T("error",(new Map).set("detail",b)),a.B("player",c),a.md(),b;}}var Mr=.02,Lr=!1,Ir=null,Or=null,Gr=new Set; | |
function Nr(a){Or?window.__onGCastApiAvailable=Or:delete window.__onGCastApiAvailable;Or=null;if(a)for(var b=u(Gr),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Sr(a,b,c,d){d=void 0===d?!1:d;kb.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.u=this.l=null;this.G=c;this.C=d;this.B=new Map;this.g=new Er(c,function(){return Tr(e)},function(){return Ur(e)},function(f,g){return Vr(e,f,g)},function(){return Wr(e)},function(){return Xr(e)},d);Yr(this)}pa(Sr,kb);p=Sr.prototype; | |
p.destroy=function(a){a&&this.g.md();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.l=this.i=null;kb.prototype.release.call(this);return Promise.all(a)};p.yc=function(){return this.l};p.vc=function(){return this.u};p.Uf=function(){return this.g.m&&Lr};p.Ta=function(){return this.g.Ta()};p.jf=function(){return this.g.jf()}; | |
p.cast=function(){var a=this;return P(function(b){return 1==b.g?G(b,a.g.cast(),2):a.h?G(b,a.h.sc(),0):b.return()})};p.fh=function(a){this.g.fh(a)};p.Ri=function(){Rr(this.g)};p.md=function(){this.g.md()}; | |
p.Kh=function(a,b){b=void 0===b?!1:b;var c=this;return P(function(d){if(1==d.g){if(a==c.G&&b==c.C)return d.return();c.G=a;c.C=b;c.g.md();return G(d,c.g.destroy(),2)}c.g=null;c.g=new Er(a,function(){return Tr(c)},function(){return Ur(c)},function(e,f){return Vr(c,e,f)},function(){return Wr(c)},function(){return Xr(c)},b);c.g.init();H(d)})}; | |
function Yr(a){a.g.init();a.m=new td;for(var b=u(tr),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Ta()||(f=Za(f),a.j.dispatchEvent(f))});for(var d in $a)a.m.o(a.h,$a[d],function(f){a.g.Ta()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={Yd:b.Yd},b.Yd=e,Object.defineProperty(a.l,b.Yd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Zr(a,f.Yd)}}(b),set:function(f){return function(g){var h=f.Yd;a.g.Ta()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.u={};$r(a, | |
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return as(a,f)}})});bs(a);a.j=new kb;a.j.re=a.l;a.s=new kb;a.s.re=a.u}function bs(a){var b=new Map;$r(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.B.set(c,d):a.B.set(d,c)):b.set(d,c)})} | |
function $r(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=u(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}} | |
function Xr(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.nd(),startTime:null};a.i.pause();for(var c=u(vr),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=u(Ar);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=u(Br);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Tr(a){var b=new T("caststatuschanged");a.dispatchEvent(b)} | |
function Ur(a){var b=new T(a.l.paused?"pause":"play");a.j.dispatchEvent(b)} | |
function Wr(a){for(var b=u(Ar),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=u(vr);for(d=c.next();!d.done;d=c.next())d= | |
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=u(vr),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=u(Br);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.tf(h);g&&a.h.dh(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new T("error",l);a.h.dispatchEvent(l)})} | |
function Zr(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Ta()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ta()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)} | |
function as(a,b){a.B.has(b)&&(b=a.B.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Db()};if("getDrmEngine"==b)return function(){return a.h.G};if("getAdManager"==b)return function(){return a.h.Ie()}; | |
if("setVideoContainer"==b)return function(c){return a.h.mh(c)};if(a.g.Ta()){if("getManifest"==b||"drmInfo"==b)return function(){cb(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){cb(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ta()&&0==Object.keys(a.g.g.video).length&&(xr[b]||yr[b])||!a.g.Ta()?a.h[b].bind(a.h):a.g.get("player",b)} | |
function Vr(a,b,c){a.g.Ta()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}S("shaka.cast.CastProxy",Sr);Sr.prototype.changeReceiverId=Sr.prototype.Kh;Sr.prototype.forceDisconnect=Sr.prototype.md;Sr.prototype.suggestDisconnect=Sr.prototype.Ri;Sr.prototype.setAppData=Sr.prototype.fh;Sr.prototype.cast=Sr.prototype.cast;Sr.prototype.receiverName=Sr.prototype.jf;Sr.prototype.isCasting=Sr.prototype.Ta;Sr.prototype.canCast=Sr.prototype.Uf;Sr.prototype.getPlayer=Sr.prototype.vc; | |
Sr.prototype.getVideo=Sr.prototype.yc;Sr.prototype.destroy=Sr.prototype.destroy;function cs(a,b,c,d){kb.call(this);var e=this;this.g=a;this.h=b;this.j=new td;this.J={video:a,player:b};this.H=c||function(){};this.K=d||function(f){return f};this.i=null;this.I=!1;this.s=!0;this.m=0;this.C=!1;this.B=!0;this.u=this.l=null;this.G=new ac(function(){ds(e)});es(this)}pa(cs,kb);p=cs.prototype;p.isConnected=function(){return this.I};p.jk=function(){return this.s};p.Yk=function(a){this.i=a};p.nj=function(){this.i=null}; | |
p.Zk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.Xk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.Wk=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK}; | |
p.destroy=function(){var a=this,b,c;return P(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.J=null,a.H=null,a.I=!1,a.s=!0,a.l=null,a.u=null,kb.prototype.release.call(a),G(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})}; | |
function es(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return fs(a)};b.onSenderDisconnected=function(){return fs(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&gs(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);gs(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return hs(a, | |
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return is(a,e)};b.start();b=u(tr);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return js(a,"video",e)});for(var d in $a)a.j.o(a.h,$a[d],function(e){return js(a,"player",e)});a.j.o(a.g,"loadeddata",function(){a.C=!0});a.j.o(a.h,"loading",function(){a.s=!1;ks(a)});a.j.o(a.g,"playing",function(){a.s=!1;ks(a)});a.j.o(a.g,"pause",function(){ks(a)});a.j.o(a.h,"unloading",function(){a.s=!0;ks(a)}); | |
a.j.o(a.g,"ended",function(){(new ac(function(){a.g&&a.g.ended&&(a.s=!0,ks(a))})).Y(ls)})}function fs(a){a.m=0;a.B=!0;a.I=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;ks(a)}function ks(a){var b;P(function(c){if(1==c.g)return G(c,Promise.resolve(),2);if(!a.h)return c.return();b=new T("caststatuschanged");a.dispatchEvent(b);ms(a)||ns(a);H(c)})} | |
function os(a,b,c){var d,e,f,g,h,k,l,m,n,q;P(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.H(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ta(r,5),G(r,a.h.load(b.manifest,b.startTime),7)):G(r,Promise.resolve(),3);case 7:wa(r,3);break;case 5:return g=ya(r),h=(new Map).set("detail",g),k=new T("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.h[n](q); | |
a.g.autoplay=f;b.manifest&&(a.g.play(),ns(a));H(r)}})}function js(a,b,c){a.h&&(ds(a),gs(a,{type:"event",targetName:b,event:c},a.l))} | |
function ds(a){a.G.Y(ps);for(var b={video:{},player:{}},c=u(ur),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in zr)0==a.m%zr[e]&&(b.player[e]=a.h[e]());for(var f in xr)0==a.m%xr[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;gs(a,{type:"update",update:b},a.l);for(var g in yr)0==a.m%yr[g]&&(b={player:{}},b.player[g]=a.h[g](),gs(a,{type:"update",update:b},a.l));a.C&&(a.m+= | |
1);ms(a)}function ms(a){return a.B&&(a.g.duration||a.h.T())?(qs(a),a.B=!1,!0):!1}function qs(a,b){var c={contentId:a.h.nd(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);ns(a,void 0===b?0:b,c)} | |
function is(a,b){var c=rr(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.B=!0;os(a,c.initState,c.appData);ds(a);break;case "appData":a.H(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName; | |
"player"==d&&"load"==e&&(a.m=0,a.C=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.B=!0}));c.then(function(){return rs(a,g,f,null)},function(h){return rs(a,g,f,h)})}} | |
function hs(a,b){var c=rr(b.data);switch(c.type){case "PLAY":a.g.play();ns(a);break;case "PAUSE":a.g.pause();ns(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),ns(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),ns(a));break;case "STOP":a.h.sc().then(function(){a.h&&ns(a)});break;case "GET_STATUS":qs(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b)); | |
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||ns(a);break;case "LOAD":a.m=0;a.C=!1;a.B=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.H(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&qs(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");gs(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:gs(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}} | |
function rs(a,b,c,d){a.h&&gs(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function gs(a,b,c,d){a.I&&(a=qr(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function ns(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?ss:a.h.Se()?ts:a.g.paused?us:vs,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);gs(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)} | |
S("shaka.cast.CastReceiver",cs);cs.prototype.destroy=cs.prototype.destroy;cs.prototype.setContentArtist=cs.prototype.Wk;cs.prototype.setContentImage=cs.prototype.Xk;cs.prototype.setContentTitle=cs.prototype.Zk;cs.prototype.clearContentMetadata=cs.prototype.nj;cs.prototype.setContentMetadata=cs.prototype.Yk;cs.prototype.isIdle=cs.prototype.jk;cs.prototype.isConnected=cs.prototype.isConnected;var ps=.5,ls=5,ss="IDLE",vs="PLAYING",ts="BUFFERING",us="PAUSED";function ws(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(E){return null!=E&&""!=E.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(E){return null!=E&&""!=E.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=xs(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],r=-1,t=-1,w=0;w<q.length;w++)if(null!=q[w]&&""!==q[w].g.trim()){r=w;break}for(w=q.length-1;0<=w;w--)if(null!=q[w]&&""!==q[w].g.trim()){t=w;break}if(-1=== | |
r||-1===t)q=ys(d,e),a.nestedCues.push(q);else{for(;r<=t;r++)if(w=q[r]){var v=w.l,z=w.i,y=w.j,A=w.h;if(v!=h||z!=k||y!=l||A!=m)n.payload&&a.nestedCues.push(n),n=xs(d,e,v,z,y,A),h=v,k=z,l=y,m=A;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=ys(d,e),a.nestedCues.push(n));n=xs(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function xs(a,b,c,d,e,f){a=new Pe(a,b,"");c&&a.textDecoration.push(mf);d&&(a.fontStyle=lf);a.color=e;a.backgroundColor=f;return a} | |
function ys(a,b){a=new Pe(a,b,"");a.lineBreak=!0;return a}function zs(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function As(a,b){this.i=[];this.g=1;this.h=0;this.G=a;this.C=b;this.j=this.m=!1;this.l="white";this.s="black";this.u=this.B=null;Bs(this)}function Cs(a,b,c){var d="CC"+((a.G<<1|a.C)+1),e=new Pe(b,c,"");e.lineInterpretation=1;var f=Ds.get(a.g);f&&(e.line=f);null!=a.u&&null!=a.B&&(e.position=10+Math.min(70,10*a.u)+2.5*a.B);(b=ws(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=Ds.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function Bs(a){Es(a,0,15);a.g=1} | |
function Fs(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=Gs.has(c)?Gs.get(c):String.fromCharCode(c);break;case 1:d=Hs.get(c);break;case 2:a.i[a.g].pop();d=Is.get(c);break;case 3:a.i[a.g].pop(),d=Js.get(c)}d&&a.i[a.g].push(new zs(d,a.m,a.j,a.s,a.l))}}function Ks(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Es(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]} | |
var Gs=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Hs=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Is=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"], | |
[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Js=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"], | |
[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),Ds=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function Ls(a,b){this.h=0;this.s=new As(a,b);this.i=new As(a,b);this.g=this.j=new As(a,b);this.l=0;this.m=null}function Ms(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=Cs(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Es(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Es(c,0,15),d.g=15);a.h=3;d.h=b;return e}function Ns(a){a.h=1;a.g=a.j;a.g.h=0}function Os(a){db("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=4}var Ps="black green blue cyan red yellow magenta black".split(" "),Qs="white green blue cyan red yellow magenta white_italics".split(" ");function Rs(a,b){this.K=b;this.O=a;this.L=this.l=!1;this.m=this.s=this.I=this.M=this.J=0;this.H=2;this.i=[];this.g=this.h=this.j=0;this.G=this.B=!1;this.C="white";this.u="black";Ss(this)}function Ss(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Ts())}function Ts(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Us(a,b){Vs(a)&&(a.i[a.h][a.g]=new zs(b,a.G,a.B,a.u,a.C),a.g++)}function Vs(a){var b=a.g<a.m&&0<=a.g;return a.h<a.s&&0<=a.h&&b}Rs.prototype.isVisible=function(){return this.l}; | |
function Ws(a){for(var b=0,c=1;16>c;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=Ts()} | |
function Xs(a,b,c){var d=new Pe(a.j,b,"");d.textAlign=0===a.H?"left":1===a.H?"right":Re;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.O;e.height=a.s;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.J;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.L?Od:2;switch(a.I){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX= | |
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=ws(d,"svc"+c,a.i,a.j,b))a.j=b;return c}Rs.prototype.display=function(){this.l=!0};function Ys(){this.i=[];this.h=null;this.g=0}function Zs(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new $s(a.h)),a.h=null,a.g=0))}function $s(a){this.g=0;this.h=a}$s.prototype.Ha=function(){return this.g<this.h.length};$s.prototype.Pa=function(){return this.g};function at(a){if(!a.Ha())throw new U(2,2,3E3);return a.h[a.g++]}$s.prototype.skip=function(a){if(this.g+a>this.h.length)throw new U(2,2,3E3);this.g+=a}; | |
$s.prototype.Ci=function(a){if(0>this.g-a)throw new U(2,2,3E3);this.g-=a};function bt(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null} | |
function ct(a,b,c,d){if(!a.g)return[];if(24==c)return c=at(b).value,d=at(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),Us(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!Vs(b)||0>=b.g&&0>=b.h||(0>=b.g?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=Xs(b,d,a.i));b.h+1>=b.s?Ws(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=Xs(b,d,a.i));b.i[b.h]=Ts();b.g=0;break;case 12:b.isVisible()&& | |
(e=Xs(b,d,a.i)),Ss(b),b.h=0,b.g=0}return e?[e]:[]} | |
function dt(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=at(b).value;b=[];c=u(et(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=Xs(e,d,a.i);f&&b.push(f)}Ss(e)}return b}if(137===c)for(b=at(b).value,b=u(et(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(138===c){c=at(b).value;b=null;c=u(et(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Xs(e,d,a.i)),e.l=!1;return b? | |
[b]:[]}if(139===c){c=at(b).value;b=null;c=u(et(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Xs(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(140===c)return b=at(b).value,ft(a,b,d);if(143===c)return d=ft(a,255,d),gt(a),d;if(144===c)b.skip(1),d=at(b).value,a.g&&(a.g.B=0<(d&128),a.g.G=0<(d&64));else if(145===c)d=at(b).value,c=at(b).value,b.skip(1),a.g&&(b=ht((c&48)>>4,(c&12)>>2,c&3),a.g.C=ht((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=at(b).value,b=at(b).value,a.g&&(a= | |
a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),b.skip(1),d=at(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];e||(f=new Rs(c,a.i),f.j=d,a.h[c]=f);d=at(b).value;f=at(b).value;var g=at(b).value,h=at(b).value,k=at(b).value;b=at(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.G=!1,b.B=!1,b.C="white",b.u="black");b=a.h[c];b.l=0<(d&32);b.M=f&127;b.J=g;b.I=(h&240)>>4;b.L=0<(f&128);b.s=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]} | |
function et(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function ft(a,b,c){var d=[];b=u(et(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=Xs(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function gt(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ht(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return it[a<<2|b<<1|c]} | |
var jt=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),it="black blue green cyan red magenta yellow white".split(" ");function kt(){this.h=[];this.g=[];this.i=new Ys;this.l=0;this.m=new Map([["CC1",new Ls(0,0)],["CC2",new Ls(0,1)],["CC3",new Ls(1,0)],["CC4",new Ls(1,1)]]);this.u=this.s=0;this.j=new Map;this.C=!0;this.B=new Set;lt(this)}kt.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;lt(this);a=u(this.j.values());for(var b=a.next();!b.done;b=a.next())gt(b.value)}; | |
function lt(a){a.s=0;a.u=0;for(var b=u(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,Bs(c.i),Bs(c.j),Bs(c.s);a.C=!0} | |
kt.prototype.extract=function(a,b){if(this.C){for(var c=u(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.C=!1}a=new wh(a,0);if(!(8>a.getLength())&&181===a.$()&&49===a.Ba()&&1195456820===a.V()&&3===a.$()&&(c=a.$(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.$(),f=(e&4)>>2,g=a.$(),h=a.$();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Cb:g,bc:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}}; | |
kt.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=u(this.h),d=c.next();!d.done;d=c.next())(d=mt(this,d.value))&&b.push(d);c=u(this.g);for(d=c.next();!d.done;d=c.next())Zs(this.i,d.value);c=u(this.i.i);for(d=c.next();!d.done;d=c.next())d=nt(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b}; | |
function mt(a,b){var c=b.type;if(16===(b.Cb&112)){var d=b.Cb>>3&1;0===c?a.s=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.s))+1);c=a.m.get(d);if(255===b.Cb&&255===b.bc||!b.Cb&&!b.bc||!ot(b.Cb)||!ot(b.bc))return 45<=++a.l&<(a),null;a.l=0;b.Cb&=127;b.bc&=127;var e=b.Cb;if(1<=e&&15>=e||!b.Cb&&!b.bc)return null;e=null;if(16===(b.Cb&112))a:{a.B.add(d),d=b.Cb;a=b.bc;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f= | |
null;var g=95<a?a-96:a-64;13>=g?d=Qs[Math.floor(g/2)]:15>=g?e=!0:f=Math.floor((g-16)/2);a=1===(a&1);4!==c.h&&(g=c.g,3===c.h&&b!==g.g&&(c=1+b-g.h,Ks(g,c,1+g.g-g.h,g.h),Es(g,0,c-1),Es(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.u=f,g.s="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Fs(c.g,0,32),d=!1,b=Qs[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Ps[(a& | |
14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))Fs(c.g,1,a);else if(18===(d&246)&&32===(a&224))Fs(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.bc){case 32:Ns(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Ms(c,2,a);break;case 38:d=Ms(c,3,a);break;case 39:d=Ms(c,4,a);break;case 40:Fs(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Bs(c.s);Os(c);break;case 43:Os(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=Cs(b,c.l,a));Es(b,0,15);break;case 45:b= | |
c.g;3!==c.h?d=null:(d=Cs(b,c.l,a),e=b.g-b.h+1,Ks(b,e-1,e,b.h),Es(b,0,e-1),Es(b,b.g,15-b.g),c.l=a);break;case 46:Es(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=Cs(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Ns(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.B=a-32)}e=null}else a=b.bc,Fs(c.g,0,b.Cb),Fs(c.g,0,a);return e} | |
function nt(a,b){var c=[];try{for(;b.Ha();){var d=at(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=at(b).value&63);if(0!=e){a.B.add("svc"+e);a.j.has(e)||a.j.set(e,new bt(e));for(var g=a.j.get(e),h=b.Pa();b.Pa()-h<f;){e=g;var k=b,l=at(k),m=l.value,n=l.pts;if(16===m){var q=at(k);m=m<<16|q.value}if(0<=m&&31>=m)var r=ct(e,k,m,n);else if(128<=m&&159>=m)r=dt(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m& | |
255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&(127===k?Us(e.g,"\u266a"):Us(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&Us(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(jt.has(k)){var t=jt.get(k);Us(e.g,t)}else Us(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?Us(e.g,"_"):Us(e.g,"[CC]"));r=[]}c.push.apply(c,x(r))}}}}catch(w){if(w instanceof U&&3E3===w.code)db("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data."); | |
else throw w;}return c}function ot(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}kt.prototype.getStreams=function(){return Array.from(this.B)};S("shaka.cea.CeaDecoder",kt);Md=function(){return new kt};function pt(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function qt(){this.j=new Map;this.i=this.h=0;this.g=rt} | |
qt.prototype.init=function(a){function b(f){f=f.name;f in st&&(c.g=st[f])}var c=this,d=[],e=[];(new zh).box("moov",Eh).box("mvex",Eh).X("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.V();g=g.V();c.h=f;c.i=g}).box("trak",Eh).X("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.V();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.Ba();g.Ba();g.Ba();g.Ba();d.push(h)}).box("mdia",Eh).X("mdhd", | |
function(f){f=vj(f.reader,f.version);e.push(f.timescale)}).box("minf",Eh).box("stbl",Eh).X("stsd",Gh).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",Hh).box("sinf",Eh).box("frma",function(f){f=yj(f.reader).codec;f in st&&(c.g=st[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new U(2,2,2010);this.g==rt&&cb("Unable to determine bitstream format for CEA parsing!"); | |
d.forEach(function(f,g){c.j.set(f,e[g])})}; | |
qt.prototype.parse=function(a){var b=this;if(this.g==rt)return[];var c=[],d=0,e=[];(new zh).box("moof",function(f){d=f.start;e=[];Eh(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Nd:b.h,Fe:b.i,si:[],timescale:9E4});Eh(f)}).X("trun",function(f){var g=e[e.length-1];f=wj(f.reader,f.version,f.flags);g.si.push(f)}).X("tfhd",function(f){var g=e[e.length-1];f=tj(f.reader,f.flags);g.Nd=f.Nd||b.h;g.Fe=f.Fe||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).X("tfdt",function(f){var g=e[e.length- | |
1];f=uj(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Pa(),k=u(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw cb("Unable to find base media decode time for CEA captions!"),new U(2,2,2010);f.reader.seek(h);tt(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Nd,l.Fe,g,l.si,c)}}).parse(a,!1);return c}; | |
function tt(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(t){return t.Di});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].qj);b.Ha();){g=b.V();var q=b.$(),r=null;r=!1;h=1;switch(a.g){case ut:r=q&31;r=6==r;break;case vt:h=2;b.skip(1);r=q>>1&63;r=39==r||40==r;break;case wt:h=2;b.skip(1);r=q>>1&63;r=23==r||24==r;break;default:return}if(r)for(q=0,l<n.length&&(q=n[l].mf||0),q=(c+q)/d,h=u(pt(b.Ub(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:q});else try{b.skip(g- | |
h)}catch(t){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].ah||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",qt);var rt=0,ut=1,vt=2,wt=3,st={avc1:ut,avc3:ut,dvav:ut,dva1:ut,hev1:vt,hvc1:vt,dvh1:vt,dvhe:vt,vvc1:wt,vvi1:wt,dvc1:wt,dvi1:wt};Ld["video/mp4"]=function(){return new qt};function xt(){this.g=null}xt.prototype.init=function(){};xt.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Nj;var b=[];a=Mb(a);if(!Vj(a))return b;a=this.g.parse(a);var c=a.Od(),d=a.Pe();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=u(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=u(pt(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b}; | |
S("shaka.cea.TsCeaParser",xt);Ld["video/mp2t"]=function(){return new xt};function yt(a){var b=0,c=Qb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Mb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function zt(a){a=Mc(ne(a));a=yt(a).filter(function(b){return b.type===At})[0];if(!a)return null;a=Cc(a.value,!0);return(a=fe(a,"WRMHEADER"))?a:null} | |
function Bt(a){try{var b=zt(a);if(b)a:{for(var c=u(pe(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=u(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if("LA_URL"==h.tagName){var k=ne(h);break a}}}k=""}else k="";return k}catch(l){return""}}var At=1;function Ct(a,b,c){var d=Dt(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new U(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Bd});if(1<f.length)throw new U(2,4,4050);f.length&&(g=Et(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Bd}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Bd?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!= | |
l.Bd});f.length&&(a=Ft(e,k,f,c,h),0==a.length&&(a=[Rc("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=u(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Rc(c,k,e));if(h=Array.from(h)[0]||null)for(k=u(a),b=k.next();!b.done;b=k.next())for(b=u(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Nh:h,wm:e,drmInfos:a,Rf:g,Sh:!0}} | |
function Gt(a,b,c,d){var e=Ct(a,c,d);if(b.Sh){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Sh=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new U(2,4,4008);return e.Nh||b.Nh} | |
function Ht(a){var b=se(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=ne(b)))return b;if((b=se(a.node,"urn:microsoft:playready","pro"))&&ne(b))return Bt(b);if(a=se(a.node,"urn:mpeg:cenc:2013","pssh"))if(a=ne(a)){b=Mc(a);a=8;b=Qb(b);var c=b.getUint8(a);a+=20;0<c&&(a+=4+16*b.getUint32(a));a=Mb(b,a+4);a=Kc(a);a=fe("<pro>"+a+"</pro>");return Bt(a)}return""} | |
function Ft(a,b,c,d,e){var f=[];c=u(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Bd];if(h){var k;if((k=se(g.node,"urn:microsoft:playready","pro"))&&ne(k)){k=ne(k);k=Mc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Lh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Bd){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2, | |
172,227,60,30,82,226,251,75]),q=new Uint8Array([]);l=[{initData:Lh(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Rc(h,b,g.init||a||k||l);if(h=It.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Dt(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=Jt(c.value))&&b.push(c);return b} | |
function Jt(a){var b=a.attributes.schemeIdUri,c=xe(a,"urn:mpeg:cenc:2013","default_KID"),d=te(a,"urn:mpeg:cenc:2013","pssh").map(oe),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new U(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Mc(g),keyId:null}})}catch(g){throw new U(2,4,4007);}return{node:a,Bd:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}} | |
function Et(a){if(!window.crypto||!window.crypto.subtle)throw cb("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var b=se(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new U(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new U(2,4,4051);b=se(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new U(2,4,4051);a=b.attributes.IV;b=Ic(b.attributes.keyUriTemplate); | |
if(!a||!b)throw new U(2,4,4051);a=Nc(a.substr(2));if(16!=a.byteLength)throw new U(2,4,4048);return{rk:b,iv:a}} | |
var It=(new Map).set("com.apple.fps",function(a){if(yc())throw new U(2,4,4054);if(a=se(a.node,"https://dashif.org/CPS","Laurl"))if(a=ne(a))return a;return""}).set("com.widevine.alpha",function(a){var b=se(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ne(b))?b:(a=se(a.node,"urn:microsoft","laurl"))?Ic(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",Ht).set("com.microsoft.playready.recommendation",Ht).set("com.microsoft.playready.software",Ht).set("com.microsoft.playready.hardware", | |
Ht).set("org.w3.clearkey",function(a){var b=se(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ne(b))?b:(a=se(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=ne(a))?a:""});function Kt(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&cb("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString(); | |
break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})} | |
function Lt(a,b){var c=Mt(a,b,"timescale"),d=1;c&&(d=De(c)||1);c=Mt(a,b,"duration");var e=(c=De(c||""))?c/d:null,f=Mt(a,b,"startNumber"),g=Number(Mt(a,b,"presentationTimeOffset"))||0,h=Ee(f||"");if(null==f||null==h)h=1;f=null;if(b=Nt(a,b,"SegmentTimeline")){b=me(b,"S");f=d;a=a.ya.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var q=b[n],r=b[n+1],t=we(q,"t",Ee),w=we(q,"d",Ee),v=we(q,"r",Ce);q=we(q,"k",Ce)||0;null!=t&&(t-=g);if(w){t=null!=t?t:m;v=v||0;if(0>v)if(r){r=we(r,"t",Ee);if(null== | |
r)break;else if(t>=r)break;v=Math.ceil((r-t)/w)-1}else{if(Infinity==a)break;else if(t/f>=a)break;v=Math.ceil((a*f-t)/w)-1}0<l.length&&t!=m&&(l[l.length-1].end=t/f);for(r=0;r<=v;++r)m=t+w,l.push({start:t/f,end:m/f,xh:t,Zb:q,Uk:l.length+k}),t=m}}f=l}return{timescale:d,yf:c,ib:e,ke:h,Cc:g/d||0,wh:g,timeline:f}}function Ot(a,b){return[b(a.N),b(a.va),b(a.Da)].filter(Xf)}function Mt(a,b,c){b=Ot(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a} | |
function Nt(a,b,c){b=Ot(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=qe(d.value,c));d=b.next());return a} | |
function Pt(a,b,c,d,e,f){for(var g=xe(a,"http://www.w3.org/1999/xlink","href"),h=xe(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=u(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=he("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Yg(new U(2,4,4028));if("onLoad"!=h)return Yg(new U(2,4,4027));var q=Qc([d],[g]);return e.request(0,kh(q,b)).Wa(function(r){r=ee(r.data,a.tagName);if(!r)return Yg(new U(2,4,4001,g));for(a.children= | |
[];r.children.length;){var t=r.children.shift();a.children.push(t)}t=u(Object.keys(r.attributes));for(var w=t.next();!w.done;w=t.next())w=w.value,a.attributes[w]=r.attributes[w];return Qt(a,b,c,q[0],e,f+1)})} | |
function Qt(a,b,c,d,e,f){f=void 0===f?0:f;if(xe(a,"http://www.w3.org/1999/xlink","href")){var g=Pt(a,b,c,d,e,f);c&&(g=g.Wa(void 0,function(){return Qt(a,b,c,d,e,f)}));return g}g=[];for(var h=u(le(a)),k=h.next(),l={};!k.done;l={Jd:void 0},k=h.next())l.Jd=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==xe(l.Jd,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Jd}}(l)):"SegmentTimeline"!=l.Jd.tagName&&g.push(Qt(l.Jd,b,c,d,e,f));return bh(g).Wa(function(){return a})} | |
;function Rt(a,b,c,d,e,f,g){var h,k=(new zh).X("sidx",function(l){h=St(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new U(2,3,3004);} | |
function St(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.V();if(0==k)throw new U(2,3,3005);if(0==g.version){var l=g.reader.V();var m=g.reader.V()}else l=g.reader.zd(),m=g.reader.zd();g.reader.skip(2);var n=g.reader.Ba();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.V(),r=(q&2147483648)>>>31;q&=2147483647;var t=g.reader.V();g.reader.skip(4);if(1==r)throw new U(2,3,3006);h.push(new Zi(l/k+c,(l+t)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=t;a+=q}g.parser.stop();return h};function Tt(a){this.h=Qb(a);this.g=new wh(this.h,0)}Tt.prototype.Ha=function(){return this.g.Ha()}; | |
function Ut(a){var b=Vt(a);if(7<b.length)throw new U(2,3,3002);var c=0;b=u(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Vt(a);a:{d=u(Wt);for(var e=d.next();!e.done;e=d.next())if(Lb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Pa();else{if(8==b.length&&b[1]&224)throw new U(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Pa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Pa();d=Qb(a.h,a.g.Pa(),b);a.g.skip(b);return new Xt(c, | |
d)}function Vt(a){var b=a.g.Pa(),c=a.g.$();if(0==c)throw new U(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Mb(a.h,b,c)}var Wt=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Xt(a,b){this.id=a;this.g=b} | |
function Yt(a){if(8<a.g.byteLength)throw new U(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new U(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Zt(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Tt(a.g);for(var n=null,q=null;a.Ha();){var r=Ut(a);if(187==r.id){var t=$t(r);t&&(r=c*t.ol,t=b+t.Kk,null!=n&&m.push(new Zi(n+g,r+g,l,q,t-1,f,g,h,k)),n=r,q=t)}}null!=n&&m.push(new Zi(n+g,d+g,l,q,null,f,g,h,k));return m} | |
function $t(a){var b=new Tt(a.g);a=Ut(b);if(179!=a.id)throw new U(2,3,3013);a=Yt(a);b=Ut(b);if(183!=b.id)throw new U(2,3,3012);b=new Tt(b.g);for(var c=0;b.Ha();){var d=Ut(b);if(241==d.id){c=Yt(d);break}}return{ol:a,Kk:c}};function au(a,b,c){b=Nt(a,b,"Initialization");if(!b)return null;var d=a.N.gb(),e=b.attributes.sourceURL;e&&(d=Qc(d,[Ic(e)],a.Ib()));e=0;var f=null;if(b=we(b,"range",Be))e=b.start,f=b.end;c=new Xi(function(){return d},e,f,bu(a),null,null,c);c.codecs=a.N.codecs;c.mimeType=a.N.mimeType;return c} | |
function cu(a,b,c){var d=Number(Mt(a,du,"presentationTimeOffset"))||0,e=Mt(a,du,"timescale"),f=1;e&&(f=De(e)||1);var g=d/f||0,h=au(a,du,c);eu(a,h);var k=ce(a);return{Lc:function(){var l=Nt(k,du,"RepresentationIndex");var m=k.N.gb();l&&(l=Ic(l.attributes.sourceURL))&&(m=Qc(m,[l],k.Ib()));l=fu(k);return gu(k,b,h,m,l.start,l.end,g)}}} | |
function gu(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I;return P(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.dc||!a.ya.di,l=a.ya.start,m=a.ya.duration,n=a.N.mimeType.split("/")[1],q=b,r=null,t=[q(d,e,f,!1),"webm"==n?q(c.S(),c.eb,c.Na,!0):null],q=null,G(F,Promise.all(t),2);w=F.h;v=w[0];z=w[1]||null;y=null;A=l-g;E=l;C=m?l+m:Infinity;if("mp4"==n)var L=Rt(v,e,d,c,A,E,C);else{L=v;var J=new Tt(z);if(440786851!=Ut(J).id)throw new U(2,3,3008);var K=Ut(J);if(408125543!=K.id)throw new U(2, | |
3,3009);J=K.g.byteOffset;K=new Tt(K.g);for(var O=null;K.Ha();){var M=Ut(K);if(357149030==M.id){O=M;break}}if(!O)throw new U(2,3,3010);O=new Tt(O.g);M=1E6;for(K=null;O.Ha();){var N=Ut(O);if(2807729==N.id)M=Yt(N);else if(17545==N.id)if(4==N.g.byteLength)K=N.g.getFloat32(0);else if(8==N.g.byteLength)K=N.g.getFloat64(0);else throw new U(2,3,3003);}if(null==K)throw new U(2,3,3011);O=M/1E9;K*=O;L=Ut(new Tt(L));if(475249515!=L.id)throw new U(2,3,3007);L=Zt(L,J,O,K,d,c,A,E,C)}y=L;B=u(y);for(D=B.next();!D.done;D= | |
B.next())I=D.value,I.codecs=a.N.codecs,I.mimeType=a.N.mimeType,I.bandwidth=a.bandwidth;h.be(y);r=new ql(y);k&&r.ld(E,C,!0);return F.return(r)})}function du(a){return a.Dd}function fu(a){var b=Nt(a,du,"RepresentationIndex");a=Mt(a,du,"indexRange");a=Be(a||"");b&&(a=we(b,"range",Be,a));return a}function eu(a,b){hu(a,b);if(!fu(a))throw new U(2,4,4002);} | |
function hu(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Wc&&"mp4"!=c&&"webm"!=c)throw new U(2,4,4006);if("webm"==c&&!b)throw new U(2,4,4005);} | |
function bu(a){var b=a.N;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.df,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.va.label||null,roles:a.roles||null,language:a.va.language||null}};function iu(a,b,c){var d=au(a,ju,c),e=ku(a);if(!e.ib&&!e.timeline&&1<e.vd.length)throw new U(2,4,4002);if(!e.ib&&!a.ya.duration&&!e.timeline&&1==e.vd.length)throw new U(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new U(2,4,4002);var f=null,g=null;a.Da.id&&a.N.id&&(g=b[a.Da.id+","+a.N.id])&&(f=g.segmentIndex);var h=lu(a.ya.start,a.ya.duration,a.N.gb,e,d,c,a.N.mimeType,a.N.codecs,a.bandwidth,a.Ib);b=!f;f?f.$d(h,a.presentationTimeline.Eb()):f=new ql(h);a.presentationTimeline.be(h);a.dc&&a.ya.di|| | |
f.ld(a.ya.start,a.ya.duration?a.ya.start+a.ya.duration:Infinity,b);g&&(g.segmentIndex=f);return{Lc:function(){f&&0!=f.getNumReferences()||f.Ze(h);return Promise.resolve(f)}}}function ju(a){return a.qc}function ku(a){var b=mu(a);a=Lt(a,ju);var c=a.ke;0==c&&(c=1);var d=0;a.ib?d=a.ib*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ib:a.ib,startTime:d,ke:c,Cc:a.Cc,timeline:a.timeline,vd:b}} | |
function lu(a,b,c,d,e,f,g,h,k,l){var m=d.vd.length;d.timeline&&d.timeline.length!=d.vd.length&&(m=Math.min(d.timeline.length,d.vd.length));for(var n=a-d.Cc,q=b?a+b:Infinity,r=[],t=d.startTime,w={},v=0;v<m;w={Af:void 0,nf:void 0},v++){w.nf=d.vd[v];var z=t;t=void 0;t=null!=d.ib?z+d.ib:d.timeline?d.timeline[v].end:z+b;w.Af=null;w=new Zi(a+z,a+t,function(y){return function(){null==y.Af&&(y.Af=Qc(c(),[y.nf.Ak],l()));return y.Af}}(w),w.nf.start,w.nf.end,e,n,a,q,[],"",null,null,$i,f);w.codecs=h;w.mimeType= | |
g;w.bandwidth=k;r.push(w)}return r}function mu(a){return[a.N.qc,a.va.qc,a.Da.qc].filter(Xf).map(function(b){return me(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.Fg&&(a.Fg=!0);var c=Ic(b.attributes.media);b=we(b,"mediaRange",Be,{start:0,end:null});return{Ak:c,start:b.start,end:b.end}})};function nu(a,b,c,d,e,f,g,h,k){k||a.N.Re||(a.N.Re=Mt(a,ou,"initialization"));var l=a.N.Re?pu(a,g):null,m=qu(a);ru(m);var n=ce(a);if(m.Wd)return hu(a,l),{Lc:function(){var w=Kt(m.Wd,n.N.id,null,null,n.bandwidth||null,null);w=Qc(n.N.gb(),[w]);return gu(n,b,l,w,0,null,m.Cc)}};if(m.ib)return d||"image"===a.va.contentType||"text"===a.va.contentType||(c=a.ya.start,d=a.Da.id,k=a.ya.duration,d=(d=null!=d&&f[d]||k)?c+d:Infinity,a.presentationTimeline.Og(m.ib),a.presentationTimeline.pi(c,d)),{Lc:function(){return su(n, | |
m,e,l,f,g,h,a.N.pf)}};var q=null;d=d=null;a.Da.id&&a.N.id&&(d=a.Da.id+","+a.N.id,d=c[d])&&(q=d.segmentIndex);var r=a.ya.start,t=a.ya.duration?r+a.ya.duration:Infinity;q?(c=q,tu(c,m,r,t,l),c.bb(a.presentationTimeline.Eb())):q=new uu(m,a.N.id,a.bandwidth,a.N.gb,a.Ib,r,t,l,g,a.N.pf);m.timeline&&"image"!==a.va.contentType&&"text"!==a.va.contentType&&a.presentationTimeline.ri(q.h?q.h.timeline:[],r);d&&a.dc&&(d.segmentIndex=q);return{Lc:function(){q instanceof uu&&0==q.getNumReferences()&&tu(q,m,r,t,l); | |
return Promise.resolve(q)}}}function ou(a){return a.Dc}function qu(a){var b=Lt(a,ou),c=Mt(a,ou,"media"),d=Mt(a,ou,"index"),e=Mt(a,ou,"k"),f=0;e&&(f=parseInt(e,10));return{yf:b.yf,ib:b.ib,timescale:b.timescale,ke:b.ke,Cc:b.Cc,wh:b.wh,timeline:b.timeline,zc:c&&Ic(c),Wd:d,mimeType:a.N.mimeType,codecs:a.N.codecs,bandwidth:a.bandwidth,Bk:f}} | |
function ru(a){var b=a.Wd?1:0;b+=a.timeline?1:0;b+=a.ib?1:0;if(0==b)throw new U(2,4,4002);1!=b&&(a.Wd&&(a.timeline=null),a.yf=null,a.ib=null);if(!a.Wd&&!a.zc)throw new U(2,4,4002);} | |
function su(a,b,c,d,e,f,g,h){function k(K){var O=K-v,M=O*w,N=b.yf,R=O*N;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(O)*BigInt(N));M+=q;O=M+w;N=Math.min(O,m());var Q=[],V=b.Bk;if(V)for(var ba=(N-M)/V,ia={},xa=0;xa<V;ia={Pi:void 0},xa++){var Ea=M+ba*xa,va=Ea+ba;ia.Pi=xa+1;ia=new Zi(Ea,va,function(Ba){return function(){var La=Kt(z,A,K,Ba.Pi,y,R);return Qc(E(),[La],C())}}(ia),0,null,d,B,q,m(),[],"",null,null,$i,f);ia.codecs=a.N.codecs;ia.mimeType=a.N.mimeType;0==h?0<xa&&ia.td():0!=xa%h&&ia.td(); | |
Q.push(ia)}M=new Zi(M,N,function(){if(V)return[];var Ba=Kt(z,A,K,null,y,R);return Qc(E(),[Ba],C())},0,null,d,B,q,m(),Q,"",null,null,$i,f,0<Q.length);M.codecs=a.N.codecs;M.mimeType=a.N.mimeType;M.bandwidth=a.bandwidth;M.j=O;return M}function l(){var K=[Math.max(n.Eb(),q),Math.min(n.wc(),m())].map(function(O){return O-q});K=[Math.ceil(K[0]/w),Math.ceil(K[1]/w)-1];a.N.ub&&K[1]++;return K.map(function(O){return O+v})}function m(){var K=null!=r&&e[r]||t;return K?q+K:Infinity}var n=a.presentationTimeline, | |
q=a.ya.start,r=a.Da.id,t=a.ya.duration,w=b.ib,v=b.ke,z=b.zc,y=a.bandwidth||null,A=a.N.id,E=a.N.gb,C=a.Ib,B=q-b.Cc,D=l();c=a.dc?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var I=c;I<=g;++I){var F=k(I);D.push(F)}var L=new ql(D);D=n.wc()<m();I=n.T();if(D||I){var J=Math.max(c,g+1);c=w;a.N.ub&&(c=.1);L.zf(c,function(){var K=n.Eb();L.bb(K);var O=u(l());O.next();O=O.next().value;for(var M=[];J<=O;){var N=k(J);M.push(N);J++}return K>m()&&!M.length?null:M})}return Promise.resolve(L)} | |
function pu(a,b){var c=a.N.Re;c||(c=Mt(a,ou,"initialization"));if(!c)return null;c=Ic(c);var d=a.N.id,e=a.bandwidth||null,f=a.N.gb,g=a.Ib;b=new Xi(function(){var h=Kt(c,d,null,null,e,null);return Qc(f(),[h],g())},0,null,bu(a),null,null,b);b.codecs=a.N.codecs;b.mimeType=a.N.mimeType;return b}function uu(a,b,c,d,e,f,g,h,k,l){ql.call(this,[]);this.h=a;this.H=b;this.C=c;this.G=d;this.J=e;this.j=f;this.l=g;this.u=h;this.B=k;this.I=l;vu(this)}pa(uu,ql);p=uu.prototype; | |
p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){ql.prototype.release.call(this);this.h=null};p.bb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}}; | |
function tu(a,b,c,d,e){wu(a,e);if(a.h){c=a.h.timeline;a.h.zc!==b.zc&&(a.h.zc=b.zc);if(c.length){var f=c[c.length-1];b=b.timeline.filter(function(g){return g.end>f.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;vu(a)}function wu(a,b){if(a.u!==b){a.u=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&bj(c,b)}} | |
function vu(a){if(!a.s){for(var b=[],c=u(a.h.timeline),d=c.next();!d.done;d=c.next())d=d.value,d.start>=a.l||0>=d.end||b.push(d);a.h.timeline=b;a.bb(a.j)}} | |
p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null}; | |
p.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Uk,f=d.xh+this.h.wh;c=this.j-this.h.Cc;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],q=(d.end-d.start)/d.Zb,r={},t=0;t<d.Zb;r={Bf:void 0,Qi:void 0},t++){var w=d.start+q*t,v=w+q;r.Qi=t+1;r.Bf=null;r=new Zi(this.j+w,this.j+v,function(z){return function(){if(!b.h)return[]; | |
null==z.Bf&&(z.Bf=xu(b.h.zc,b.H,e,b.C,f,z.Qi,b.G,b.J));return z.Bf}}(r),0,null,this.u,c,this.j,this.l,[],"",null,null,$i,this.B);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.I?0<t&&r.td():0!=t%this.I&&r.td();n.push(r)}c=new Zi(this.j+d.start,h,function(){return 0<d.Zb||!b.h?[]:xu(b.h.zc,b.H,e,b.C,f,null,b.G,b.J)},0,null,this.u,c,this.j,this.l,n,"",null,null,$i,this.B,0<d.Zb);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c}; | |
p.Xb=function(a){vu(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function xu(a,b,c,d,e,f,g,h){a=Kt(a,b,c,f,d||null,e);return Qc(g(),[a],h()).map(function(k){return k.toString()})};function yu(a){this.s=null;this.B=a;this.I=new dh;this.i=[];this.h=null;this.m=[];this.C=null;this.H=[];this.G=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}yu.prototype.configure=function(a){this.s=a};yu.prototype.destroy=function(){this.B=this.s=null;this.i=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};yu.prototype.setManifestType=function(a){this.u=a}; | |
function zu(a,b){var c,d,e,f,g,h,k;return P(function(l){if(1==l.g)return c=Qc(a.i,[Au(a,b)]),d=kh(c,a.s.retryParameters),e=a.B.networkingEngine.request(8,d),eh(a.I,e),ta(l,2),G(l,e.promise,4);if(2!=l.g)return f=l.h,g=Bc(f.data),h=JSON.parse(g),1==h.VERSION&&Bu(a,h,f.uri),wa(l,0);if((k=ya(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new ac(function(){zu(a,b)});a.g.Y(a.G);H(l)})} | |
function Au(a,b){if(!a.m.length)return b;b=new sb(b);var c=a.C||a.m[0],d=Math.round(a.B.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Jb(e)&&xb(b,e);return b.toString()}function Bu(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new ac(function(){zu(a,d)});if(c=b.TTL)a.G=c;a.g.Y(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]} | |
function Cu(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}yu.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)}; | |
function Du(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=u(a.m),f=e.next(),g={};!f.done;g={xd:void 0},f=e.next())if(g.xd=f.value,f=b.get(g.xd))d.push({Ug:g.xd,location:f});else if(f=a.H.find(function(k){return function(l){return l.Ll==k.xd}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].bj?(h=new sb(h),vb(h,f["URI-REPLACEMENT"].bj),d.push({Ug:g.xd,location:h.toString()})):d.push({Ug:g.xd,location:h}))}e=Date.now();g=u(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value, | |
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=u(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new sb(k.location)).Kb))return!1;return!0});d.length&&(a.C=d[0].Ug);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=u(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.C=a.h,d.push(g);if(!d.length)for(b=u(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Qc(a.i,d)};function Eu(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.s=!1;this.m=new Set}p=Eu.prototype;p.release=function(){for(var a=u(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.u=this.s=!1;this.m.clear()};p.bk=function(){return this.l};p.zg=function(){return this.j.slice()};p.Fj=function(){return this.i}; | |
p.Oh=function(a,b){if(a){if("audio"==a.type)for(var c=u(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=u(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==Wc)for(c=u(this.j),d=c.next();!d.done;d=c.next())d= | |
d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=u(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}}; | |
function Fu(a,b){var c=[],d=[],e=[],f=[];a=u(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Gu(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Hu(n),n]})),l=new Map(h.textStreams.map(function(n){return[Iu(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Ju(n),n]}));if(b){var m=Ku(Wc);l.set(Iu(m),m);m=Ku("image");h.set(Ju(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Fh:c,Zi:d,Ti:e,ai:f}} | |
p.Yf=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N,R,Q;return P(function(V){if(1==V.g){e=Yc;if(!b&&1==a.length)return f=Fu(a,!1),g=f.Fh,h=f.Zi,k=f.Ti,l=f.ai,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),V.A(2);m=c?d.m.size:0;n=-1;for(q=0;q<a.length;q++)r=a[q],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=q));if(-1==n)return V.return();t=Fu(a,!0);w=t.Fh;v=t.Zi;z=t.Ti;y=t.ai;return G(V, | |
Promise.all([Lu(d,d.h,w,n,Mu,Nu,m),Lu(d,d.g,v,n,Mu,Nu,m),Lu(d,d.j,z,n,Mu,Nu,m),Lu(d,d.i,y,n,Mu,Nu,m)]),2)}A=0;E=[];if(d.g.length&&d.h.length)for(L=u(d.h),J=L.next();!J.done;J=L.next())for(K=J.value,O=u(d.g),M=O.next();!M.done;M=O.next())N=M.value,R=Ub(K.drmInfos,N.drmInfos),K.drmInfos.length&&N.drmInfos.length&&!R.length||(Q=A++,E.push({id:Q,language:K.language,disabledUntilTime:0,primary:K.primary,audio:K,video:N,bandwidth:(K.bandwidth||0)+(N.bandwidth||0),drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0, | |
decodingInfos:[]}));else for(C=d.g.length?d.g:d.h,B=u(C),D=B.next();!D.done;D=B.next())I=D.value,F=A++,E.push({id:F,language:I.language,disabledUntilTime:0,primary:I.primary,audio:I.type==e.ba?I:null,video:I.type==e.Ca?I:null,bandwidth:I.bandwidth||0,drmInfos:I.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=E;H(V)})}; | |
function Ou(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M;return P(function(N){switch(N.g){case 1:b=Yc;if(1==a.length)return N.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ba}).map(function(Q){return[Gu(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Ca}).map(function(Q){return[Hu(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Oa}).map(function(Q){return[Iu(Q), | |
Q]}))});f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Mf}).map(function(Q){return[Ju(Q),Q]}))});g=u(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Pu(b.Oa),k.set(Iu(l),l);m=u(f);for(n=m.next();!n.done;n=m.next())q=n.value,r=Pu(b.Mf),q.set(Ju(r),r);t=new Eu;return G(N,Lu(t,[],c,0,Qu,Ru,0),2);case 2:return w=N.h,G(N,Lu(t,[],d,0,Qu,Ru,0),3);case 3:return v=N.h,G(N,Lu(t,[],e,0,Qu,Ru,0),4);case 4:return z=N.h,G(N,Lu(t,[],f,0,Qu,Ru,0),5);case 5:y=N.h;A=0;if(v.length&&w.length)for(I= | |
u(w),F=I.next();!F.done;F=I.next())for(L=F.value,J=u(v),K=J.next();!K.done;K=J.next())O=K.value,M=A++,O.variantIds.push(M),L.variantIds.push(M);else for(E=v.concat(w),C=u(E),B=C.next();!B.done;B=C.next())D=B.value,D.variantIds=[A++];return N.return(v.concat(w).concat(z).concat(y))}})} | |
function Lu(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L;return P(function(J){switch(J.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=u(b);m=l.next();case 2:if(m.done){J.A(4);break}n=m.value;return G(J,Su(a,n,c,d,f,h,g),5);case 5:q=J.h;if(!q)throw new U(2,4,4037);m=l.next();J.A(2);break;case 4:r=u(h);for(t=r.next();!t.done;t=r.next())for(w=t.value,v=u(w),z=v.next();!z.done;z=v.next())y=z.value,(A=Tu(a,y,c,e,f,h))&&b.push(A);E=u(h);for(C=E.next();!C.done;C= | |
E.next())for(B=C.value,D=u(B),I=D.next(),F={};!I.done;F={nh:void 0},I=D.next())if(F.nh=I.value,!Uu(F.nh)&&(L=b.some(function(K){return function(O){return Vu(a,K.nh,O)}}(F))))throw new U(2,4,4037);return J.return(b)}})}function Su(a,b,c,d,e,f,g){return P(function(h){if(1==h.g)return Wu(a,c,b,0<g),b.matchedStreams?b.segmentIndex?G(h,Xu(b,d+g),2):h.A(2):h.return(!1);Yu(b,d,e,f,g);return h.return(!0)})} | |
function Xu(a,b){var c,d,e,f,g,h;return P(function(k){if(1==k.g){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex());return G(k,Promise.all(c),2)}if(a.segmentIndex instanceof tl)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);H(k)})} | |
function Tu(a,b,c,d,e,f){if(Uu(b))return null;var g=d(b);Wu(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return P(function(h){if(g.segmentIndex)return h.A(0);g.segmentIndex=new tl;return G(h,Xu(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;Yu(g,0,e,f,0);return g} | |
function Yu(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==id(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=u(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}} | |
function Mu(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=u(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions): | |
null;b.trickModeVideo=null;return b}function Qu(a){var b=Object.assign({},a);b.roles=b.roles.slice();b.keyIds=new Set;b.segments=[];b.variantIds=[];b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;return b} | |
function Nu(a,b){function c(g,h){g||(g=[]);h=u(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=u(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Ub(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new U(2, | |
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=u(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Mu(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve(); | |
for(var g=new tl,h=u(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),Nu(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),Nu(a.trickModeVideo,b))} | |
function Ru(a,b){var c=a.roles;c||(c=[]);for(var d=u(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=u(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=u(b.closedCaptions),c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)} | |
function Wu(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=u(b);for(var e=b.next();!e.done;e=b.next()){e=Zu(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d} | |
function Zu(a,b,c){var d={audio:Gu,video:Hu,text:Iu,image:Ju}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return Vu(a,l,m)},video:function(l,m){return Vu(a,l,m)},text:$u,image:av}[c.type];for(var g={audio:bv,video:cv,text:dv,image:ev}[c.type],h=u(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.u&&!Uu(e)&&b.delete(d(e));return e} | |
function fv(a,b){return a.mimeType!=b.mimeType?!1:gv(a.codecs)===gv(b.codecs)}p.Ei=function(a){this.s=a};p.Li=function(a){this.u=a};function Vu(a,b,c){return!fv(b,c)&&!a.s||b.drmInfos&&!Tb(b.drmInfos,c.drmInfos)?!1:!0}function $u(a,b){return b.language?a.forced!==b.forced||0==id(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function av(){return!0} | |
function bv(a,b,c){var d=fv(a,b),e=fv(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=id(a.language,b.language);e=id(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1;if(c.roles.length!==b.roles.length)return c.roles.length< | |
b.roles.length}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=hv(a.channelsCount,b.channelsCount,c.channelsCount);if(d==iv)return!0;if(d==jv)return!1;d=hv(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==iv?!0:d==jv?!1:a.bandwidth&&kv(a.bandwidth,b.bandwidth,c.bandwidth)==iv?!0:!1} | |
function cv(a,b,c){var d=fv(a,b),e=fv(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=hv(a.width*a.height,b.width*b.height,c.width*c.height);if(d==iv)return!0;if(d==jv)return!1;if(a.frameRate){d=hv(a.frameRate,b.frameRate,c.frameRate);if(d==iv)return!0;if(d==jv)return!1}return a.bandwidth&&kv(a.bandwidth,b.bandwidth,c.bandwidth)==iv?!0:!1} | |
function dv(a,b,c){var d=id(a.language,b.language),e=id(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0; | |
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function ev(a,b,c){return hv(a.width*a.height,b.width*b.height,c.width*c.height)==iv?!0:!1} | |
function Pu(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}} | |
function Ku(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ql([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1}} | |
function hv(a,b,c){if(b==a&&a!=c)return jv;if(c==a&&a!=b)return iv;if(b>a){if(c<=a||c-a<b-a)return iv;if(c-a>b-a)return jv}else{if(c>a)return jv;if(a-c<a-b)return iv;if(a-c>a-b)return jv}return lv}function kv(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?iv:b<a?jv:lv}function Uu(a){switch(a.type){case Wc:return!a.language;case "image":return!a.tilesLayout;default:return!1}} | |
function Hu(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,gv(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Gu(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,gv(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Iu(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])} | |
function Ju(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function gv(a){if(!mv.has(a)){var b=Hf(a);mv.set(a,b)}return mv.get(a)}S("shaka.util.PeriodCombiner",Eu);Eu.prototype.setUseStreamOnce=Eu.prototype.Li;Eu.prototype.setAllowMultiTypeVariants=Eu.prototype.Ei;Eu.prototype.combinePeriods=Eu.prototype.Yf;Eu.prototype.deleteStream=Eu.prototype.Oh;Eu.prototype.getImageStreams=Eu.prototype.Fj;Eu.prototype.getTextStreams=Eu.prototype.zg;Eu.prototype.getVariants=Eu.prototype.bk; | |
var iv=1,lv=0,jv=-1,mv=new Map;function nv(a,b){var c=new DOMParser,d=ov.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function pv(a,b){try{var c=Ec(a);return nv(c,b)}catch(d){return null}} | |
var ov=new Sb(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function qv(){var a=this;this.j=this.g=null;this.B=[];this.i=null;this.sa=1;this.H=[];this.l={bf:"",type:"",profiles:[],lc:null,ub:0,gb:null,ee:0};this.u=new Map;this.s={};this.C={};this.na={};this.m=new Eu;this.K=0;this.ra=new qd(5);this.L=new ac(function(){if(a.J&&!a.g.continueLoadingWhenPaused&&(a.I.Ja(a.J,"timeupdate"),a.J.paused)){a.I.oa(a.J,"timeupdate",function(){return rv(a)});return}rv(a)});this.P=new dh;this.O=null;this.G=[];this.aa=Infinity;this.ka=!1;this.h=null;this.M=0;this.R=!1;this.I= | |
new td;this.J=null;this.U=!1;this.Z="";this.ea=function(){return!1};this.W=[]}p=qv.prototype;p.configure=function(a,b){var c=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&(this.ea=b);c&&this.i&&this.i.presentationTimeline.T()&&this.L.Ia();this.h&&this.h.configure(this.g);this.m&&(this.m.Ei(this.g.dash.multiTypeVariantsAllowed&&Bd()),this.m.Li(this.g.dash.useStreamOnceInPeriodFlattening))}; | |
p.start=function(a,b){var c=this,d;return P(function(e){if(1==e.g)return c.ka=b.isLowLatencyMode(),c.B=[a],c.j=b,G(e,sv(c),2);d=e.h;c.j&&tv(c,d);if(!c.j)throw new U(2,7,7001);return e.return(c.i)})}; | |
p.stop=function(){for(var a=u(Object.values(this.s)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.B=[];this.i=null;this.s={};this.C={};this.u.clear();this.l={bf:"",type:"",profiles:[],lc:null,ub:0,gb:null,ee:0};this.m=null;null!=this.L&&(this.L.stop(),this.L=null);this.h&&this.h.destroy();this.I&&(this.I.release(),this.I=null);return this.P.destroy()}; | |
p.update=function(){var a=this,b;return P(function(c){if(1==c.g)return ta(c,2),G(c,sv(a),4);if(2!=c.g)return wa(c,0);b=ya(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.T()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.wc();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,tv(this,0))}}}; | |
p.banLocation=function(a){this.h&&this.h.banLocation(a)};p.setMediaElement=function(a){this.J=a}; | |
function sv(a){var b,c,d,e,f,g,h,k,l,m,n;return P(function(q){if(1==q.g)return b=4,c="MPD",d=uv(a),e=a.B,d.length?(e=d,c="Patch",b=6):1<a.B.length&&a.h&&(f=Du(a.h,"Location",!0),f.length&&(e=f)),g=kh(e,a.g.retryParameters),h=Date.now(),G(q,vv(a,g,0,{type:b}),2);if(3!=q.g){k=q.h;if(!a.j)return q.return(0);k.uri&&k.uri!=k.originalUri&&!a.B.includes(k.uri)&&a.B.unshift(k.uri);l=new sb(k.uri);a.Z=l.g.toString();return G(q,wv(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.ra.sample(1,n);return q.return(n)})} | |
function wv(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t;return P(function(w){if(1==w.g){e=b;f=a.g.dash.manifestPreprocessor;g=cn;if(f!=g){Dd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=pv(e,d);if(!h)throw new U(2,4,4001,c);f(h);e=Fc(h.outerHTML)}k=ee(e,d);if(!k)throw new U(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=dn;l!=m&&l(k);if("Patch"===d)return w.return(xv(a,k));if(n=a.g.dash.disableXlinkProcessing)return w.return(yv(a,k,c)); | |
q=a.g.dash.xlinkFailGracefully;r=Qt(k,a.g.retryParameters,q,c,a.j.networkingEngine);eh(a.P,r);return G(w,r.promise,2)}t=w.h;return w.return(yv(a,t,c))})} | |
function yv(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N,R,Q,V,ba,ia,xa,Ea,va,Ba,La,za,Ua,Qa,Aa,hb,$b,ub,nb,ob,Eb,Me,$c,re,cg,dg;return P(function(ld){switch(ld.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=me(b,"Location");h=u(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=oe(l))q=Qc(d,[n])[0],m&&(a.h?Cu(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(r=Du(a.h,"Location",!0),0<r.length&&(d=a.B=r)):e.length&&(d=a.B=e);a.l.bf=b.attributes.id|| | |
"";a.l.ee=we(b,"publishTime",ze)||0;a.H=me(b,"PatchLocation");t=Promise.resolve();if((w=qe(b,"ContentSteering"))&&a.j){v=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=v;else if(a.h=new yu(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=v,z=oe(w))(y=we(w,"queryBeforeStart",Ge,!1))?t=zu(a.h,z):zu(a.h,z);A=u(f.keys());for(E=A.next();!E.done;E=A.next())C=E.value,B=f.get(C),Cu(a.h,"Location",C,B)}D=me(b,"BaseURL");I=!1;if(a.h)for(F=u(D),L=F.next();!L.done;L=F.next())J=L.value, | |
K=J.attributes.serviceLocation,O=oe(J),K&&O&&(Cu(a.h,"BaseURL",K,O),I=!0);a.W=null;I&&a.h||(M=D.map(oe),a.W=Qc(d,M));N=function(){return a.h&&I?Du(a.h,"BaseURL"):a.W?a.W:[]};a.l.gb=N;R=0;D&&D.length&&(R=we(D[0],"availabilityTimeOffset",Fe)||0);a.l.ub=R;a.K=we(b,"minimumUpdatePeriod",Ae,-1);Q=we(b,"availabilityStartTime",ze);V=we(b,"timeShiftBufferDepth",Ae);ba=a.g.dash.ignoreSuggestedPresentationDelay;ia=null;ba||(ia=we(b,"suggestedPresentationDelay",Ae));xa=a.g.dash.ignoreMaxSegmentDuration;Ea=null; | |
xa||(Ea=we(b,"maxSegmentDuration",Ae));va=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.U=a.i.presentationTimeline.T()&&"static"==va);a.l.type=va;if(a.i)for(Ba=a.i.presentationTimeline,La=Ba.Eb(),za=u(Object.values(a.s)),Ua=za.next();!Ua.done;Ua=za.next())Qa=Ua.value,Qa.segmentIndex&&Qa.segmentIndex.bb(La);else Aa=a.g.dash.ignoreMinBufferTime,hb=0,Aa||(hb=we(b,"minBufferTime",Ae)||0),$b=0,$b=null!=ia?Math.min(ia,V||Infinity):0<a.g.defaultPresentationDelay?a.g.defaultPresentationDelay: | |
Math.min(1.5*hb,V||Infinity),Ba=new Vk(Q,$b,a.g.dash.autoCorrectDrift);Ba.$c("static"==va);(ub=Ba.T())&&!isNaN(a.g.availabilityWindowOverride)&&(V=a.g.availabilityWindowOverride);null==V&&(V=Infinity);Ba.rf(V);nb=b.attributes.profiles||"";a.l.profiles=nb.split(",");ob={dc:"static"!=va,presentationTimeline:Ba,Da:null,ya:null,va:null,N:null,bandwidth:0,Fg:!1,ub:R,lc:null,profiles:nb.split(","),roles:null,Ib:function(){return""}};a.M=0;Eb=zv(a,ob,N,b,!1);Me=Eb.duration;$c=Eb.periods;("static"!=va||a.U)&& | |
Eb.Qh||Ba.sb(Me||Infinity);a.R&&a.ka&&Ba.Fi(a.aa);Ba.Og(Ea||1);return G(ld,t,2);case 2:a.R&&a.ka&&(re=null!=ia?ia:a.g.defaultPresentationDelay,Ba.gh(re));if(!a.i)return G(ld,a.m.Yf($c,ob.dc),6);a.i.periodCount=$c.length;a.i.gapCount=a.M;return G(ld,Av(a,$c,!1),4);case 6:a.i={presentationTimeline:Ba,variants:a.m.l,textStreams:a.m.zg(),imageStreams:a.m.i,offlineSessionIds:[],sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Bv(b),nextUrl:Cv(b), | |
periodCount:$c.length,gapCount:a.M,isLowLatency:a.R,startTime:null};if(!Ba.Wi()){ld.A(7);break}cg=me(b,"UTCTiming");return G(ld,Dv(a,N,cg),8);case 8:dg=ld.h;if(!a.j)return ld.return();Ba.Gi(dg);case 7:Ba.Xe();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),Ev(a),H(ld)}})}function Av(a,b,c){var d;return P(function(e){if(1==e.g)return G(e,a.m.Yf(b,!0,c),2);a.i.variants=a.m.l;d=a.m.zg();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})} | |
function xv(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K;return P(function(O){if(1==O.g){c=b.attributes.mpdId;d=we(b,"originalPublishTime",ze);if(!c||c!==a.l.bf||d!==a.l.ee)throw a.H=[],new U(1,4,4052);e=[];f=[];g=new Set;h=u(le(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Ie(l.attributes.sel||""),n=m[m.length-1],q=oe(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.tc){r=oe(l)||"";var M=Ae(r);if(null!=M){a.l.lc=M;for(var N=u(a.u.values()),R=N.next();!R.done;R=N.next())R.value.lc= | |
M}}else if("type"===n.tc){a.i.presentationTimeline.$c("static"==q);a.l.type=q;M=u(a.u.values());for(N=M.next();!N.done;N=M.next())N.value.dc="dynamic"==q;"static"==q&&(a.K=-1)}else"publishTime"===n.tc?a.l.ee=ze(q)||0:null===n.tc&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Je(a.H,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&Fv(a,n.id);else if("SegmentTemplate"===n.name){N=Ie(l.attributes.sel||"");M=N[N.length-1];if(M.tc){N=Gv(a,N);R=oe(l)|| | |
"";for(var Q=u(N),V=Q.next();!V.done;V=Q.next())V=a.u.get(V.value),Le(V.N.Dc,l.tagName,M.tc,R);M=N}else M=[];t=M;w=u(t);for(v=w.next();!v.done;v=w.next())z=v.value,g.add(z)}else if("SegmentTimeline"===n.name||"S"===n.name){M=Ie(l.attributes.sel||"");M=Gv(a,M);N=u(M);for(R=N.next();!R.done;R=N.next())R=a.u.get(R.value),R=Nt(R,ou,"SegmentTimeline"),Q=me(R,"S"),Je(Q,l),R.children=Q;y=M;A=u(y);for(E=A.next();!E.done;E=A.next())C=E.value,g.add(C)}B=u(g);for(D=B.next();!D.done;D=B.next())I=D.value,Hv(a, | |
I);F=u(f);for(L=F.next();!L.done;L=F.next())J=L.value,e.push.apply(e,x(Iv(a,J)));if(!e.length)return O.A(2);a.i.periodCount+=e.length;a.i.gapCount=a.M;return G(O,Av(a,e,!0),2)}"static"==a.l.type&&(K=a.l.lc,a.i.presentationTimeline.sb(K||Infinity));H(O)})} | |
function Iv(a,b){return zv(a,{dc:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,Da:null,ya:null,va:null,N:null,bandwidth:0,Fg:!1,ub:a.l.ub,profiles:a.l.profiles,lc:a.l.lc,roles:null,Ib:function(){return""}},a.l.gb,b,!0).periods}function Fv(a,b){a.i.periodCount--;for(var c=u(a.u.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.u.get(d);Nt(e,ou,"SegmentTimeline").children=[];Hv(a,d);a.u.delete(d)}a.G=a.G.filter(function(f){return f!==b})} | |
function Gv(a,b){var c="",d="",e=-1,f="";b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=u(a.u.values()),a=e.next();!a.done;a=e.next())a=a.value,a.Da.id===c&&a.va.id===d&&a.N.id&&b.push(c+","+a.N.id);else if(-1<e)for(d=u(a.u.values()),a=d.next();!a.done;a=d.next())a=a.value,a.Da.id===c&&a.va.position===e&&a.N.id&&b.push(c+ | |
","+a.N.id);return b}function Hv(a,b){var c=a.u.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.bb(a.i.presentationTimeline.Eb());try{var e=nu(c,function(f,g,h,k){return Jv(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.na,c.N.aesKey,null,!0);d.createSegmentIndex=function(){return P(function(f){if(1==f.g)return d.segmentIndex?f.A(0):G(f,e.Lc(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.N.contentType,b!=Wc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}} | |
function Bv(a){var b=qe(a,"ServiceDescription");if(!b)return null;a=qe(b,"Latency");b=qe(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min))); | |
return c}function Cv(a){a=me(a,"SupplementalProperty");if(!a.length)return null;a=u(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null} | |
function zv(a,b,c,d,e){var f=b.lc;f||(f=we(d,"mediaPresentationDuration",Ae),a.l.lc=f);var g=0;a.i&&a.i.presentationTimeline&&a.U&&(g=a.i.presentationTimeline.fc());var h=[],k=g;d=me(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],q=we(m,"start",Ae,k),r=m.attributes.id,t=we(m,"duration",Ae);q=0==l&&0==q&&a.U?g:q;var w=null;if(n){var v=we(n,"start",Ae);null!=v&&(w=v-q+g)}else null!=f&&(w=f-q+g);v=Zc;w&&t&&Math.abs(w-t)>v&&w>t&&a.M++;null==w&&(w=t);if(!(null!==a.O&&null!==r&&null!==q&&q< | |
a.O)||a.G.includes(r)||l+1==d.length){null!==q&&(null===a.O||q>a.O)&&(a.O=q);k=Kv(a,b,c,{start:q,duration:w,node:m,di:null==w||!n});h.push(k);b.Da.id&&w&&(a.na[b.Da.id]=w);if(null==w){k=null;break}k=q+w}}if(e)for(b=u(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.G.includes(c)||a.G.push(c);else a.G=h.map(function(z){return z.id});return null!=f?{periods:h,duration:f+g,Qh:!1}:{periods:h,duration:k,Qh:!0}} | |
function Ev(a){var b=Object.keys(a.C).filter(function(h){return!a.G.includes(h)});b=u(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=u(a.C[c]),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.s[f];g&&(g.segmentIndex&&0!=g.segmentIndex.getNumReferences()?d=!1:(a.m&&a.m.Oh(a.s[f],c),delete a.s[f]))}d&&delete a.C[c]}} | |
function Kv(a,b,c,d){b.Da=Lv(a,d.node,null,c);b.ya=d;b.Da.ub=b.ub;b.Da.id||(b.Da.id="__shaka_period_"+d.start);var e=me(d.node,"EventStream");c=b.presentationTimeline.Eb();e=u(e);for(var f=e.next();!f.done;f=e.next())Mv(a,d.start,d.duration,f.value,c);c=me(d.node,"SupplementalProperty");c=u(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=Nv(a,e)))b.Ib=e;c=me(d.node,"AdaptationSet").map(function(l,m){return Ov(a,b,m,l)}).filter(Xf);if(b.dc){d= | |
[];e=u(c);for(f=e.next();!f.done;f=e.next()){f=u(f.value.Ok);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new U(2,4,4018);}d=c.filter(function(l){return!l.vh});c=c.filter(function(l){return l.vh});if(!a.g.disableIFrames)for(c=u(c),e=c.next();!e.done;e=c.next()){e=e.value;f=e.vh.split(" ");g=u(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=u(h.streams);for(var k=h.next();!k.done;k=h.next())Ng(k.value,e.streams)}}c=Pv(a.g.disableAudio, | |
d,"audio");e=Pv(a.g.disableVideo,d,"video");f=Pv(a.g.disableText,d,Wc);d=Pv(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.Da.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Pv(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])} | |
function Ov(a,b,c,d){function e(J){var K=J.attributes["dvb:fontFamily"];J=J.attributes["dvb:url"];K&&J&&(J=Qc(b.va.gb(),[J],b.Ib()),a.j.addFont(K,J[0]))}function f(J){switch(J){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(J){switch(J){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.va=Lv(a,d,b.Da,null);b.va.position=c;var h=!1;c=me(d,"Role");var k=c.map(function(J){return J.attributes.value}).filter(Xf), | |
l=void 0,m=b.va.contentType==Wc;m&&(l="subtitle");c=u(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var q=n.attributes.schemeIdUri;if(null==q||"urn:mpeg:dash:role:2011"==q)switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=me(d,"EssentialProperty");c=null;var t=!1;n=null;q=!1;r=u(r);for(var w=r.next();!w.done;w=r.next()){w=w.value;var v=w.attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==v)c=w.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"== | |
v)var z=g(parseInt(w.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==v)var y=f(parseInt(w.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=v&&("urn:mpeg:dash:ssr:2023"==v&&a.g.dash.enableFastSwitching?t=!0:"urn:dvb:dash:fontdownload:2014"==v?e(w):"urn:mpeg:dash:urlparam:2014"==v?(n=Nv(a,w))||(q=!0):q=!0)}if(q)return null;var A=null;q=me(d,"SupplementalProperty");q=u(q);for(r=q.next();!r.done;r=q.next())r=r.value,w=r.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"== | |
w?A=parseInt(r.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?z=g(parseInt(r.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?y=f(parseInt(r.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==w?e(r):"urn:mpeg:dash:urlparam:2014"==w&&(n=Nv(a,r));n&&(b.Ib=n);n=me(d,"Accessibility");var E=new Map,C;n=u(n);for(q=n.next();!q.done;q=n.next())if(r=q.value,q=r.attributes.schemeIdUri,r=r.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=q||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!= | |
q||a.g.disableText)"urn:mpeg:dash:role:2011"==q?null!=r&&(k.push(r),"captions"==r&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==q&&("1"==r?C="visually impaired":"2"==r&&(C="hard of hearing"));else if(q=1,null!=r)for(r=u(r.split(";")),w=r.next();!w.done;w=r.next()){v=w.value;var B=w=void 0;v.includes("=")?(v=v.split("="),w="svc"+v[0],B=v[1].split(",")[0].split(":").pop()):(w="svc"+q,q++,B=v);E.set(w,cd(B))}else E.set("svc1","und");else if(q=1,null!=r)for(r=r.split(";"),w=u(r),v=w.next();!v.done;v= | |
w.next()){B=v.value;var D=v=void 0;B.includes("=")?(B=B.split("="),v=B[0].startsWith("CC")?B[0]:"CC"+B[0],D=B[1]||"und"):(v="CC"+q,2==r.length?q+=2:q++,D=B);E.set(v,cd(D))}else E.set("CC1","und");n=me(d,"ContentProtection");var I=Ct(n,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),F=cd(b.va.language||"und"),L=b.va.label;d=me(d,"Representation");if(!a.g.dash.ignoreSupplementalCodecs){n=[];q=u(d);for(r=q.next();!r.done;r=q.next())if(w=r.value,r=xe(w,"urn:scte:dash:scte214-extensions","supplementalCodecs"))w= | |
be(w),w.attributes.codecs=r.split(" ").join(","),n.push(w);d.push.apply(d,x(n))}n=d.map(function(J){if(J=Qv(a,b,I,l,F,L,h,k,E,J,C,A))J.hdr=J.hdr||z,J.colorGamut=J.colorGamut||y,J.fastSwitching=t;return J}).filter(function(J){return!!J});if(0==n.length){c="image"==b.va.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new U(2,4,4003);}if(!b.va.contentType||"application"==b.va.contentType)for(b.va.contentType=Rv(n[0].mimeType,n[0].codecs),m=u(n),q=m.next();!q.done;q=m.next())q.value.type= | |
b.va.contentType;m=b.va.id||"__fake__"+a.sa++;q=u(n);for(r=q.next();!r.done;r=q.next()){r=r.value;w=u(I.drmInfos);for(v=w.next();!v.done;v=w.next())v=v.value,v.keyIds=v.keyIds&&r.keyIds?new Set([].concat(x(v.keyIds),x(r.keyIds))):v.keyIds||r.keyIds;r.groupId=m}d=d.map(function(J){return J.attributes.id}).filter(Xf);return{id:m,contentType:b.va.contentType,language:F,xm:h,streams:n,drmInfos:I.drmInfos,vh:c,Ok:d}} | |
function Nv(a,b){if((b=se(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&we(b,"useMPDUrlQuery",Ge,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return"$querypart$"==c?a.Z:c.split("&").map(function(d){if("$querypart$"==d)return a.Z;var e=/\$query:(.*?)\$/g.exec(d);if(e&&2==e.length){e=e[1];var f=(new zb(a.Z)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null} | |
function Qv(a,b,c,d,e,f,g,h,k,l,m,n){b.N=Lv(a,l,b.va,null);var q=b.N.id;a.aa=Math.min(a.aa,b.N.ub);a.R=0<a.aa;if(!Sv(b.N))return null;var r=b.ya.start;b.bandwidth=we(l,"bandwidth",De)||0;b.roles=h;var t=me(l,"SupplementalProperty"),w=me(l,"EssentialProperty"),v=null,z=w.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri});z?v=Nv(a,z):(z=t.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri}))&&(v=Nv(a,z));v&&(b.Ib=v);z=b.N.contentType;v=z==Wc|| | |
"application"==z;z="image"==z;try{var y=void 0;if(c.Rf){var A=b.N.gb,E=b.Ib,C=Qc(A(),[c.Rf.rk],E()),B=kh(C,a.g.retryParameters);y={bitsKey:128,blockCipherMode:"CBC",iv:c.Rf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var N,R,Q;return P(function(V){if(1==V.g)return G(V,vv(a,B,6),2);if(3!=V.g){N=V.h;if(!N.data||16!=N.data.byteLength)throw new U(2,4,4049);R={name:"AES-CBC"};Q=y;return G(V,window.crypto.subtle.importKey("raw",N.data,R,!0,["decrypt"]),3)}Q.cryptoKey=V.h;y.fetchKey=void 0;H(V)})}}}b.N.aesKey= | |
y;A=function(N,R,Q,V){return Jv(a,N,R,Q,V)};if(b.N.Dd)var D=cu(b,A,y);else if(b.N.qc)D=iu(b,a.s,y);else if(b.N.Dc)D=nu(b,A,a.s,!!a.i,a.g.dash.initialSegmentLimit,a.na,y,n,!1);else{var I=b.ya.duration||0,F=b.N.gb,L=b.N.mimeType,J=b.N.codecs;D={Lc:function(){var N=sl(r,I,F());N.Xb(function(R){R.mimeType=L;R.codecs=J});return Promise.resolve(N)}}}}catch(N){if((v||z)&&4002==N.code)return null;throw N;}l=me(l,"ContentProtection");l=Gt(l,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);l=new Set(l?[l]: | |
[]);A=t.some(function(N){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==N.attributes.schemeIdUri&&"JOC"==N.attributes.value});t=b.N.codecs;E=t.includes("ec-3")&&384E3<=b.bandwidth;n=!1;if(A||E)n=!0;A=!1;v&&(A=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var K;if(z&&((w=w.find(function(N){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(N.attributes.schemeIdUri)}))&&(K=w.attributes.value),!K))return null;var O;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&& | |
(t.includes("hvc1.2.4.L153.B0")||t.includes("hev1.2.4.L153.B0"))&&(O="PQ");w=b.N.id?b.Da.id+","+b.N.id:"";a.H.length&&q&&a.u.set(b.Da.id+","+q,Tv(b));var M=w&&a.s[w]?a.s[w]:{id:a.sa++,originalId:b.N.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){M.segmentIndex&&(M.segmentIndex.release(),M.segmentIndex=null)},segmentIndex:null,mimeType:b.N.mimeType,codecs:t,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width, | |
height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:l,language:e,originalLanguage:b.va.language,label:f,type:b.va.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:A,channelsCount:b.N.df,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:n,closedCaptions:k,hdr:O,colorGamut:void 0,videoLayout:void 0,tilesLayout:K,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Af(b.N.mimeType,b.N.codecs)]),isAudioMuxedInVideo:!1}; | |
M.createSegmentIndex=function(){var N;return P(function(R){if(1==R.g){if(M.segmentIndex)return R.A(0);N=M;return G(R,D.Lc(),3)}N.segmentIndex=R.h;H(R)})};w&&b.dc&&!a.s[w]&&(b=b.Da.id||"",a.C[b]||(a.C[b]=[]),a.s[w]=M,a.C[b].push(w));return M}function Tv(a){function b(c){if(!c)return null;c=ce(c);c.Dd=null;c.qc=null;c.Dc=Oe(c.Dc);return c}a=ce(a);a.Da=b(a.Da);a.va=b(a.va);a.N=b(a.N);a.ya&&(a.ya=ce(a.ya),a.ya.node=null);return a} | |
function rv(a){var b,c;return P(function(d){switch(d.g){case 1:return b=0,ta(d,2),G(d,sv(a),4);case 4:b=d.h;wa(d,3);break;case 2:if(c=ya(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();tv(a,b);H(d)}})}function tv(a,b){if(!(0>a.K)){var c=a.K;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.L.Y(Math.max(c-b,rd(a.ra)))}} | |
function Lv(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,df:null,audioSamplingRate:null,ub:0,pf:0};d=d||c.gb;var e=b.attributes.id,f=me(b,"BaseURL"),g,h=!1;if(a.h)for(var k=u(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=oe(m);l&&m&&(Cu(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(oe));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=Tl([b.attributes.codecs||c.codecs]).join(","); | |
var n=we(b,"frameRate",He)||c.frameRate,q=b.attributes.sar||c.pixelAspectRatio,r=Uv(me(b,"InbandEventStream"),c.emsgSchemeIdUris),t=me(b,"AudioChannelConfiguration");t=Vv(t)||c.df;var w=we(b,"audioSamplingRate",Ee)||c.audioSamplingRate;k||(k=Rv(l,m));var v=qe(b,"SegmentBase"),z=qe(b,"SegmentTemplate"),y=v?we(v,"availabilityTimeOffset",Fe)||0:0,A=z?we(z,"availabilityTimeOffset",Fe)||0:0,E=f&&f.length?we(f[0],"availabilityTimeOffset",Fe)||0:0;y=c.ub+E+y+A;A=null;(E=qe(b,"SegmentSequenceProperties"))&& | |
(E=qe(E,"SAP"))&&(A=we(E,"cadence",Ce));E=b.attributes.label;var C=me(b,"Label");C&&C.length&&(C=C[0],ne(C)&&(E=ne(C)));return{gb:function(){return Qc(d(),f.length?a.h&&h?Du(a.h,e):g?g:[]:[])},Dd:v||c.Dd,qc:qe(b,"SegmentList")||c.qc,Dc:z||c.Dc,width:we(b,"width",Ee)||c.width,height:we(b,"height",Ee)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,df:t,audioSamplingRate:w,ub:y,Re:null,pf:A||c.pf,label:E||null}} | |
function Uv(a,b){b=b.slice();a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b} | |
function Vv(a){a=u(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b, | |
16);if(!b)continue;for(var d=0,e=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&0<b&&b<c.length)return c[b]}}return null} | |
function Sv(a){var b=a.Dd?1:0;b+=a.qc?1:0;b+=a.Dc?1:0;if(0==b)return a.contentType==Wc||"application"==a.contentType?!0:!1;1!=b&&(a.Dd&&(a.qc=null),a.Dc=null);return!0} | |
function Wv(a,b,c,d){var e,f,g,h,k,l,m;return P(function(n){if(1==n.g)return e=[Ic(c)],f=Qc(b(),e),g=kh(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.ea()}),eh(a.P,h),G(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=Bc(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})} | |
function Dv(a,b,c){var d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=u(d),g=f.next();case 2:if(g.done){n.A(4);break}h=g.value;ta(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.A(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.A(8); | |
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":cb("NTP UTCTiming scheme is not supported");break;default:cb("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return G(n,Wv(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return G(n,Wv(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:wa(n, | |
3);break;case 5:ya(n);case 3:g=f.next();n.A(2);break;case 4:return cb("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})} | |
function Mv(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=we(d,"timescale",Ee)||1,k=we(d,"presentationTimeOffset",Ee)||0;d=u(me(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=we(l,"presentationTime",Ee)||0,n=we(l,"duration",Ee)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",eventElement:Ne(l),eventNode:Oe(l)},a.j.onTimelineRegionAdded(l))}} | |
function Jv(a,b,c,d,e){var f,g,h,k;return P(function(l){if(1==l.g)return f=qh,g=e?0:1,h=Xl(b,c,d,a.g.retryParameters),G(l,vv(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Rv(a,b){b=Af(a,b);return Of(b)?Wc:a.split("/")[0]}function vv(a,b,c,d){d||(d={});d.isPreload=a.ea();b=a.j.networkingEngine.request(c,b,d);eh(a.P,b);return b.promise} | |
function uv(a){var b=a.l.ee;if(!a.l.bf||!b||!a.H.length)return[];var c=Date.now()/1E3,d=a.H.filter(function(e){e=Ee(e.attributes.ttl);return!e||b+e>c}).map(oe).filter(Xf);return d.length?Qc(a.B,d):[]}S("shaka.dash.DashParser",qv);Si["application/dash+xml"]=function(){return new qv};Si["video/vnd.mpeg.dash.mpd"]=function(){return new qv};function Xv(){}S("shaka.dependencies",Xv);Xv.has=function(a){return Yv.has(a)};Xv.add=function(a,b){if(!Zv[a])throw Error(a+" is not supported");a==$v?Dd("mux.js","mux.js is no longer used in Shaka Player."):Yv.set(a,function(){return b})};var $v="muxjs",Zv={ym:$v,ISOBoxer:"ISOBoxer"};Xv.Allowed=Zv;var Yv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function aw(a,b,c){this.type=a;this.ia=b;this.segments=c||null}function bw(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}bw.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c}; | |
function cw(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function dw(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function ew(a,b,c){return(a=dw(a,b))?a.value:c||null}function fw(a,b){a=dw(a,b);if(!a)throw new U(2,4,4023,b);return a.value}function gw(a,b,c){c=void 0===c?[]:c;this.ia=b;this.g=a;this.Zb=c}function hw(a,b){this.name=a;this.value=b};function iw(a,b){return a.filter(function(c){return c.name==b})}function jw(a,b){return a.filter(function(c){return fw(c,"TYPE")==b})}function kw(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function lw(a,b,c){c=void 0===c?0:c;return(a=kw(a,b))?Number(a.value):c}function mw(a,b,c){return b?nw(a,[b],c):[]}function nw(a,b,c){if(!b.length)return[];b=Qc(a,b);a=[];b=u(b);for(var d=b.next();!d.done;d=b.next())a.push(ow(d.value,c));return a} | |
function ow(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=u(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new U(2,4,4039,e);}}return a};function pw(){this.g=0} | |
function qw(a,b){b=Bc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new U(2,4,4015);b=0;for(var d=!0,e=u(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=rw(a,f),--a.g,sw.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=rw(a,g);if(tw.includes(g.name)){if(1!=b)throw new U(2,4,4017);g= | |
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=u(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=rw(a,k),sw.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==ew(k,"TYPE")?f.push(k):"MAP"==ew(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new gw(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new gw("",d,f)));return new aw(b,e,c)}e.push(g);"EXT-X-STREAM-INF"== | |
g.name&&(g.attributes.push(new hw("URI",h)),d=!0)}}return new aw(b,e)}function rw(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new U(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Ud(d);var f;(f=Wd(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Wd(d,g);)c.push(new hw(f[1],f[2]||f[3])),Vd(d)}return new bw(a,b,c,e)} | |
var sw="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),tw="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" ");function uw(){}function vw(a,b){try{var c=ww(a);return $g({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return Yg(d)}} | |
function ww(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new U(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Mc(a):e=Fc(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",uw);uw.parse=vw;gh("data",vw);function xw(){var a=this;this.g=this.h=null;this.G=1;this.B=new Map;this.J=new Map;this.O=new Map;this.O.set("video",new Map);this.O.set("audio",new Map);this.O.set(Wc,new Map);this.O.set("image",new Map);this.Fb=new Set;this.i=new Map;this.l=null;this.M="";this.La=new pw;this.K=-1;this.ea=Infinity;this.aa=this.Ac=this.Za=!1;this.C=new ac(function(){if(a.W&&!a.g.continueLoadingWhenPaused&&(a.U.Ja(a.W,"timeupdate"),a.W.paused)){a.U.oa(a.W,"timeupdate",function(){return yw(a)});return}yw(a)});this.Va= | |
zw;this.m=null;this.Sa=0;this.s=Infinity;this.Ka=this.Ea=this.R=0;this.Z=new dh;this.H=new Map;this.I=new Map;this.Aa=new Map;this.na=new Map;this.L=new Map;this.ra=new Map;this.sa=new Map;this.mc=this.ka=!1;this.Qb=new qd(5);this.j=null;this.P=!0;this.Ga=new Set;this.U=new td;this.u=this.W=null;this.jc=function(){return!1}}p=xw.prototype; | |
p.configure=function(a,b){var c=this.h&&a.hls.updatePeriod!=this.g.hls.updatePeriod&&0<=a.hls.updatePeriod;this.g=a;b&&(this.jc=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.T()&&this.C.Ia()};p.start=function(a,b){var c=this,d;return P(function(e){return 1==e.g?(c.h=b,c.ka=b.isLowLatencyMode(),G(e,Aw(c,[a]).promise,2)):3!=e.g?(d=e.h,c.M=d.uri,G(e,Bw(c,d.data,a),3)):e.return(c.m)})}; | |
p.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.Z&&(a.push(this.Z.destroy()),this.Z=null);this.g=this.h=null;this.Fb.clear();this.m=null;this.i.clear();this.J.clear();this.I.clear();this.B.clear();this.Aa.clear();this.na.clear();this.L.clear();this.ra.clear();this.sa.clear();this.Ga.clear();this.j&&this.j.destroy();this.U&&(this.U.release(),this.U=null);return Promise.all(a)}; | |
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,q;return P(function(r){if(1==r.g){if(!Cw(a))return r.return();b=[];c=Array.from(a.i.values());a.s=Infinity;a.m.gapCount=0;d=c.filter(function(t){return t.stream.segmentIndex});e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Dw(a,g));return G(r,Promise.all(b),2)}Ew(a,d.map(function(t){return t.stream}));h=d.some(function(t){return 0==t.Sd});d.length&&!h&&(k=Fw,Gw(a,k.cj),l=d.map(function(t){return t.kc}),a.l.sb(Math.min.apply(Math,x(l))), | |
a.h.updateDuration());h&&Hw(a);m=u(d);for(n=m.next();!n.done;n=m.next())q=n.value,q.stream.isAudioMuxedInVideo||!q.stream.segmentIndex||Dg(q.stream.segmentIndex)||a.h.disableStream(q.stream);H(r)})};function Iw(a,b){return Cw(a)?a.O.get(b.type):b.Ye} | |
function Dw(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N,R,Q,V,ba,ia;return P(function(xa){switch(xa.g){case 1:if(b.stream.isAudioMuxedInVideo)return xa.return();c=[];d=u(b.S());for(e=d.next();!e.done;e=d.next())f=e.value,g=new sb(f),h=g.g,b.Ce&&(0<=b.Sb&&h.add("_HLS_msn",String(b.Sb)),0<=b.Tb&&h.add("_HLS_part",String(b.Tb))),b.De&&h.add("_HLS_skip","YES"),Jb(h)&&xb(g,h),c.push(g.toString());ta(xa,2);return G(xa,Aw(a,c,!0).promise,4);case 4:k=xa.h;wa(xa,3);break;case 2:throw l= | |
ya(xa),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return xa.return();m=qw(a.La,k.data);if(1!=m.type)throw new U(2,4,4017);n=k.uri;n==k.originalUri||b.S().includes(n)||b.zi.push(n);q=iw(m.ia,"EXT-X-DEFINE");r=Jw(a,q,n);t=b.stream;w=Iw(a,b);return G(xa,Kw(a,m,t.mimeType,b.S,r),5);case 5:v=xa.h;z=v.keyIds;y=v.drmInfos;A=function(Ea,va){return Ea.size===va.size&&[].concat(x(Ea)).every(function(Ba){return va.has(Ba)})};A(t.keyIds,z)||(t.keyIds=z,t.drmInfos=y,a.h.newDrmInfo(t)); | |
E=Lw(a,m,w,r,b.S,b.type);C=E.segments;if(B=E.bandwidth)t.bandwidth=B;D=Dl(t);I=u(C);for(F=I.next();!F.done;F=I.next())L=F.value,L.qa&&(L.qa.ud=D);t.segmentIndex.$d(C,a.l.Eb());C.length&&(J=lw(m.ia,"EXT-X-MEDIA-SEQUENCE",0),O=(K=kw(m.ia,"EXT-X-SKIP"))?Number(ew(K,"SKIPPED-SEGMENTS")):0,M=Mw(J,C),N=M.Sb,R=M.Tb,b.Sb=N+O,b.Tb=R,Q=w.get(J),t.segmentIndex.bb(Q));if(V=Dg(t.segmentIndex))b.Wc=V.startTime,ba=C[C.length-1],b.kc=ba.endTime;if(ia=kw(m.ia,"EXT-X-ENDLIST"))b.Sd=!0;Nw(a,m);Ow(a,m.ia,t.type,r,b.S); | |
H(xa)}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.banLocation(a)};p.setMediaElement=function(a){this.W=a}; | |
function Pw(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.K,e=u(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=Iw(a,f);if(g=Dg(g)){h=u(h);for(var k=h.next();!k.done;k=h.next()){k=u(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.K=Math.max(a.K,l));f.fg=l;break}}}}if(!(0>a.K))for(b=u(b),d=b.next();!d.done;d=b.next())if(d=d.value,Qw(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.K-d.fg,0<f&&(e.g.splice(0,f),e=Dg(e)))e=-e.startTime,d.stream.segmentIndex.offset(e), | |
Rw(a,d,e)} | |
function Sw(a,b){if(Infinity==a.ea){b=u(b);for(var c=b.next();!c.done;c=b.next())c=Dg(c.value.stream.segmentIndex),null!=c&&null!=c.h&&(a.ea=Math.min(a.ea,c.h))}b=a.ea;if(Infinity!=b){c=u(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Qw(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=Dg(e);if(f)if(null==f.h)bb("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.S(),"Expect AV sync issues!");else for(Rw(a,d,f.h-b-f.startTime),d=u(e),e=d.next();!e.done;e=d.next())e.value.ph(b)}}}} | |
function Rw(a,b,c){b.Wc+=c;b.kc+=c;a=Iw(a,b);for(var d=u(a),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.S()} | |
function Bw(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N,R,Q,V,ba,ia,xa;return P(function(Ea){switch(Ea.g){case 1:d=Yc;e=qw(a.La,b);f=iw(e.ia,"EXT-X-DEFINE");g=[];h=[];k=[];a.l=new Vk(null,0);a.l.$c(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.P=!1,J=iw(e.ia,"EXT-X-DEFINE"),n=Jw(a,J,a.M),m=d.Ca,K="",O=new Map,G(Ea,Tw(a,a.G++,n,e,l,"",m,K,!0,"Media Playlist",null,O,null,!1,null,!1),7);Uw(a,f);q=iw(e.ia,"EXT-X-MEDIA");r=iw(e.ia,"EXT-X-STREAM-INF");t=iw(e.ia, | |
"EXT-X-IMAGE-STREAM-INF");w=iw(e.ia,"EXT-X-I-FRAME-STREAM-INF");v=iw(e.ia,"EXT-X-SESSION-KEY");z=iw(e.ia,"EXT-X-SESSION-DATA");y=iw(e.ia,"EXT-X-CONTENT-STEERING");Vw(a,z);return G(Ea,Ww(a,y),4);case 4:if(!a.g.hls.ignoreSupplementalCodecs){A=[];E=u(r);C=E.next();for(B={};!C.done;B={Si:void 0},C=E.next())if(D=C.value,I=ew(D,"SUPPLEMENTAL-CODECS"))B.Si=I.split(/\s*,\s*/).map(function(va){return va.split("/")[0]}),F=D.attributes.map(function(va){return function(Ba){var La=Ba.name;Ba=Ba.value;"CODECS"== | |
La&&(Ba=va.Si.join(","));return new hw(La,Ba)}}(B)),A.push(new bw(D.id,D.name,F,null));r.push.apply(r,x(A))}Xw(a,r);Yw(a,q);L=Zw(a,w);return G(Ea,$w(a,r,v,q,l,a.B,L),5);case 5:return g=Ea.h,h=ax(a,q),G(Ea,bx(a,t,w),6);case 6:k=Ea.h;Ea.A(3);break;case 7:M=Ea.h,a.i.set(c,M),M.stream&&(N=Dl(M.stream),M.stream.segmentIndex.Xb(function(va){va.qa&&(va.qa.ud=N)})),m=M.stream.type,g.push({id:0,language:cd(K||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==m?M.stream:null,video:"video"==m?M.stream:null, | |
bandwidth:M.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);cx(a,e);1==e.type&&(Cw(a)&&(dx(a,e),R=a.s,a.C.Y(R)),Q=Array.from(a.i.values()),ex(a,Q),Hw(a),Ow(a,e.ia,m,n,l));a.m={presentationTimeline:a.l,variants:g,textStreams:h,imageStreams:k,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null, | |
periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.u};if(a.aa||!a.g.hls.disableCodecGuessing){Ea.A(8);break}V=[];ba=u(a.m.variants);for(ia=ba.next();!ia.done;ia=ba.next())xa=ia.value,xa.audio&&""===xa.audio.codecs&&V.push(xa.audio.createSegmentIndex()),xa.video&&""===xa.video.codecs&&V.push(xa.video.createSegmentIndex());return G(Ea,Promise.all(V),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),H(Ea)}})} | |
function fx(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I;return P(function(F){switch(F.g){case 1:c=Rl(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return F.return(c);d=gx(a,b);e=d.segment;f=d.segmentIndex;g=e.S();h=g[0];k=new sb(h);l=k.rb.split(".").pop();if(m=hx[l])return F.return(Rl(m));n=qh;r=q=null;t=e.qa;if(!t){F.A(2);break}w=Xl(t.S(),t.Nb(),t.Lb(),a.g.retryParameters);return G(F,ix(a,w,n,{type:0}).promise,3);case 3:v=F.h;q=v.data;if(!t.aesKey){F.A(4);break}return G(F,Wl(q,t.aesKey, | |
0),5);case 5:q=F.h;case 4:(r=v.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return z=Xl(e.S(),e.Nb(),e.Lb(),a.g.retryParameters),G(F,ix(a,z,n,{type:1}).promise,6);case 6:y=F.h;A=y.data;if(!e.aesKey){F.A(7);break}return G(F,Wl(A,e.aesKey,f),8);case 8:A=F.h;case 7:(E=y.headers["content-type"])&&(E=E.split(";")[0].toLowerCase());C="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");B=["audio/mp4","video/mp4","video/iso.segment"];if(Vj(Mb(A))){var L=A,J=a.g.disableAudio, | |
K=a.g.disableVideo,O=a.g.disableText;var M=Mb(L);var N=(new Nj).parse(M),R=N.Od();M=N.Bg();var Q=[],V=!1,ba=!1;if(!J)switch(R.audio){case "aac":case "aac-loas":N.wb().length&&(Q.push("mp4a.40.2"),V=!0);break;case "mp3":N.wb().length&&(Q.push("mp4a.40.34"),V=!0);break;case "ac3":N.wb().length&&(Q.push("ac-3"),V=!0);break;case "ec3":N.wb().length&&(Q.push("ec-3"),V=!0);break;case "opus":N.wb().length&&(Q.push("opus"),V=!0)}if(!K)switch(R.video){case "avc":M.codec?Q.push(M.codec):Q.push("avc1.42E01E"); | |
ba=!0;break;case "hvc":M.codec?Q.push(M.codec):Q.push("hvc1.1.6.L93.90");ba=!0;break;case "av1":Q.push("av01.0.01M.08"),ba=!0}if(Q.length){J=V&&!ba;K=new Map;if(ba&&!O){O=new Kd("video/mp2t");O.i(L);L=u(O.j());for(ba=L.next();!ba.done;ba=L.next())ba=ba.value,K.set(ba,ba);O.g()}M={type:J?"audio":"video",mimeType:"video/mp2t",codecs:Q.join(", "),language:null,height:M.height,width:M.width,channelCount:null,sampleRate:null,closedCaptions:K,oe:null,colorGamut:null,frameRate:M.frameRate}}else M=null;if(D= | |
M)return F.return(D)}else if(C.includes(l)||B.includes(E)||r&&B.includes(r))if(I=Sl(q,A,a.g.disableText))return F.return(I);return E?F.return(Rl(E)):r?F.return(Rl(r)):F.return(c)}})} | |
function Hw(a){if(Cw(a)){if(a.Va==jx){for(var b=Infinity,c=Infinity,d=u(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.kc),c=Math.min(c,e.Wc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.rf(b)}}else a.l.sb(kx(a));if(!a.l.u)for(b=u(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=Dg(c.stream.segmentIndex))&& | |
c.h&&a.l.Ii(c.h);a.l.Xe()}function Uw(a,b){var c=(new sb(a.M)).g;b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=ew(e,"NAME");var f=ew(e,"VALUE");e=ew(e,"QUERYPARAM");d&&f&&(a.B.has(d)||a.B.set(d,f));e&&(d=c.get(e)[0])&&!a.B.has(d)&&a.B.set(e,d)}} | |
function Jw(a,b,c){c=(new sb(c)).g;var d=new Map;b=u(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=ew(f,"NAME"),h=ew(f,"VALUE");e=ew(f,"QUERYPARAM");f=ew(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.B.get(f))&&d.set(f,e)}return d} | |
function Xw(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=ew(d,"AUDIO");c=ew(d,"VIDEO");var f=ew(d,"SUBTITLES");d=lx(a,d);if(f){var g=Uc(Wc,d);a.I.set(f,g);Rd(d,g)}e&&(f=Uc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.I.set(e,f));c&&(e=Uc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.I.set(c,e))}} | |
function Vw(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=ew(d,"DATA-ID");c=ew(d,"URI");var f=ew(d,"LANGUAGE");d=ew(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",mw([a.M],c,a.B)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new T("sessiondata",e);if(a.h)a.h.onEvent(c)}} | |
function Ww(a,b){var c,d,e,f,g,h;return P(function(k){if(!a.h||!a.g)return k.return();d=u(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=ew(f,"PATHWAY-ID"),h=ew(f,"SERVER-URI"),g&&h){a.j=new yu(a.h);a.j.configure(a.g);a.j.i=[a.M];a.j.setManifestType("HLS");a.j.h=g;c=zu(a.j,h);break}return G(k,c,0)})} | |
function ax(a,b){var c=jw(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return mx(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=u(c);for(var d=c.next();!d.done;d=c.next()){var e=fw(d.value,"GROUP-ID");if(d=a.I.get(e))if(e=a.J.get(e)){e=u(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=nx(Wc,d)||ox(Wc),px(f.stream)}}return b.filter(function(g){return g})} | |
function px(a){var b=new Set([Af(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Xb(function(c){c.mimeType&&b.add(Af(c.mimeType,a.codecs))});a.fullMimeTypes=b} | |
function bx(a,b,c){var d,e;return P(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return P(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ta(m,2);return G(m,qx(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=ya(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=rx(a,g);return"image"!==h.stream.type?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null; | |
throw k;}})),G(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function sx(a,b,c){b=b.filter(function(h){var k=ew(h,"URI")||"";h=ew(h,"TYPE");return"SUBTITLES"!=h&&(""!=k||"AUDIO"==h)});var d={};b=u(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=cw(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)mx(a,d[g],c,!1)}function Zw(a,b){return b.map(function(c){c=rx(a,c);return"video"!==c.stream.type?null:c.stream}).filter(function(c){return c})} | |
function $w(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N,R,Q,V,ba,ia,xa,Ea,va,Ba,La;return P(function(za){switch(za.g){case 1:h=[];k=new Set;if(!(0<c.length)){za.A(2);break}l=u(c);m=l.next();case 3:if(m.done){za.A(2);break}n=m.value;q=fw(n,"METHOD");r=ew(n,"KEYFORMAT")||"identity";t=null;if("NONE"==q){za.A(4);break}if(tx(q)){w=mw(e(),fw(n,"URI"),f);v=w.sort().join("");a.L.has(v)||(z=kh(w,a.g.retryParameters),y=ix(a,z,6).promise,a.L.set(v,y));za.A(4);break}if("identity"!=r){t= | |
(A=ux[r])?A(n,""):null;za.A(6);break}return G(za,vx(a,n,"",e,null,f),9);case 9:t=za.h;case 6:if(t){if(t.keyIds)for(E=u(t.keyIds),C=E.next();!C.done;C=E.next())B=C.value,k.add(B);h.push(t)}case 4:m=l.next();za.A(3);break;case 2:D={};I=u(b);for(F=I.next();!F.done;F=I.next())L=F.value,J=cw(L,!a.j),D[J]?D[J].push(L):D[J]=[L];K=[];for(O in D)M=D[O],N=M[0],R=ew(N,"FRAME-RATE"),Q=Number(ew(N,"AVERAGE-BANDWIDTH"))||Number(fw(N,"BANDWIDTH")),V=ew(N,"RESOLUTION"),ba=u(V?V.split("x"):[null,null]),ia=ba.next().value, | |
xa=ba.next().value,Ea=ew(N,"VIDEO-RANGE"),(va=ew(N,"REQ-VIDEO-LAYOUT"))&&va.includes(",")&&(Ba=va.split(",").filter(function(Ua){return"CH-STEREO"==Ua||"CH-MONO"==Ua}),va=Ba[0]),va=va||"CH-MONO",La=wx(a,M,d),K.push.apply(K,x(xx(a,La.audio,La.video,Q,ia,xa,R,Ea,va,h,k,g)));return za.return(K.filter(function(Ua){return null!=Ua}))}})} | |
function wx(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=u(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=ew(m,"AUDIO");var n=ew(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=ew(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(c=c.filter(function(t){return f.includes(fw(t,"GROUP-ID"))}),sx(a,c,e));c=(e=f.sort().join(","))&&a.J.has(e)?a.J.get(e):[];g?d.audio.push.apply(d.audio,x(c)):h&&d.video.push.apply(d.video,x(c));g=!1;var r=b.map(function(t){return fw(t, | |
"URI")});l=d.audio.find(function(t){return t&&t.S().find(function(w){return r.includes(w)})});h=lx(a,b[0]);c=Uc("video",h);(k=Uc("audio",h))&&!c?(l="audio",g=0<d.audio.length):!d.audio.length&&!d.video.length&&k&&c?(l="video",h=[[c,k].join()]):d.audio.length&&l?(l="audio",g=!0):l=d.video.length&&!d.audio.length?"audio":"video";g||(a=yx(a,b,h,l),e&&(a.stream.groupId=e),d[a.stream.type]=[a]);return d} | |
function lx(a,b){b=ew(b,"CODECS")||"";a.aa=0<b.length;a.aa||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),b=b.join(","));return Tl(b.split(/\s*,\s*/))} | |
function xx(a,b,c,d,e,f,g,h,k,l,m,n){for(var q=u(c),r=q.next();!r.done;r=q.next())zx(r.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=u(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=u(c),h=g.next();!h.done;h=g.next()){var t=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=t?t.stream:null)k.drmInfos=l,k.keyIds=m,a.g.disableIFrames||Ng(k,n);k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);q=f?f.stream.drmInfos: | |
null;r=t?t.stream.drmInfos:null;t=t?t.S().sort().join(","):"";var w=f?f.S().sort().join(","):"",v=[];h&&h.codecs&&v.push(h.codecs);k&&k.codecs&&v.push(k.codecs);t=[t,w,v.sort()].join("-");h&&k&&!Tb(q,r)||a.Fb.has(t)||(h={id:a.G++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Fb.add(t))}return e} | |
function Yw(a,b){b=jw(b,"CLOSED-CAPTIONS");a.P=0==b.length;b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=ew(d,"LANGUAGE");c=cd(e||"und");e||(e=ew(d,"NAME"))&&(c=e);e=fw(d,"GROUP-ID");d=fw(d,"INSTREAM-ID").replace("SERVICE","svc");a.H.get(e)||a.H.set(e,new Map);a.H.get(e).set(d,c)}} | |
function mx(a,b,c,d){d=void 0===d?!0:d;for(var e=[],f=[],g=new Map,h=u(b),k=h.next();!k.done;k=h.next()){var l=k.value;k=d?fw(l,"URI"):ew(l,"URI")||"shaka://hls-muxed";l=fw(l,"GROUP-ID");e.push(k);f.push(l);g.set(l,k)}d=f.sort().join(",");k=b[0];b="";h=fw(k,"TYPE").toLowerCase();"subtitles"==h&&(h=Wc);if(h==Wc)b=ew(k,"CODECS")||"";else for(f=u(f),l=f.next();!l.done;l=f.next())if(l=l.value,a.I.has(l)){b=a.I.get(l);break}f=e.sort().join(",");if(a.i.has(f))return a.i.get(f);l=a.G++;if(a.j){g=u(g);for(var m= | |
g.next();!m.done;m=g.next()){var n=u(m.value);m=n.next().value;n=n.next().value;(m=c.get(m))&&Cu(a.j,l,m,n)}}c=ew(k,"LANGUAGE");g=ew(k,"NAME");m="YES"==ew(k,"DEFAULT");"audio"==h?n=(n=ew(k,"CHANNELS"))?parseInt(n.split("/")[0],10):null:n=null;var q="audio"==h?(q=ew(k,"CHANNELS"))?q.includes("/JOC"):!1:!1;var r=ew(k,"CHARACTERISTICS"),t="YES"==ew(k,"FORCED");"audio"==h?k=(k=ew(k,"SAMPLE-RATE"))?parseInt(k,10):null:k=null;e=Ax(a,l,e,b,h,c,m,g,n,null,r,t,k,q);e.stream&&(e.stream.groupId=d);a.J.has(d)? | |
a.J.get(d).push(e):a.J.set(d,[e]);a.i.set(f,e);return e} | |
function qx(a,b){var c,d,e,f,g,h,k,l,m,n;return P(function(q){if(1==q.g){c=fw(b,"URI");d=ew(b,"CODECS","jpeg")||"";if(a.i.has(c))return q.return(a.i.get(c));e=ew(b,"LANGUAGE");f=ew(b,"NAME");g=ew(b,"CHARACTERISTICS");h=Ax(a,a.G++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=ew(b,"RESOLUTION"))?G(q,h.stream.createSegmentIndex(),3):q.A(2)}2!=q.g&&(l=Dg(h.stream.segmentIndex),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])* | |
Number(m.split("x")[1]));if(n=ew(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return q.return(h)})} | |
function rx(a,b){var c="video",d=fw(b,"URI"),e=ew(b,"CODECS")||"";"mjpg"==e&&(c="image");if(a.i.has(d))return a.i.get(d);var f=ew(b,"LANGUAGE"),g=ew(b,"NAME"),h=ew(b,"CHARACTERISTICS");c=Ax(a,a.G++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=ew(b,"RESOLUTION");f=u(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=ew(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.i.set(d,c);return c} | |
function yx(a,b,c,d){for(var e=a.G++,f=[],g=u(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=fw(k,"URI");k=ew(k,"PATHWAY-ID");a.j&&k&&Cu(a.j,e,k,h);f.push(h)}g=f.sort().join(",")+c.sort().join(",");if(a.i.has(g))return a.i.get(g);a:{b=ew(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.P=!1;b=null;break a}if(b){if("NONE"!=b){b=a.H.get(b);break a}a.P=!1}else if(!b&&a.H.size)for(b=u(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}}b=null}c=Tc(d,c);d=Ax(a,e,f,c,d,null,!1,null, | |
null,b,null,!1,null,!1);a.i.set(g,d);return d} | |
function Ax(a,b,c,d,e,f,g,h,k,l,m,n,q,r){function t(C){var B,D,I,F,L,J,K,O,M,N,R,Q,V,ba,ia,xa,Ea,va,Ba,La,za,Ua,Qa;return P(function(Aa){switch(Aa.g){case 1:return B=Yc,ta(Aa,2),D=y.S(),G(Aa,C.promise,4);case 4:I=Aa.h;if(C.aborted)return Aa.return();F=I.uri;F==I.originalUri||D.includes(F)||z.push(F);L=qw(a.La,I.data);if(1!=L.type)throw new U(2,4,4017);J=iw(L.ia,"EXT-X-DEFINE");K=Jw(a,J,F);O=!1;(!a.aa&&a.g.hls.disableCodecGuessing||a.P&&e==B.Ca&&!a.g.hls.disableClosedCaptionsDetection)&&0<L.segments.length&& | |
(a.P=!1,O=!0);M=!a.aa&&a.g.hls.disableCodecGuessing;N=Cw(a);return G(Aa,Tw(a,0,K,L,w,d,e,f,g,h,k,l,m,n,q,r,void 0,O,M),5);case 5:R=Aa.h;if(C.aborted)return Aa.return();Q=R.stream;cx(a,L);Cw(a)&&!N&&dx(a,L);y.Wc=R.Wc;y.kc=R.kc;y.De=R.De;y.Ce=R.Ce;y.Sd=R.Sd;y.Ye=R.Ye;y.Sb=R.Sb;y.Tb=R.Tb;y.Mg=!0;v.segmentIndex=Q.segmentIndex;v.encrypted=Q.encrypted;v.drmInfos=Q.drmInfos;v.keyIds=Q.keyIds;v.mimeType=Q.mimeType;v.bandwidth=v.bandwidth||Q.bandwidth;v.codecs=v.codecs||Q.codecs;v.closedCaptions=v.closedCaptions|| | |
Q.closedCaptions;v.width=v.width||Q.width;v.height=v.height||Q.height;v.hdr=v.hdr||Q.hdr;v.colorGamut=v.colorGamut||Q.colorGamut;v.frameRate=v.frameRate||Q.frameRate;"und"==v.language&&"und"!=Q.language&&(v.language=Q.language);v.language=v.language||Q.language;v.channelsCount=v.channelsCount||Q.channelsCount;v.audioSamplingRate=v.audioSamplingRate||Q.audioSamplingRate;px(v);v.drmInfos.length&&a.h.newDrmInfo(v);V=!1;if(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)V=!0; | |
a.m&&V&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==B.Ca||e==B.ba)for(ba=u(a.i.values()),ia=ba.next();!ia.done;ia=ba.next())xa=ia.value,xa.Mg||xa.type!=e||(xa.stream.mimeType=Q.mimeType,px(xa.stream));e==B.Oa&&(Ea=Dg(Q.segmentIndex))&&Ea.qa&&(v.mimeType="application/mp4",px(v));va=Dl(v);v.segmentIndex.Xb(function(hb){hb.qa&&(hb.qa.ud=va)});Bx(a)&&(a.Ac?ex(a,[y]):(a.Ac=!0,Ba=Array.from(a.i.values()),La=Ba.filter(function(hb){return hb.stream.segmentIndex}),ex(a,La),Hw(a),za=a.s,0<za&&a.C.Y(za))); | |
Ow(a,L.ia,v.type,K,w);a.m&&(a.m.startTime=a.u);wa(Aa,0);break;case 2:Ua=ya(Aa);v.closeSegmentIndex();if(7001===Ua.code)return Aa.return();Qa=a.h.disableStream(v);if(!Qa)throw Ua;H(Aa)}})}function w(){return a.j&&1<c.length?Du(a.j,b):z.concat(nw([a.M],c,a.B))}var v=Cx(a,d,e,f,g,h,k,l,m,n,q,r);c.includes("shaka://hls-muxed")&&(v.isAudioMuxedInVideo=!0,v.mimeType="video/mp2t",px(v));var z=[],y={stream:v,type:e,zi:z,S:w,Wc:0,kc:0,Ye:new Map,De:!1,Ce:!1,Sd:!1,fg:-1,Sb:-1,Tb:-1,Mg:!1},A=null,E;v.createSegmentIndex= | |
function(){if(A)return A;if(v.isAudioMuxedInVideo)return v.segmentIndex=new ql([]),Promise.resolve();E=Aw(a,y.S(),!0);return A=new Promise(function(C){C(t(E))})};v.closeSegmentIndex=function(){A&&!v.segmentIndex&&E.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);A=null};return y} | |
function kx(a){var b=Infinity;a=u(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&!c.stream.isAudioMuxedInVideo&&(b=Math.min(b,c.kc));return b}function Ew(a,b){var c=[];b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Xb(function(e){c.push(e)});a.l.be(c)} | |
function ex(a,b){if(!Cw(a))for(var c=kx(a),d=u(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.ld(0,c);Ew(a,b.map(function(f){return f.stream}));d=Array.from(a.i.values()).filter(function(f){return f.stream.segmentIndex});c=d.some(function(f){return"audio"==f.stream.type});e=d.some(function(f){return"video"==f.stream.type});d=Cw(a)&&!a.Za;c=!Cw(a)&&a.Za&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?Pw(a,b,d):(Sw(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Pw(a, | |
b))}function Qw(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function Bx(a){if(!a.m)return!1;var b=[],c=[];a=u(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0} | |
function Tw(a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y){z=void 0===z?!0:z;y=void 0===y?!0:y;var A,E,C,B,D,I,F,L,J,K,O,M,N,R,Q,V,ba,ia,xa,Ea,va,Ba,La,za,Ua,Qa,Aa,hb,$b;return P(function(ub){switch(ub.g){case 1:A=d.segments||[];E=A.every(function(nb){return kw(nb.ia,"EXT-X-GAP")?!0:!1});if(!A.length||E)throw new U(2,4,4053);Dx(a,d);Cw(a)&&Nw(a,d);C=Cw(a)?a.O.get(g):new Map;B=Lw(a,d,C,c,e,g);D=B.segments;I=B.bandwidth;O=K=J=L=F=null;if(!(0<D.length&&z)){ub.A(2);break}return G(ub,fx(a,D),3);case 3:M=ub.h, | |
g=M.type,h=M.language,m=M.channelCount,t=M.sampleRate,a.g.disableText||(n=M.closedCaptions),L=M.height,F=M.width,J=M.oe,K=M.colorGamut,O=M.frameRate,y&&(v=M.mimeType,f=M.codecs);case 2:if(v){ub.A(4);break}return G(ub,Ex(a,g,f,D),5);case 5:v=ub.h,g!=Wc||f||"application/mp4"!=v||!D[0]||D[0].qa||(v="text/vtt");case 4:return G(ub,Kw(a,d,v,e,c),6);case 6:N=ub.h;R=N.drmInfos;Q=N.keyIds;V=N.encrypted;ba=N.gj;if(V&&!R.length&&!ba)throw new U(2,4,4026);ia=Cx(a,f,g,h,k,l,m,n,q,r,t,w);ia.encrypted=V&&!ba;ia.drmInfos= | |
R;ia.keyIds=Q;ia.mimeType=v;I&&(ia.bandwidth=I);px(ia);"video"==g&&(F||L||J||K)&&zx(ia,F,L,O,J,null,K);Cw(a)&&Nw(a,d);xa=D[0].startTime;Ea=D[D.length-1];va=Ea.endTime;Ba=new ql(D);ia.segmentIndex=Ba;za=(La=kw(d.ia,"EXT-X-SERVER-CONTROL"))?null!=dw(La,"CAN-SKIP-UNTIL"):!1;Ua=La?null!=dw(La,"CAN-BLOCK-RELOAD"):!1;Qa=lw(d.ia,"EXT-X-MEDIA-SEQUENCE",0);Aa=Mw(Qa,D);hb=Aa.Sb;$b=Aa.Tb;return ub.return({stream:ia,type:g,zi:[],S:e,Wc:xa,kc:va,De:za,Ce:Ua,Sd:!1,fg:-1,Sb:hb,Tb:$b,Ye:C,Mg:!1})}})} | |
function Mw(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Sb:a,Tb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Sb:a,Tb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{Sb:a,Tb:c}} | |
function Cx(a,b,c,d,e,f,g,h,k,l,m,n){var q=nx(c,b)||ox(c),r=[];if(k){k=u(k.split(","));for(var t=k.next();!t.done;t=k.next())r.push(t.value)}k=void 0;t=null;c==Wc?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(t="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.G++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()}, | |
segmentIndex:null,mimeType:q,codecs:b,kind:c==Wc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:cd(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:t,external:!1,fastSwitching:!1, | |
fullMimeTypes:new Set,isAudioMuxedInVideo:!1};px(a);return a} | |
function Kw(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N,R;return P(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=u(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=iw(k.ia,"EXT-X-KEY"),m=null,l.length)for(m=Fx(a,b,k.ia,d,e),n=u(l),q=n.next();!q.done;q=n.next())r=q.value,f.set(r,m);w=t=!1;v=[];z=new Set;y=u(f);A=y.next();case 2:if(A.done){Q.A(4);break}E=A.value;C=u(E);B=C.next().value;D=C.next().value;I=B;F=D;L=fw(I,"METHOD");if("NONE"==L){Q.A(3);break}t= | |
!0;J=ew(I,"KEYFORMAT")||"identity";K=null;if(tx(L)){w=!0;Q.A(3);break}if("identity"!=J){K=(O=ux[J])?O(I,c):null;Q.A(6);break}return G(Q,vx(a,I,c,d,F,e),8);case 8:K=Q.h;case 6:if(K){if(K.keyIds)for(M=u(K.keyIds),N=M.next();!N.done;N=M.next())R=N.value,z.add(R);v.push(K)}case 3:A=y.next();Q.A(2);break;case 4:return Q.return({drmInfos:v,keyIds:z,encrypted:t,gj:w})}})} | |
function Gx(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw cb("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var f=0,g=ew(b,"IV","");if(g){var h=Nc(g.substr(2));if(16!=h.byteLength)throw new U(2,4,4048);}else f=lw(c.ia,"EXT-X-MEDIA-SEQUENCE",0);var k=mw(d(),fw(b,"URI"),e),l=k.sort().join("");c=b.toString()+"-"+f+"-"+l;if(!a.na.has(c)){var m={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(fw(b, | |
"METHOD")){case "AES-256":m.bitsKey=256;break;case "AES-256-CTR":m.bitsKey=256,m.blockCipherMode="CTR"}m.fetchKey=function(){var n,q,r,t;return P(function(w){if(1==w.g)return a.L.has(l)||(n=kh(k,a.g.retryParameters),q=ix(a,n,6).promise,a.L.set(l,q)),G(w,a.L.get(l),2);if(3!=w.g){r=w.h;if(!r.data||r.data.byteLength!=m.bitsKey/8)throw new U(2,4,4049);t={name:"CTR"==m.blockCipherMode?"AES-CTR":"AES-CBC",length:m.bitsKey};return G(w,window.crypto.subtle.importKey("raw",r.data,t,!0,["decrypt"]),3)}m.cryptoKey= | |
w.h;m.fetchKey=void 0;H(w)})};a.na.set(c,m)}return a.na.get(c)}function cx(a,b){null==a.u&&(b=kw(b.ia,"EXT-X-START"))&&(a.u=Number(fw(b,"TIME-OFFSET")))}function Dx(a,b){var c=kw(b.ia,"EXT-X-PLAYLIST-TYPE");b=kw(b.ia,"EXT-X-ENDLIST");b=c&&"VOD"==c.value||b;c=c&&"EVENT"==c.value&&!b;c=!b&&!c;b?Gw(a,zw):c?Gw(a,jx):Gw(a,Hx)} | |
function Nw(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=kw(d[e].ia,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=kw(b.ia,"EXT-X-TARGETDURATION");if(!d)throw new U(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=kw(b.ia,"EXT-X-PART-INF"))a.R=Number(fw(e,"PART-TARGET"));b=kw(b.ia,"EXT-X-SERVER-CONTROL");a.ka&&a.R?(a.s=a.mc?5*a.R<=c?Math.min(a.R,a.s):Math.min(c,a.s):Math.min(a.R,a.s),a.Ka=b?Number(fw(b,"PART-HOLD-BACK")):0):(a.s=Math.min(c,a.s), | |
c=b?dw(b,"HOLD-BACK"):null,a.Ea=c?Number(c.value):0);a.Sa=Math.max(d,a.Sa)}function dx(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Ka)c=a.Ka;else if(a.Ea)c=a.Ea;else{var d=b.segments.length,e=a.g.hls.liveSegmentsDelay;e>d-2&&(e=Math.max(1,d-2));for(e=d-e;e<d;e++){var f=kw(b.segments[e].ia,"EXTINF");c=f?c+Math.ceil(Number(f.value.split(",")[0])):c+a.Sa}}a.u&&0>a.u&&(c=Math.min(-a.u,c),a.u+=c);a.l.Ki(0);a.l.gh(c);a.l.$c(!1)} | |
function Fx(a,b,c,d,e){var f=kw(c,"EXT-X-MAP");if(!f)return null;var g=fw(f,"URI"),h=mw(d(),g,e);g=[h.toString(),ew(f,"BYTERANGE","")].join("-");if(!a.Aa.has(g)){var k=void 0,l=null;c=u(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?tx(fw(m,"METHOD"))&&m.id<f.id&&(k=Gx(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Ix(h,f,l,k);a.Aa.set(g,b)}return a.Aa.get(g)} | |
function Ix(a,b,c,d){var e=0,f=null;b=ew(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Xi(function(){return a},e,f,null,null,null,d)} | |
function Jx(a,b,c,d,e,f,g,h,k){function l(V){V=(new sb(V)).rb.split(".").pop();var ba=Kx[g][V];ba||(ba=hx[V]);return ba}var m=d.ia,n=kw(m,"EXTINF"),q=0,r=0,t=null;d.Zb.length&&(a.m.isLowLatency=!0);var w=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=kw(m,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(w=ze(v.value),a.Za=!0)}var z=$i;kw(m,"EXT-X-GAP")&&(a.m.gapCount++,z=2);if(!n){if(0==d.Zb.length)throw new U(2,4,4024,"EXTINF");if(!a.ka)return null}var y=[];v=!1;var A=null,E=!1,C=!1;if(a.ka&&d.Zb.length){q= | |
b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var B=w,D={},I=0;I<d.Zb.length;D={Cf:void 0,gf:void 0},I++){var F=d.Zb[I],L=0==I?c:y[y.length-1],J=0==I?e:L.endTime,K=Number(ew(F,"DURATION"))||a.R;if(K){var O=J+K,M=0,N=null;"EXT-X-PRELOAD-HINT"==F.name?(M=(M=ew(F,"BYTERANGE-START"))?Number(M):0,(L=ew(F,"BYTERANGE-LENGTH"))?N=M+Number(L)-1:M&&(N=Number.MAX_SAFE_INTEGER)):(M=ew(F,"BYTERANGE"),N=u(Lx(L,M)),M=N.next().value,N=N.next().value);D.gf=ew(F,"URI");if(D.gf){L=$i;"YES"== | |
ew(F,"GAP")&&(a.m.gapCount++,L=2,E=!0);D.Cf=null;var R=function(V){return function(){null==V.Cf&&(V.Cf=mw(h(),V.gf,f));return V.Cf}}(D);q&&0<=M&&null!=N&&(A=R,v=!0);J=new Zi(J,O,R,M,N,b,0,0,Infinity,[],"",null,B,L,k);"EXT-X-PRELOAD-HINT"==F.name&&(J.Ng(),C=!0);"YES"!=ew(F,"INDEPENDENT")&&0<I&&J.td();if(D=l(D.gf))J.mimeType=D,Mx.has(D)&&(J.qa=null);y.push(J);B&&(B+=K)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;q=e+n}else if(y.length)q=y[y.length-1].endTime;else return null;v&&(E|| | |
0!=y[0].eb?(v=!1,A=null):y=[]);(n=kw(m,"EXT-X-BYTERANGE"))?(t=u(Lx(c,n.value)),r=t.next().value,t=t.next().value):y.length&&(r=y[0].eb,t=y[y.length-1].Na);c="";n=null;"image"==g&&(c="1x1",m=kw(m,"EXT-X-TILES"))&&(c=fw(m,"LAYOUT"),(m=ew(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Zi(e,q,function(){if(A)return A();null==Q&&(Q=mw(h(),d.g,f));return Q||[]},r,t,b,0,0,Infinity,y,c,n,w,z,k,0<y.length&&!!d.g);if(e=l(d.g))b.mimeType=e,Mx.has(e)&&(b.qa=null);v&&(a.mc=!0,b.ji(),C&&b.Ng());return b} | |
function Lx(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Na+1,d=c+b-1);return[c,d]} | |
function Ow(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!Qw(a,c))for(b=iw(b,"EXT-X-DATERANGE"),b=b.filter(function(J){return null!=dw(J,"START-DATE")}).sort(function(J,K){J=fw(J,"START-DATE");K=fw(K,"START-DATE");return J<K?-1:J>K?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=fw(g,"ID");if(!a.Ga.has(h)){var k=fw(g,"START-DATE"),l=ze(k);if(!isNaN(l)){var m=Math.max(0,l-f),n=null,q=ew(g,"END-DATE");if(q){var r=ze(q);if(!isNaN(r)&&(n=r-f,0>n))continue}if(null==n){var t=ew(g,"DURATION")|| | |
ew(g,"PLANNED-DURATION");if(t){var w=parseFloat(t);isNaN(w)||(n=m+w);if(0>l-f+w)continue}}var v=ew(g,"CLASS")||"com.apple.quicktime.HLS",z="YES"==ew(g,"END-ON-NEXT");if(null==n&&z){for(var y=c+1;y<b.length;y++){var A=ew(b[y],"CLASS")||"com.apple.quicktime.HLS";if(v==A){var E=fw(b[y],"START-DATE"),C=ze(E);if(!isNaN(C)&&C&&C>l){n=Math.max(0,C-f);break}}}if(null==n)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var B=[],D=u(g.attributes),I=D.next();!I.done;I=D.next()){var F= | |
I.value;if(!y.includes(F.name)){var L=ow(F.value,d);if("X-ASSET-URI"==F.name||"X-ASSET-LIST"==F.name)L=mw(e(),F.value,d)[0];B.push({key:F.name,description:"",data:L,mimeType:null,pictureType:null})}}if(1<B.length)a.h.onMetadata(v,m,n,B);a.Ga.add(h)}}}catch(J){}}}} | |
function Lw(a,b,c,d,e,f){var g=b.segments,h=void 0,k=lw(b.ia,"EXT-X-DISCONTINUITY-SEQUENCE",-1),l=lw(b.ia,"EXT-X-MEDIA-SEQUENCE",0),m=kw(b.ia,"EXT-X-SKIP"),n=m?Number(ew(m,"SKIPPED-SEGMENTS")):0,q=l+n,r=0;Cw(a)&&c.has(q)&&(r=c.get(q));0===r&&a.Va==jx&&0<c.size&&!c.has(q)&&null!=a.l.i&&(r=a.l.Eb());var t=[],w=null;m=[];for(var v=0;v<g.length;v++){var z=g[v],y=0==v?r:w.endTime;q=l+n+v;kw(z.ia,"EXT-X-DISCONTINUITY")&&k++;var A=u(z.ia);for(var E=A.next();!E.done;E=A.next())E=E.value,"EXT-X-KEY"==E.name&& | |
(tx(fw(E,"METHOD"))?h=Gx(a,E,b,e,d):h=void 0);c.set(q,y);A=Fx(a,b,z.ia,e,d);if(y=Jx(a,A,w,z,y,d,f,e,h))(w=lw(z.ia,"EXT-X-BITRATE"))?m.push({bitrate:w,duration:y.endTime-y.startTime}):m.length&&(w=m.pop(),w.duration+=y.endTime-y.startTime,m.push(w)),w=y,y.i=k,Qw(a,f)&&null!=a.K&&q<a.K||t.push(y)}b=void 0;m.length&&(b=m.reduce(function(C,B){return C+B.duration},0),b=Math.round(m.reduce(function(C,B){return C+B.bitrate*B.duration},0)/b*1E3));if(m=t.some(function(C){return null!=C.h}))for(c={},d=0;d< | |
t.length;c={He:void 0,Ge:void 0,ze:void 0,Yc:void 0,ye:void 0},d++)if(c.Yc=t[d],null==c.Yc.h)for(c.Ge=0,c.He=d,e=function(C){return function(){var B=t[C.He];if(B){if(null!=B.h)return B.h+C.Ge;C.Ge-=B.endTime-B.startTime;C.He+=1}return null}}(c),c.ye=0,c.ze=d,g=function(C){return function(){var B=t[C.ze];if(B){B!=C.Yc&&(C.ye+=B.endTime-B.startTime);if(null!=B.h)return B.h+C.ye;--C.ze}return null}}(c);null==c.Yc.h;)c.Yc.h=g(),null==c.Yc.h&&(c.Yc.h=e());if(m)for(c=u(t),d=c.next();!d.done;d=c.next())for(e= | |
d.value,d=e.h,e=u(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ea;if(m&&Infinity!=c&&!Qw(a,f))for(a=u(t),f=a.next();!f.done;f=a.next())f.value.ph(c);return{segments:t,bandwidth:b}}function nx(a,b){if(a==Wc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}function ox(a){return a==Wc?"text/vtt":Kx[a].mp4} | |
function gx(a,b){a=Cw(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.xc()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}} | |
function Ex(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,z;return P(function(y){switch(y.g){case 1:e=qh;f=gx(a,d);g=f.segment;if(2==g.status)return y.return(ox(b));h=g.S();k=new sb(h[0]);l=k.rb.split(".").pop();m=Kx[b];if((n=m[l])||(n=hx[l])||(n=nx(b,c)))return y.return(n);r=1;t=kh(h,a.g.retryParameters);ta(y,2);t.method="HEAD";return G(y,ix(a,t,e,{type:r}).promise,4);case 4:w=y.h;q=w.headers["content-type"];wa(y,3);break;case 2:v=ya(y);if(!v||1002!=v.code&&1001!=v.code){y.A(3);break}t.method="GET";return G(y, | |
ix(a,t,e,{type:r}).promise,6);case 6:z=y.h,q=z.headers["content-type"];case 3:return q?y.return(q.toLowerCase().split(";")[0]):y.return(ox(b))}})}function zx(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function Aw(a,b,c){return ix(a,kh(b,a.g.retryParameters),0,{type:c?2:3})} | |
function yw(a){var b,c,d,e,f,g;return P(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return G(h,a.update(),4);case 4:c=Date.now();Cw(a)&&(d=(c-b)/1E3,a.Qb.sample(1,d),e=0<a.g.hls.updatePeriod?a.g.hls.updatePeriod:a.s,f=Math.max(0,e-rd(a.Qb)),a.C.Y(f));wa(h,3);break;case 2:g=ya(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.C.Y(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated(); | |
H(h)}})}function Cw(a){return a.Va!=zw}function Gw(a,b){a.Va=b;a.l&&a.l.$c(!Cw(a));Cw(a)||a.C.stop()}function ix(a,b,c,d){if(!a.Z)throw new U(2,7,7001);d||(d={});d.isPreload=a.jc();b=a.h.networkingEngine.request(c,b,d);eh(a.Z,b);return b}function tx(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a} | |
function vx(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,w,v,z,y,A,E;return P(function(C){switch(C.g){case 1:if("video/mp2t"==c)throw new U(2,4,4040);if(yc())throw new U(2,4,4041);g=fw(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return C.return(null);k=mw(d(),fw(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Oc(Mc(k[0].split("data:text/plain;base64,").pop()));C.A(2);break}m=k.sort().join("");a.ra.has(m)||(n=kh(k,a.g.retryParameters),q=ix(a,n,6).promise,a.ra.set(m,q));return G(C, | |
a.ra.get(m),3);case 3:r=C.h,l=Oc(r.data);case 2:t="00000000000000000000000000000000";if(!e){C.A(4);break}if(a.sa.has(e)){w=a.sa.get(e);C.A(5);break}v=Xl(e.S(),e.Nb(),e.Lb(),a.g.retryParameters);z=qh;return G(C,ix(a,v,z,{type:0}).promise,6);case 6:y=C.h,w=Vl(y.data),a.sa.set(e,w);case 5:w&&(t=w);case 4:return A=new Map,A.set(t,l),E="cenc","SAMPLE-AES"==g&&(E="cbcs"),C.return(Sc(A,E))}})}S("shaka.hls.HlsParser",xw); | |
var hx={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Kx={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4", | |
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Mx=new Set(["video/mp2t"].concat(x(Bf))),ux={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new U(2,4,4040);if(yc())throw new U(2,4,4041);b=fw(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");return Rc("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0), | |
keyId:null}],fw(a,"URI"))},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=fw(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=fw(a,"URI");b=ww(b.split("?")[0]);b=Mb(b.data);c=Rc("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=ew(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=fw(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null; | |
var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=fw(a,"URI");a=ww(a.split("?")[0]);a=Mb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);b=Lh(a,b,new Set,0);c=Rc("com.microsoft.playready",c,[{initDataType:"cenc",initData:b}]);if(a=fe(["<PLAYREADY>",Lc(a),"</PLAYREADY>"].join("\n")))c.licenseServerUri=Bt(a);return c},"urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":function(a){var b=fw(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc"; | |
"SAMPLE-AES"==b&&(c="cbcs");b=fw(a,"URI");b=ww(b.split("?")[0]);b=Mb(b.data);c=Rc("com.huawei.wiseplay",c,[{initDataType:"cenc",initData:b}]);if(a=ew(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c}},zw="VOD",Hx="EVENT",jx="LIVE",Fw={cj:zw,Fl:Hx,Nl:jx};Si["application/x-mpegurl"]=function(){return new xw};Si["application/vnd.apple.mpegurl"]=function(){return new xw};function Nx(a){return Bt(a)}var Ox=(new Map).set("com.microsoft.playready",Nx).set("com.microsoft.playready.recommendation",Nx).set("com.microsoft.playready.software",Nx).set("com.microsoft.playready.hardware",Nx);function Px(a){if(!Qx){Qx=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Rx=Sx("ftyp",b,d,b,c);b=Sx("dref",Tx);Ux=Sx("dinf",b)}this.g=a} | |
function Vx(a){for(var b=[],c=u(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Sx;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Wx+1));m=Math.floor(m%(Wx+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Xx(h,4)),[0,0,0,0],x(Xx(n,4)),x(Xx(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(Xx(k,2)),[0,0],x(Xx(l, | |
2)),[0,0]));h=Sx("tkhd",h);k=Sx;n=g.duration*g.timescale;l=Math.floor(n/(Wx+1));n=Math.floor(n%(Wx+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Xx(g.timescale,4)),x(Xx(l,4)),x(Xx(n,4)),x(Xx(m,2)),[0,0]));l=Sx("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Yx;break;case "audio":m=oy}n=Sx("hdlr",m);a:{switch(g.type){case "video":g=Sx("minf",Sx("vmhd",py),Ux,qy(g));break a; | |
case "audio":g=Sx("minf",Sx("smhd",ry),Ux,qy(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Pc.apply(Jc,x(b));f=a.g[0];c=Sx;d=f.duration*f.timescale;e=Math.floor(d/(Wx+1));d=Math.floor(d%(Wx+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Xx(f.timescale,4)),x(Xx(e,4)),x(Xx(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, | |
255]));e=Sx("mvhd",e);d=[];a=u(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Xx(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Sx("trex",k),h.call(g,k);a=Pc.apply(Jc,x(d));a=Sx("mvex",a);d=[];if(f.encrypted){f=u(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=u(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Pc.apply(Jc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Rx.byteLength+ | |
a.byteLength);b.set(Rx);b.set(a,Rx.byteLength);return b} | |
function qy(a){var b=Sx,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.Ra.byteLength)var e=Sx("avcC",a.Ra);else{e=Sx;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Bb.length;n++){var q=sy(a.Bb[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),f+=q.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k= | |
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Xx(c,2)),x(Xx(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=ty(a);g=new Uint8Array([]); | |
a.encrypted&&(g=uy(a),d="encv");c=Sx(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.Ra.byteLength&&(c=Sx("hvcC",a.Ra)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Xx(d,2)),x(Xx(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=ty(a),g=new Uint8Array([]),a.encrypted&&(g=uy(a),e="encv"),c=Sx(e,d, | |
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Sx(".mp3",vy(a));else if(a.codecs.includes("ac-3"))c=Sx("dac3",a.Fa),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=uy(a),d="enca"),a=Sx(d,vy(a),c,e);else if(a.codecs.includes("ec-3"))c=Sx("dec3",a.Fa),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=uy(a),d="enca"),a=Sx(d,vy(a),c,e);else if(a.codecs.includes("opus"))c=Sx("dOps",a.Fa),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=uy(a),d="enca"),a=Sx(d,vy(a),c,e);else{if(0<a.Fa.byteLength)c=Sx("esds", | |
a.Fa);else{c=Sx;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Tc("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(x(Xx(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=uy(a),d="enca"); | |
a=Sx(d,vy(a),c,e)}c=a}a=Sx("stsd",wy,c);return b("stbl",a,Sx("stts",xy),Sx("stsc",yy),Sx("stsz",zy),Sx("stco",Ay))}function ty(a){if(!a.Ya&&!a.ab)return new Uint8Array([]);var b=a.ab;a=new Uint8Array([].concat(x(Xx(a.Ya,4)),x(Xx(b,4))));return Sx("pasp",a)}function vy(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(Xx(a.stream.audioSamplingRate||44100,2)),[0,0]))} | |
function uy(a){var b=Sx;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(x(Xx(d,4))));c=Sx("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Sx("schm",d);e=Sx;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=u(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=u(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=sy(h.value)}a=new Uint8Array([0, | |
0,0,0,0,0,1,8]);f=Sx("tenc",a,f);return b("sinf",c,d,e("schi",f))} | |
function By(a){var b=[];a=u(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Sx;var g=new Uint8Array([0,0,0,0].concat(x(Xx(c.data?c.data.Vb:0,4))));g=Sx("mfhd",g);var h;var k=c.data?c.data.zb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.kb<<4|m.ob<<2|m.mb}k=Sx("sdtp",l);var n=k.length+92;l=Sx;h=new Uint8Array([0,0,0,58].concat(x(Xx(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Sx("tfhd",h);m=c.data?c.data.baseMediaDecodeTime: | |
0;var q=Math.floor(m%(Wx+1));m=new Uint8Array([1,0,0,0].concat(x(Xx(Math.floor(m/(Wx+1)),4)),x(Xx(q,4))));m=Sx("tfdt",m);var r=n;n=c.data?c.data.zb:[];q=n.length;var t=12+16*q,w=new Uint8Array(t);r+=8+t;w.set(["video"===c.type?1:0,0,15,1].concat(x(Xx(q,4)),x(Xx(r,4))),0);for(r=0;r<q;r++){var v=n[r];t=Xx(v.duration,4);var z=Xx(v.size,4),y=v.flags;v=Xx(v.vb,4);w.set([].concat(x(t),x(z),[y.xb<<2|y.kb,y.ob<<6|y.mb<<4|y.yb,y.jb&61440,y.jb&15],x(v)),12+16*r)}n=Sx("trun",w);k=l("traf",h,m,n,k);f=f("moof", | |
g,k);e.call(d,b,[f,Cy(c)])}return Pc.apply(Jc,x(b))}function Cy(a){a=(a.data?a.data.zb:[]).map(function(b){return b.data});a=Pc.apply(Jc,x(a));return Sx("mdat",a)}function Xx(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function sy(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b} | |
function Sx(a){var b=Ma.apply(1,arguments),c=Dy[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Dy[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e} | |
var Qx=!1,Wx=Math.pow(2,32)-1,Dy={},Yx=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),oy=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),xy=new Uint8Array([0,0,0,0,0,0,0,0]),yy=new Uint8Array([0,0,0,0,0,0,0,0]),Ay=new Uint8Array([0,0,0,0,0,0,0,0]),zy=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),py=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),ry=new Uint8Array([0, | |
0,0,0,0,0,0,0]),wy=new Uint8Array([0,0,0,0,0,0,0,1]),Rx=new Uint8Array([]),Tx=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ux=new Uint8Array([]);function Ey(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.G=new qd(5);this.s=new ac(function(){Fy(a)});this.C=new dh;this.m=new Map;this.B=function(){return!1}}p=Ey.prototype;p.configure=function(a,b){this.g=a;b&&(this.B=b)};p.start=function(a,b){var c=this;return P(function(d){if(1==d.g)return c.l=[a],c.h=b,G(d,Gy(c),2);if(!c.h)throw new U(2,7,7001);return d.return(c.j)})}; | |
function Fy(a){var b;P(function(c){switch(c.g){case 1:return ta(c,2),G(c,Gy(a),4);case 4:wa(c,3);break;case 2:b=ya(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}p.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.s&&(this.s.stop(),this.s=null);this.m.clear();return this.C.destroy()}; | |
p.update=function(){var a=this,b;return P(function(c){if(1==c.g)return ta(c,2),G(c,Gy(a),4);if(2!=c.g)return wa(c,0);b=ya(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){}; | |
function Gy(a){var b,c,d,e,f,g,h;return P(function(k){if(1==k.g)return b=kh(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5,isPreload:a.B()}),eh(a.C,e),G(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=cn){Dd("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=pv(m,"SmoothStreamingMedia");if(!m)throw new U(2, | |
4,4046,l);n(m);m=Fc(m.outerHTML)}var q=ee(m,"SmoothStreamingMedia");if(!q)throw new U(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=dn&&l(q);a.i||(a.i=new Vk(null,0));if(l=we(q,"IsLive",Ge,!1))throw new U(2,4,4047);a.i.$c(!l);n=we(q,"TimeScale",Ee,1E7);m=we(q,"DVRWindowLength",Ee);l&&(0===m||isNaN(m))&&(m=Infinity);var r=we(q,"CanSeek",Ge,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.rf(r); | |
m=we(q,"Duration",Ee,Infinity);l||a.i.sb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var t;r=me(q,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=u(r);for(t=r.next();!t.done;t=r.next())m=m.concat(me(t.value,"ProtectionHeader"));if(m.length){r=[];for(t=0;t<m.length;t++){var w=m[t],v=w.attributes.SystemID.toLowerCase(),z=n[v];if(z){var y;a:{if(y=zt(w)){y=u(pe(y,"DATA"));for(var A=y.next();!A.done;A=y.next())if(A=qe(A.value,"KID")){y=Mc(ne(A));y=new Uint8Array([y[3],y[2],y[1],y[0], | |
y[5],y[4],y[7],y[6]].concat(x(y.slice(8))));y=Oc(y);break a}}y=null}A=Mc(ne(w));v=Nc(v.replace(/-/g,""));v=[{initData:Lh(A,v,new Set,0),initDataType:"cenc",keyId:y}];v=Rc(z,"cenc",v);y&&v.keyIds.add(y);if(z=Ox.get(z))v.licenseServerUri=z(w);r.push(v)}}n=r}else n=[];t=n;r=[];n=[];m=[];q=me(q,"StreamIndex");q=u(q);for(w=q.next();!w.done;w=q.next()){w=w.value;z=me(w,"QualityLevel");v=l.timescale;y=l.duration;A=me(w,"c");for(var E=[],C=0,B=0;B<A.length;++B){var D=A[B],I=A[B+1],F=we(D,"t",Ee),L=we(D,"d", | |
Ee);D=we(D,"r",Ce);if(!L)break;F=null!=F?F:C;(D=D||0)&&D--;if(0>D)if(I){I=we(I,"t",Ee);if(null==I)break;else if(F>=I)break;D=Math.ceil((I-F)/L)-1}else{if(Infinity==y)break;else if(F/v>=y)break;D=Math.ceil((y*v-F)/L)-1}for(I=0;I<=D;++I)C=F+L,E.push({start:F/v,end:C/v,xh:F}),F=C}v=E;z=u(z);for(y=z.next();!y.done;y=z.next())(y=Hy(a,w,y.value,v,t,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Wc||a.g.disableText||m.push(y):n.push(y):r.push(y))}q=[];r=u(0<r.length?r: | |
[null]);for(t=r.next();!t.done;t=r.next())for(t=t.value,w=u(0<n.length?n:[null]),E=w.next();!E.done;E=w.next())z=q,v=z.push,y=a,A=t,E=E.value,B=0,A&&A.bandwidth&&0<A.bandwidth&&(B+=A.bandwidth),E&&E.bandwidth&&0<E.bandwidth&&(B+=E.bandwidth),y={id:y.u++,language:A?A.language:"und",disabledUntilTime:0,primary:!!A&&A.primary||!!E&&E.primary,audio:A,video:E,bandwidth:B,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},v.call(z,y);l.variants=q;l.textStreams=m;a.j?(a.j.variants=l.variants, | |
a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},a.i.Xe());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.G.sample(1,h);H(k)})} | |
function Hy(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return cb("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.u++,l=we(c,"Bitrate",De),m=we(c,"MaxWidth",De),n=we(c,"MaxHeight",De),q=we(c,"Channels",De),r=we(c,"SamplingRate",De),t=f.duration;d.length&&(t=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.sb(Math.min(t,w));var v={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()}, | |
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:cd(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:q,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0, | |
matchedStreams:[],mssPrivateData:{duration:t,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1};if(e=b.attributes.Subtype)(e=Iy[e])&&v.roles.push(e),"main"===e&&(v.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return cb('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'), | |
null;if(!Jy.includes(e.toUpperCase()))return cb("Codec not supported:",e),null;c=Ky(c,g,e,v);v.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return cb("Quality unsupported without CodecPrivateData",g),null;v.type="audio";v.mimeType="mss/audio/mp4";v.codecs=Ly(e,c);break;case "video":if(!c)return cb("Quality unsupported without CodecPrivateData",g),null;v.type="video";v.mimeType="mss/video/mp4";v.codecs=My(c);break;case "text":if(v.type=Wc,v.mimeType="application/mp4","TTML"===e|| | |
"DFXP"===e)v.codecs="stpp"}v.fullMimeTypes.add(Af(v.mimeType,v.codecs));v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(a.m.has(v.id))var z=a.m.get(v.id);else z=[],"video"==v.type&&(z=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,Bb:z,Fa:new Uint8Array([]),Ra:new Uint8Array([]),Ya:0,ab:0,data:null,stream:v},z=Vx(new Px([z])), | |
a.m.set(v.id,z);z=Ny(a,new Xi(function(){return[]},0,null,Dl(v),v.mssPrivateData.timescale,z),v,b,d);v.segmentIndex=new ql(z);return Promise.resolve()};v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)};return v} | |
function Ky(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3; | |
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Ly(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function My(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""} | |
function Ny(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=u(e);for(var g=e.next(),h={};!g.done;h={wf:void 0},g=e.next())h.wf=g.value,d.push(new Zi(h.wf.start,h.wf.end,function(k){return function(){return Qc(a.l,[f.replace("{start time}",String(k.wf.xh))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",Ey);var Jy="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Iy={CAPT:"main",SUBT:"alternate",DESC:"main"}; | |
Si["application/vnd.ms-sstr+xml"]=function(){return new Ey};function Oy(a,b,c,d,e,f,g){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=Ec(b)}catch(h){}throw new U(401==c||403==c?2:1,1,1001,d,c,f,a,g,e||d);};function Py(){} | |
function Qy(a,b,c,d,e,f){var g=new Ry;uh(b.headers).forEach(function(m,n){g.append(n,m)});var h=new Sy,k={Ih:!1,Vi:!1};a=Ty(a,b,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new Xg(a,function(){k.Ih=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new ac(function(){k.Vi=!0;h.abort()});l.Y(b/1E3);a.finally(function(){l.stop()})}return a} | |
function Ty(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,t,w,v,z,y,A,E,C;return P(function(B){switch(B.g){case 1:return l=Uy,m=Vy,q=new ArrayBuffer(0),t=r=0,w=Date.now(),ta(B,2),G(B,l(a,d),4);case 4:n=B.h;g(Wy(n.headers));if("HEAD"==d.method){B.A(5);break}v=n.clone().body.getReader();y=(z=n.headers.get("Content-Length"))?parseInt(z,10):0;A=function(D){function I(){var F,L,J,K;return P(function(O){switch(O.g){case 1:return ta(O,2),G(O,v.read(),4);case 4:F=O.h;wa(O,3);break;case 2:return ya(O),O.return();case 3:if(F.done){O.A(5); | |
break}r+=F.value.byteLength;if(!h){O.A(5);break}return G(O,h(F.value),5);case 5:L=Date.now();J=r-t;if(100<L-w&&J>=k||F.done)K=F.done?0:y-r,f(L-w,J,K),t=r,w=L;F.done?D.close():(D.enqueue(F.value),I());H(O)}})}I()};new m({start:A});return G(B,n.arrayBuffer(),6);case 6:q=B.h;case 5:wa(B,3);break;case 2:E=ya(B);if(e.Ih)throw new U(1,1,7001,a,c);if(e.Vi)throw new U(1,1,1003,a,c);throw new U(1,1,1002,a,E,c);case 3:return C=Wy(n.headers),B.return(Oy(C,q,n.status,a,n.url,b,c))}})} | |
function Wy(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Xy(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",Py);Py.isSupported=Xy;Py.parse=Qy;var Uy=window.fetch,Sy=window.AbortController,Vy=window.ReadableStream,Ry=window.Headers; | |
Xy()&&(gh("http",Qy,2,!0),gh("https",Qy,2,!0),gh("blob",Qy,2,!0));function Yy(){} | |
function Zy(a,b,c,d,e,f){var g=new $y,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;g.onabort=function(){n(new U(1,1,7001,a,c))};var q=!1;g.onreadystatechange=function(){if(2==g.readyState&&!q){var t=az(g);e(t);q=!0}};g.onload=function(t){var w=az(g),v=g.response;try{d(Date.now()-h,t.loaded-k,0);var z=Oy(w,v,g.status,a,g.responseURL,b,c);m(z)}catch(y){n(y)}};g.onerror= | |
function(t){n(new U(1,1,1002,a,t,c))};g.ontimeout=function(){n(new U(1,1,1003,a,c))};g.onprogress=function(t){var w=Date.now(),v=f.minBytesForProgressEvents||0,z=t.loaded-k;if(100<w-h&&z>=v||t.lengthComputable&&t.loaded==t.total)d(w-h,z,4==g.readyState?0:t.total-t.loaded),k=t.loaded,h=w};for(var r in b.headers)g.setRequestHeader(r.toLowerCase(),b.headers[r]);g.send(b.body)});return new Xg(l,function(){g.abort();return Promise.resolve()})} | |
function az(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",Yy);Yy.parse=Zy;var $y=window.XMLHttpRequest;gh("http",Zy,1,!0);gh("https",Zy,1,!0);gh("blob",Zy,1,!0);function bz(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function cz(a){var b=a.hc();return b?Lc(b):a.S().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.eb+":"+a.Na}function dz(a,b){return Xl(a.g.S(),a.g.eb,a.g.Na,b.streaming.retryParameters)};function ez(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function fz(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}ez.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function gz(a){return 0==a.i?0:a.j/a.i};function hz(a){var b=this;this.u=a;this.i=new Map;this.h=new sh(function(){return iz(b).catch(function(){})});this.j=[];this.s=function(){};this.m=function(){};this.g=new ez;this.l=!1}hz.prototype.destroy=function(){return this.h.destroy()};function jz(a,b,c){a.s=b;a.m=c}function iz(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)} | |
function kz(a,b,c,d,e,f){th(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,q,r;return P(function(t){if(1==t.g)return G(t,lz(a,c),2);h=t.h;if(a.h.g)throw new U(2,9,7001);if(e)for(m in k=Mb(h),l=new Kh(k),l.data)n=Number(m),q=l.data[n],r=l.g[n],a.m(q,r);a.g.close(d,h.byteLength);a.s(gz(a.g),a.g.g);return t.return(f(h))})});a.i.set(b,g)} | |
function mz(a,b,c,d,e,f){th(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new U(2,9,7001);if(e){var h=Mb(c);h=new Kh(h);for(var k in h.data){var l=Number(k);a.m(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.s(gz(a.g),a.g.g);return f(c)});a.i.set(b,g)}function nz(a){return P(function(b){return 1==b.g?G(b,Promise.all(a.i.values()),2):b.return(a.g.g)})} | |
function lz(a,b){var c,d,e,f;return P(function(g){if(1==g.g)return c=qh,d=a.u.request(c,b),e=function(){return d.abort()},a.j.push(e),G(g,d.promise,2);f=g.h;Rd(a.j,e);return g.return(f.data)})};function oz(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Wg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}oz.prototype.abort=function(){var a=this;return P(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return G(b,a.g,4)}if(2!=b.g)return wa(b,0);ya(b);H(b)})}; | |
function pz(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return P(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return G(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}oz.prototype.store=function(){return this.h};oz.prototype.promise=function(){return this.g};function qz(a){this.h=a;this.g=[]}qz.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function rz(a,b){return sz(a,b,"readwrite")}function sz(a,b,c){c=a.h.transaction([b],c);var d=new oz(c,b);a.g.push(d);d.promise().then(function(){Rd(a.g,d)},function(){Rd(a.g,d)});return d};function tz(a,b,c){this.h=new qz(a);this.i=b;this.g=c}p=tz.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return uz(this.i)};p.removeSegments=function(a,b){return vz(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return P(function(d){if(1==d.g)return G(d,wz(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Mh(e)}))})};p.addManifests=function(){return uz(this.g)}; | |
p.updateManifest=function(){return Promise.reject(new U(2,9,9016,"Cannot modify values in "+this.g))};function xz(a,b,c){a=rz(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}p.updateManifestExpiration=function(a,b){var c=rz(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};p.removeManifests=function(a,b){return vz(this,this.g,a,b)}; | |
p.getManifests=function(a){var b=this,c;return P(function(d){if(1==d.g)return G(d,wz(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Ld(e)})))})};p.getAllManifests=function(){var a=this,b,c;return P(function(d){return 1==d.g?(b=sz(a.h,a.g,"readonly"),c=new Map,G(d,pz(b,function(e,f){var g;return P(function(h){if(1==h.g)return G(h,a.Ld(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};p.Mh=function(a){return a};p.Ld=function(a){return Promise.resolve(a)}; | |
function uz(a){return Promise.reject(new U(2,9,9011,"Cannot add new value to "+a))}p.add=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){if(1==m.g){d=rz(c.h,a);e=d.store();f=[];g=u(b);h=g.next();for(k={};!h.done;k={Yg:void 0},h=g.next())l=h.value,k.Yg=e.add(l),k.Yg.onsuccess=function(n){return function(){f.push(n.Yg.result)}}(k);return G(m,d.promise(),2)}return m.return(f)})}; | |
function vz(a,b,c,d){a=rz(a.h,b);b=a.store();c=u(c);for(var e=c.next(),f={};!e.done;f={Jg:void 0},e=c.next())f.Jg=e.value,b.delete(f.Jg).onsuccess=function(g){return function(){return d(g.Jg)}}(f);return a.promise()} | |
function wz(a,b,c){var d,e,f,g,h,k,l;return P(function(m){if(1==m.g){d=sz(a.h,b,"readonly");e=d.store();f={};g=[];h=u(c);k=h.next();for(l={};!k.done;l={lf:void 0,Ve:void 0},k=h.next())l.Ve=k.value,l.lf=e.get(l.Ve),l.lf.onsuccess=function(n){return function(){void 0==n.lf.result&&g.push(n.Ve);f[n.Ve]=n.lf.result}}(l);return G(m,d.promise(),2)}if(g.length)throw new U(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function yz(a){this.g=new qz(a)}yz.prototype.destroy=function(){return this.g.destroy()};yz.prototype.getAll=function(){var a=this,b,c;return P(function(d){return 1==d.g?(b=sz(a.g,"session-ids","readonly"),c=[],G(d,pz(b,function(e,f){c.push(f)}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};yz.prototype.add=function(a){var b=rz(this.g,"session-ids"),c=b.store();a=u(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()}; | |
yz.prototype.remove=function(a){var b=this,c;return P(function(d){return 1==d.g?(c=rz(b.g,"session-ids"),G(d,pz(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):G(d,c.promise(),0)})};function zz(){this.g=new Map}zz.prototype.destroy=function(){for(var a=[],b=u(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};zz.prototype.init=function(){var a=this;Az.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=u(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)}; | |
function Bz(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Rb:d,fb:f},fb:e})})});if(b)return b;throw new U(2,9,9013,"Could not find a cell that supports add-operations");}function Cz(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Rb:d,fb:f},e)})})} | |
function Dz(a,b,c){a=a.g.get(b);if(!a)throw new U(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new U(2,9,9013,"Could not find cell with name "+c);return b}function Ez(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Fz(a){var b=Array.from(a.g.keys());if(!b.length)throw new U(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()} | |
function Gz(a){var b,c,d;return P(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Az,d.forEach(function(f){(f=f())&&b.push(f)})),G(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):G(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Hz(a,b){Az.set(a,b)}S("shaka.offline.StorageMuxer",zz);zz.unregister=function(a){Az.delete(a)};zz.register=Hz;zz.prototype.destroy=zz.prototype.destroy;var Az=new Map;function Iz(){tz.apply(this,arguments)}pa(Iz,tz);Iz.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return P(function(g){d=rz(c.h,c.g);e=d.store();f=new Wg;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new U(2,9,9012,"Could not find values for "+a))};return G(g,Promise.all([d.promise(),f]),0)})}; | |
Iz.prototype.Ld=function(a){var b,c,d,e,f,g;return P(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Jz(a.periods[c],e),b.push(f);return G(h,Ou(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})}; | |
function Jz(a,b){Kz(a);for(var c=u(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Lz(e,a.startTime,b)})} | |
function Lz(a,b,c){var d=a.initSegmentUri?Mz(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h= | |
Mz(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}Iz.prototype.Mh=function(a){return{data:a.data}}; | |
function Mz(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new U(2,9,9004,"Could not parse uri "+a);} | |
function Kz(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=u(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=u(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=u(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=c++, | |
e=u(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=u(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=u(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Nz(){tz.apply(this,arguments)}pa(Nz,tz); | |
Nz.prototype.Ld=function(a){var b,c,d,e,f,g;return P(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=u(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Oz(n,k.startTime,k.startTime+e));f=l;b.push(f)}return G(h,Ou(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration? | |
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})}; | |
function Oz(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey, | |
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}};function Pz(){tz.apply(this,arguments)}pa(Pz,tz);p=Pz.prototype;p.hasFixedKeySpace=function(){return!1};p.addSegments=function(a){return this.add(this.i,a)};p.addManifests=function(a){return this.add(this.g,a)};p.updateManifest=function(a,b){return xz(this,a,b)};p.Ld=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Qz(){this.m=this.j=this.i=this.h=this.g=this.l=null}p=Qz.prototype; | |
p.init=function(){var a=this,b=new Wg,c=!1,d=new ac(function(){c=!0;b.reject(new U(2,9,9017))});d.Y(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Iz(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Nz(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")? | |
new Nz(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Pz(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new yz(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=u(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new U(2, | |
9,9001,e.error)),d.stop(),f.preventDefault())};return b};p.destroy=function(){var a=this;return P(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return G(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return G(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return G(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return G(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return G(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),H(b)}})}; | |
p.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};p.getEmeSessionCell=function(){return this.m}; | |
p.erase=function(){var a=this;return P(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return G(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return G(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return G(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return G(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),G(b,Rz(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,G(b,a.init(),0)}})}; | |
function Rz(){var a=new Wg,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new U(2,9,9001,b.error));c.preventDefault()};return a}Hz("idb",function(){return(!kc()||kc()&&uc())&&!fc()&&window.indexedDB?new Qz:null});function Sz(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Sz.prototype.Rb=function(){return this.i};Sz.prototype.fb=function(){return this.h};Sz.prototype.key=function(){return this.l};Sz.prototype.toString=function(){return this.j}; | |
function Tz(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Sz(b,c,d,Number(a[4])):null};function Uz(a,b){this.h=a;this.g=b} | |
function Vz(a,b){var c=new Vk(null,0);c.sb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Wz(a,d,e,c);e=b.streams.filter(function(l){return l.type==Wc}).map(function(l){return Xz(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Xz(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=u(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos= | |
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}} | |
function Wz(a,b,c,d){for(var e=new Set,f=u(b),g=f.next();!g.done;g=f.next()){g=u(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=u(c);for(g=f.next();!g.done;g=f.next())for(g=u(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=u(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=u(b);for(e=b.next();!e.done;e= | |
b.next())for(g=e.value,e=Xz(a,g,d),g=u(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=u(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Xz(a,e,d),e=u(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f} | |
function Xz(a,b,c){var d=b.segments.map(function(e){return Yz(a,e,b)});c.be(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ql(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage|| | |
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,mssPrivateData:b.mssPrivateData,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Af(b.mimeType,b.codecs)]),isAudioMuxedInVideo:!1}} | |
function Yz(a,b,c){var d=new Sz("segment",a.h,a.g,b.dataKey);a=new Zi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?Zz(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";b.thumbnailSprite&&a.vf(b.thumbnailSprite);return a}function Zz(a,b){var c=new Sz("segment",a.h,a.g,b);return new Xi(function(){return[c.toString()]},0,null)};function $z(){this.g=null}p=$z.prototype;p.configure=function(){}; | |
p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:d=Tz(a);c.g=d;if(null==d||"manifest"!=d.g)throw new U(2,1,9004,a);e=new zz;ua(m,2);return G(m,e.init(),4);case 4:return G(m,Dz(e,d.Rb(),d.fb()),5);case 5:return f=m.h,G(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Uz(d.Rb(),d.fb()),l=Vz(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ca(m),G(m,e.destroy(),7);case 7:Da(m,0)}})};p.stop=function(){return Promise.resolve()}; | |
p.update=function(){}; | |
p.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:return d=c.g,e=new zz,ta(m,2,3),G(m,e.init(),5);case 5:return G(m,Dz(e,d.Rb(),d.fb()),6);case 6:return f=m.h,G(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return G(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ca(m),G(m,e.destroy(),10);case 10:Da(m,0);break;case 2:ya(m),m.A(3)}})}; | |
p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};Si["application/x-offline-manifest"]=function(){return new $z};function aA(){}function bA(a,b){var c=Tz(a);c&&"manifest"==c.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=$g(a)):a=c&&"segment"==c.g?cA(c.key(),c,b):Yg(new U(2,1,9004,a));return a} | |
function cA(a,b,c){var d=new zz;return $g(void 0).Wa(function(){return d.init()}).Wa(function(){return Dz(d,b.Rb(),b.fb())}).Wa(function(e){return e.getSegments([b.key()])}).Wa(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}S("shaka.offline.OfflineScheme",aA);aA.plugin=bA;gh("offline",bA);function dA(a,b,c){var d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:d=[];for(var m=[],n=u(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var r=!1,t=u(m),w=t.next();!w.done;w=t.next())if(w=w.value,eA(w.info,q)){w.sessionIds.push(q.sessionId);r=!0;break}r||m.push({info:q,sessionIds:[q.sessionId]})}e=u(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=fA(a,b,g);return G(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l.return(d)}})} | |
function fA(a,b,c){var d,e;return P(function(f){switch(f.g){case 1:return d=new Mh({nc:b,onError:function(){},ef:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),G(f,Uh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return ya(f),G(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],G(f,Promise.all(c.sessionIds.map(function(g){return P(function(h){if(1== | |
h.g)return ta(h,2),G(h,ii(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);ya(h);H(h)})})),6);case 6:return G(f,d.destroy(),7);case 7:return f.return(e)}})}function eA(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Sd(a.audioCapabilities,b.audioCapabilities,c)&&Sd(a.videoCapabilities,b.videoCapabilities,c)};function gA(a,b,c){var d=b.presentationTimeline.getDuration();b=hA(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function iA(a,b){var c=Vz(new Uz(a.Rb(),a.fb()),b),d=b.appMetadata||{};c=hA(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}} | |
function hA(a){var b=[],c=Kg(a.variants);c=u(c);for(var d=c.next();!d.done;d=c.next())b.push(Ag(d.value));a=u(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Bg(c.value));return b};function jA(){this.g={}}function kA(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function lA(a,b){a.g[b.id]=b.bandwidth||2048}function mA(a,b){a=a.g[b];null==a&&(a=0);return a};function nA(a){var b=this;if(a&&a.constructor!=Y)throw new U(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Db()):(this.h=bn(),this.g=new fh);this.i=[];this.l=[];var c=!a;this.j=new sh(function(){var d,e,f,g,h;return P(function(k){switch(k.g){case 1:return G(k,Promise.all(b.l.map(function(l){return iz(l)})),2);case 2:d=function(){};e=[];f=u(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return G(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return G(k,b.g.destroy(),4); | |
case 4:b.h=null,b.g=null,H(k)}})});this.m=1E9}function oA(){if(bc())a:{var a=u(Az.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}p=nA.prototype;p.destroy=function(){return this.j.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Jm(a,b));return gn(this.h,a)};p.getConfiguration=function(){var a=bn();gn(a,this.h,bn());return a};p.Db=function(){return this.g}; | |
p.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new hz(this.g);this.l.push(h);b=pA(this,a,b||{},d||[],e||[],function(){var k;return P(function(l){if(1==l.g)return c?l.A(2):G(l,In(a,f.g,g.manifest.retryParameters),3);2!=l.g&&(c=l.h);k=Ri(a,c||null);return l.return(k())})},g,h);b=new Xg(b,function(){return iz(h)});b.finally(function(){Rd(f.l,h)});return qA(this,b)}; | |
function pA(a,b,c,d,e,f,g,h){var k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N;return P(function(R){switch(R.g){case 1:return rA(),l=k=null,m=new zz,r=q=n=null,ta(R,2,3),G(R,f(),5);case 5:return k=R.h,G(R,sA(a,b,k,g),6);case 6:t=R.h;tA(a);w=!t.presentationTimeline.T()&&!t.presentationTimeline.Rc();if(!w)throw new U(2,9,9005,b);v=u(d);z=v.next();case 7:if(z.done){R.A(9);break}y=z.value;return G(R,uA(a,y,t),10);case 10:A=R.h;t.imageStreams.push(A);tA(a);z=v.next();R.A(7);break;case 9:E=u(e),C=E.next(); | |
case 11:if(C.done)return Wh(g.drm.clearKeys,t.variants),I=t.variants.some(function(Q){if(Q.audio)for(var V=u(Q.audio.drmInfos),ba=V.next();!ba.done;ba=V.next())if(ba.value.licenseServerUri.startsWith("data:"))return!0;if(Q.video)for(Q=u(Q.video.drmInfos),V=Q.next();!V.done;V=Q.next())if(V.value.licenseServerUri.startsWith("data:"))return!0;return!1}),F=g.offline.usePersistentLicense,I&&(F=!1),G(R,a.hd(t,function(Q){r=r||Q},g,F),15);B=C.value;return G(R,vA(a,t,B.uri,B.language,B.kind,B.mime,B.codecs), | |
14);case 14:D=R.h;t.textStreams.push(D);tA(a);C=E.next();R.A(11);break;case 15:l=R.h;tA(a);if(r)throw r;return G(R,wA(t,l,g,F),16);case 16:return G(R,m.init(),17);case 17:return tA(a),G(R,Bz(m),18);case 18:return n=R.h,tA(a),L=xA(l,t,b,c,g,h,F),J=L.vk,K=L.sh,G(R,n.fb.addManifests([J]),19);case 19:O=R.h;tA(a);q=O[0];tA(a);if(r)throw r;return G(R,yA(a,K,q,J,h,g,n.fb,t,l,F),20);case 20:return tA(a),zA(t,J,l,F),G(R,n.fb.updateManifest(q,J),21);case 21:return tA(a),M=new Sz("manifest",n.path.Rb,n.path.fb, | |
q),R.return(iA(M,J));case 3:return Ca(R),G(R,m.destroy(),22);case 22:if(!k){R.A(23);break}return G(R,k.stop(),23);case 23:if(!l){R.A(25);break}return G(R,l.destroy(),25);case 25:Da(R,0);break;case 2:N=ya(R);if(null==q){R.A(27);break}return G(R,AA(q),27);case 27:throw r||N;}})} | |
function yA(a,b,c,d,e,f,g,h,k,l){var m,n,q,r,t,w,v,z,y,A,E;return P(function(C){switch(C.g){case 1:m={};n=0;q=function(){if(a.j.g||e.l)throw new U(2,9,7001);};r=function(B,D){var I,F,L,J,K,O,M,N,R;return P(function(Q){if(1==Q.g){I=u(B);F=I.next();for(L={};!F.done;L={cc:void 0},F=I.next())L.cc=F.value,q(),J=dz(L.cc,f),K=L.cc.i,O=L.cc.h,M=function(V){return function(ba){var ia,xa,Ea;return P(function(va){switch(va.g){case 1:ia=V.cc.g;xa=cz(ia);if(!ia.aesKey){va.A(2);break}return G(va,Wl(ba,ia.aesKey, | |
V.cc.j),3);case 3:ba=va.h;case 2:return G(va,g.addSegments([{data:ba}]),4);case 4:Ea=va.h,q(),m[xa]=Ea[0],n+=ba.byteLength,H(va)}})}}(L),N=L.cc.g,(R=N.hc())?mz(e,L.cc.groupId,R,K,O,M):kz(e,L.cc.groupId,J,K,O,M);return G(Q,nz(e),2)}q();if(!D||e.l)return Q.A(0);zA(h,d,k,l);return G(Q,g.updateManifest(c,d),0)})};t=!1;ta(C,2);if(!BA(h)||!t||CA(h)){C.A(4);break}return G(C,r(b.filter(function(B){return B.h}),!0),5);case 5:return q(),b=b.filter(function(B){return!B.h}),w=m,v=n,m={},n=0,G(C,DA(g,c,d,w,v, | |
function(){return tA(a)}),6);case 6:q();case 4:if(t){C.A(7);break}return G(C,r(b,!1),8);case 8:return q(),z=m,y=n,m={},n=0,G(C,DA(g,c,d,z,y,function(){return q()}),9);case 9:q();case 7:wa(C,0);break;case 2:return A=ya(C),E=Object.values(m),G(C,g.removeSegments(E,function(){}),10);case 10:throw A;}})} | |
function AA(a){var b,c,d,e;return P(function(f){switch(f.g){case 1:return b=new zz,G(f,b.init(),2);case 2:return G(f,Bz(b),3);case 3:return c=f.h,d=new Sz("manifest",c.path.Rb,c.path.fb,a),G(f,b.destroy(),4);case 4:return e=new nA,G(f,e.remove(d.toString()),0)}})} | |
function DA(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,w,v;return P(function(z){switch(z.g){case 1:g=!1;ta(z,2);h=!0;k=u(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=u(m.segments),q=n.next();!q.done;q=n.next())r=q.value,t=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=t&&(r.dataKey=t,r.pendingSegmentRefId=void 0),t=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=t&&(r.initSegmentKey=t,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&& | |
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return G(z,a.updateManifest(b,c),4);case 4:g=!0;f();wa(z,0);break;case 2:return w=ya(z),G(z,AA(b),5);case 5:if(g){z.A(6);break}v=Object.values(d);return G(z,a.removeSegments(v,function(){}),6);case 6:throw w;}})} | |
function wA(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N,R,Q;return P(function(V){switch(V.g){case 1:return e={width:Infinity,height:Infinity},bg(a,c.restrictions,e),G(V,gg(b,a,d,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:f=[];g=c.preferredDecodingAttributes;h=c.preferredVideoCodecs;k=c.preferredAudioCodecs;l=c.preferredTextFormats;$f(a,h,k,g,l);m=u(a.variants);for(n=m.next();!n.done;n=m.next())q=n.value,f.push(Ag(q));r=u(a.textStreams);for(t=r.next();!t.done;t= | |
r.next())w=t.value,f.push(Bg(w));v=u(a.imageStreams);for(z=v.next();!z.done;z=v.next())y=z.value,f.push(Cg(y));return G(V,c.offline.trackSelectionCallback(f),3);case 3:A=V.h;E=a.presentationTimeline.getDuration();C=0;B=u(A);for(D=B.next();!D.done;D=B.next())I=D.value,F=I.bandwidth*E/8,C+=F;ta(V,4);return G(V,c.offline.downloadSizeCallback(C),6);case 6:L=V.h;if(!L)throw new U(2,9,9014);wa(V,5);break;case 4:J=ya(V);if(J instanceof U)throw J;throw new U(2,9,9015);case 5:K=new Set;O=new Set;M=new Set; | |
N=u(A);for(R=N.next();!R.done;R=N.next())Q=R.value,"variant"==Q.type&&K.add(Q.id),"text"==Q.type&&O.add(Q.id),"image"==Q.type&&M.add(Q.id);a.variants=a.variants.filter(function(ba){return K.has(ba.id)});a.textStreams=a.textStreams.filter(function(ba){return O.has(ba.id)});a.imageStreams=a.imageStreams.filter(function(ba){return M.has(ba.id)});EA(a);H(V)}})} | |
function xA(a,b,c,d,e,f,g){var h=gA(c,b,d),k=e.offline.progressCallback;jz(f,function(t,w){h.size=w;k(h,t)},function(t,w){l&&g&&m==w&&ei(a,"cenc",t)});var l=BA(b)&&!CA(b),m=null;l&&(m=FA.get(a.h.keySystem));for(var n=new jA,q=u(b.textStreams),r=q.next();!r.done;r=q.next())n.g[r.value.id]=52;q=u(b.imageStreams);for(r=q.next();!r.done;r=q.next())lA(n,r.value);q=u(b.variants);for(r=q.next();!r.done;r=q.next())kA(n,r.value);f=GA(f,n,b,e);e=f.streams;f=f.sh;(n=a.h)&&g&&(n.initData=[]);return{vk:{creationTime:Date.now(), | |
originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Pd(),streams:e,sessionIds:g?ni(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},sh:f}}function BA(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})} | |
function CA(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function zA(a,b,c,d){b.expiration=c.Pd();c=ni(c);b.sessionIds=d?c:[];if(BA(a)&&d&&!c.length)throw new U(2,9,9007);}p.remove=function(a){return HA(this,IA(this,a))}; | |
function IA(a,b){var c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:rA();c=Tz(b);if(null==c||"manifest"!=c.g)throw new U(2,9,9004,b);d=c;e=new zz;ua(k,2);return G(k,e.init(),4);case 4:return G(k,Dz(e,d.Rb(),d.fb()),5);case 5:return f=k.h,G(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],G(k,Promise.all([JA(a,h,e),KA(f,d,h)]),2);case 2:return Ca(k),G(k,e.destroy(),8);case 8:Da(k,0)}})} | |
function LA(a,b){for(var c=[],d=u(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Af(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Af(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function JA(a,b,c){return P(function(d){return G(d,MA(a.g,a.h.drm,c,b),0)})} | |
function KA(a,b,c){function d(){}var e=NA(c);iA(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Nk=function(){return HA(this,OA(this))}; | |
function OA(a){var b,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:return rA(),b=a.g,c=a.h.drm,d=new zz,e=!1,ua(n,2),G(n,d.init(),4);case 4:f=[],Ez(d,function(q){return f.push(q)}),g=u(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return G(n,k.getAll(),8);case 8:return l=n.h,G(n,dA(c,b,l),9);case 9:return m=n.h,G(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return Ca(n),G(n,d.destroy(),11);case 11:Da(n,3);break;case 3:return n.return(!e)}})} | |
p.list=function(){return HA(this,PA())};function PA(){var a,b,c;return P(function(d){switch(d.g){case 1:return rA(),a=[],b=new zz,ua(d,2),G(d,b.init(),4);case 4:return c=Promise.resolve(),Cz(b,function(e,f){c=c.then(function(){var g;return P(function(h){if(1==h.g)return G(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=iA(new Sz("manifest",e.Rb,e.fb,l),k);a.push(k)});H(h)})})}),G(d,c,2);case 2:return Ca(d),G(d,b.destroy(),6);case 6:Da(d,3);break;case 3:return d.return(a)}})} | |
function sA(a,b,c,d){var e,f,g,h,k;return P(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){}, | |
addFont:function(){}},c.configure(d.manifest),tA(a),G(l,c.start(b,g),2);if(3!=l.g)return h=l.h,tA(a),k=QA(h),G(l,Promise.all(lb(k,function(m){return m.createSegmentIndex()})),3);tA(a);if(e)throw e;return l.return(h)})} | |
function uA(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,z;return P(function(y){switch(y.g){case 1:return G(y,RA(a,b),2);case 2:d=y.h;if("text/vtt"!=d)throw new U(1,2,2017,b);return G(y,SA(b,a.g,a.h.streaming.retryParameters),3);case 3:e=y.h;f=Pf[d];if(!f)throw new U(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Mb(e);l=g.parseMedia(k,h,b,[]);m=[];n=u(l);q=n.next();for(r={};!q.done;r={Df:void 0,kd:void 0},q=n.next())r.kd=q.value,r.Df=null, | |
t=function(A){return function(){null==A.Df&&(A.Df=Qc([b],[A.kd.payload]));return A.Df||[]}}(r),w=new Zi(r.kd.startTime,r.kd.endTime,t,0,null,null,0,0,Infinity),r.kd.payload.includes("#xywh")&&(v=r.kd.payload.split("#xywh=")[1].split(","),4===v.length&&w.vf({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),m.push(w);z=d;if(!m.length){y.A(4);break}return G(y,In(m[0].S()[0],a.g,a.h.manifest.retryParameters),5);case 5:z=y.h;case 4:return y.return({id:a.m++, | |
originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ql(m),mimeType:z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Af(z||"","")]), | |
isAudioMuxedInVideo:!1})}})} | |
function vA(a,b,c,d,e,f,g){var h,k,l;return P(function(m){if(1==m.g)return f?m.A(2):G(m,RA(a,c),3);2!=m.g&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:sl(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:Wc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null, | |
spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Af(f||"",g||"")]),isAudioMuxedInVideo:!1};k=Af(h.mimeType,h.codecs);l=Of(k);if(!l)throw new U(2,2,2014,f);return m.return(h)})}function RA(a,b){var c;return P(function(d){switch(d.g){case 1:return ta(d,2),G(d,In(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;wa(d,3);break;case 2:ya(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})} | |
function SA(a,b,c){var d,e,f;return P(function(g){if(1==g.g)return d=qh,e=kh([a],c),e.method="GET",G(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})}p.hd=function(a,b,c,d){var e=this,f;return P(function(g){return 1==g.g?(f=new Mh({nc:e.g,onError:b,ef:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),G(g,Rh(f,a.variants,d),2)):3!=g.g?G(g,gi(f),3):g.return(f)})}; | |
function GA(a,b,c,d){var e=new Map,f=QA(c),g=new Map;f=u(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=TA(a,b,c,h,d,e);g.set(h.id,k)}a=u(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),sh:Array.from(e.values())}} | |
function TA(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount, | |
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching,isAudioMuxedInVideo:d.isAudioMuxedInVideo},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;UA(d,c.presentationTimeline.Eb(),function(l,m){var n=cz(l),q=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=mA(b,d.id)*r;r=fz(a.g,r);f.set(n,new bz(l,r,k,!1,m))}l.qa&&(q=cz(l.qa),f.has(q)||(r=.5* | |
mA(b,d.id),r=fz(a.g,r),f.set(q,new bz(l.qa,r,k,!0,m))));g.segments.push({pendingInitSegmentRefId:q,initSegmentKey:q?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:n,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite});0!==h&&(k=(k+1)%h)});return g} | |
function UA(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d,b),d=a.segmentIndex.get(++b)}function tA(a){if(a.j.g)throw new U(2,9,7001);}function rA(){if(!oA())throw new U(2,9,9E3);}function HA(a,b){return P(function(c){if(1==c.g)return a.i.push(b),ua(c,2),G(c,b,4);if(2!=c.g)return c.return(c.h);Ca(c);Rd(a.i,b);return Da(c,0)})}function qA(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Rd(a.i,c)})} | |
function NA(a){var b=new Set;a=u(a.streams);for(var c=a.next();!c.done;c=a.next()){c=u(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)} | |
function MA(a,b,c,d){var e,f,g;return P(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Fz(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:LA(d,!1),videoCapabilities:LA(d,!0)}});return G(h,dA(b,a,f),2)}return 3!=h.g?(g=h.h,G(h,e.remove(g),3)):G(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})} | |
function QA(a){for(var b=new Set,c=u(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=u(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=u(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b} | |
function EA(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=u(b),d=c.next();!d.done;d=c.next()){d=u(b);for(var e=d.next();!e.done;e=d.next());}b=u(a);for(c=b.next();!c.done;c=b.next())for(c=u(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",nA);nA.deleteAll=function(){var a;return P(function(b){return 1==b.g?(a=new zz,ua(b,2),G(b,Gz(a),2)):5!=b.g?(Ca(b),G(b,a.destroy(),5)):Da(b,0)})}; | |
nA.prototype.list=nA.prototype.list;nA.prototype.removeEmeSessions=nA.prototype.Nk;nA.prototype.remove=nA.prototype.remove;nA.prototype.store=nA.prototype.store;nA.prototype.getNetworkingEngine=nA.prototype.Db;nA.prototype.getConfiguration=nA.prototype.getConfiguration;nA.prototype.configure=nA.prototype.configure;nA.prototype.destroy=nA.prototype.destroy;nA.support=oA; | |
var FA=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c"); | |
vq.offline=oA;function VA(){}function WA(){for(var a=u(XA),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){cb("Error installing polyfill!",c)}}}function YA(a,b){a={priority:b||0,callback:a};for(b=0;b<XA.length;b++)if(XA[b].priority<a.priority){XA.splice(b,0,a);return}XA.push(a)}S("shaka.polyfill",VA);VA.register=YA;VA.installAll=WA;var XA=[];function ZA(){}function $A(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=u(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())aB(b.value)}function aB(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}VA.Aria=ZA;ZA.install=$A;YA($A);function bB(){}function cB(){oc()||gc("Sky_STB")||dB()}VA.EncryptionScheme=bB;bB.install=cB;YA(cB,-2);function eB(){} | |
function fB(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}), | |
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",gB);document.addEventListener("webkitfullscreenerror",gB);document.addEventListener("mozfullscreenchange",gB);document.addEventListener("mozfullscreenerror",gB);document.addEventListener("MSFullscreenChange",gB);document.addEventListener("MSFullscreenError",gB)}} | |
function gB(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}VA.Fullscreen=eB;eB.install=fB;YA(fB);function hB(){}function iB(){var a=!0;!kc()||kc()&&uc()||kc()&&gc("Fuchsia")||(a=!1);if(mc()||pc()||oc()||jc()||hc()||gc("PC=EOS")||qc()||gc("WPE"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),jB=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=kB)} | |
function kB(a){var b,c,d,e,f,g,h,k,l,m,n;return P(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=cc(e),!f)||d&&(g=d.contentType,h=cc(g),!h))return q.return(b)}else return q.return(b);q.A(2);break}if(!bc())return q.return(b);if(!c){q.A(3);break}return G(q,lB(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var r=d.contentType;kc()&&d.spatialRendering&& | |
(r+="; spatialRendering=true");l=zd(r);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return G(q,mB(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})} | |
function lB(a){var b,c;return P(function(d){return 1==d.g?kc()?G(d,nB(a),3):hc()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(zd(b))):d.A(2):2!=d.g?(c=d.h,d.return(c)):d.return(zd(a.contentType))})} | |
function mB(a,b,c){var d,e,f,g,h,k,l,m,n,q,r;return P(function(t){switch(t.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},hc()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h= | |
{initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=Kf(k)+";"+Jf(k);n=Kf(l)+";"+Jf(l);q=c.keySystem;r=null;ta(t,2);if(Yb.has(m+"#"+n+"#"+q)){r=Yb.get(m+"#"+n+"#"+q)||null;t.A(4);break}return G(t,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:r=t.h,Yb.set(m+"#"+n+"#"+q,r);case 4:wa(t, | |
3);break;case 2:ya(t);case 3:return t.return(r)}})} | |
function nB(a){var b,c,d,e;return P(function(f){if(1==f.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return f.return(zd(a.contentType));b=a.contentType;a.width&&a.height&&1280<a.width&&720<a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),24>c||30<c)&&(b+="; framerate="+a.framerate);d=a.transferFunction||"";switch(d){case "":case "srgb":break;case "pq":b+="; eotf=smpte2084";break;case "hlg":b+="; eotf=arib-std-b67";break;default:return f.return(!1)}e= | |
!1;return b in oB?(e=oB[b],f.A(2)):G(f,cast.__platform__.canDisplayType(b),3)}2!=f.g&&(e=f.h,oB[b]=e);return f.return(e)})}VA.MediaCapabilities=hB;hB.install=iB;var jB=null;hB.originalMcap=jB;var oB={};hB.memoizedCanDisplayTypeRequests_=oB;YA(iB,-1);function pB(){}function qB(){var a=rc();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(rB(),sB()):15>=a&&rB():gc("DT_STB_BCM")?(rB(),sB()):gc("Tizen 2")||ic()||gc("Tizen 4")?tB():gc("WPE")&&(rB(),sB());(window.MediaSource||window.ManagedMediaSource)&&uB();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&vB()} | |
function rB(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ma.apply(0,arguments));b.abort=function(){};return b}}function sB(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}} | |
function uB(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Gf(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Gf(c)&&b(c)}}} | |
function tB(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Jf(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Jf(c)&&b(c)}}} | |
function vB(){var a=MediaSource.isTypeSupported;jc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}VA.MediaSource=pB;pB.install=qB;YA(qB);function wB(){}function xB(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?yB():void 0!=window.orientation&&zB())}function yB(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})} | |
function zB(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new AB;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new T("change");b.dispatchEvent(c)})}VA.Orientation=wB;wB.install=xB;function AB(){kb.call(this);this.type="";this.angle=0}pa(AB,kb); | |
AB.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)}; | |
AB.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};YA(xB);function BB(){}var CB,DB,EB,FB,GB,HB;function IB(a,b){try{var c=new JB(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function KB(a){var b=this.mediaKeys;b&&b!=a&&LB(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?LB(a,this):Promise.resolve()} | |
function MB(a){a=Mb(a.initData);if(Qb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Fc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Nb(a);this.dispatchEvent(b)}VA.PatchedMediaKeysApple=BB; | |
BB.uninstall=function(){CB&&(CB=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",DB),HTMLMediaElement.prototype.setMediaKeys=EB,window.MediaKeys=FB,window.MediaKeySystemAccess=GB,navigator.requestMediaKeySystemAccess=HB,DB=HB=EB=GB=FB=null,window.shakaMediaKeysPolyfill="")}; | |
BB.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)CB=!0,DB=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),EB=HTMLMediaElement.prototype.setMediaKeys,FB=window.MediaKeys,GB=window.MediaKeySystemAccess,HB=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=KB;window.MediaKeys=NB;window.MediaKeySystemAccess=JB;navigator.requestMediaKeySystemAccess= | |
IB;window.shakaMediaKeysPolyfill=OB}}; | |
function JB(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=u(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=u(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem, | |
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=u(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;} | |
JB.prototype.createMediaKeys=function(){var a=new NB(this.keySystem);return Promise.resolve(a)};JB.prototype.getConfiguration=function(){return this.g};function NB(a){this.h=new WebKitMediaKeys(a);this.g=new td}NB.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new PB(this.h,a)};NB.prototype.setServerCertificate=function(){return Promise.resolve(!1)}; | |
function LB(a,b){a.g.Ua();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",MB);try{return bl(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}NB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function PB(a){kb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new td;this.sessionId="";this.expiration=NaN;this.closed=new Wg;this.keyStatuses=new QB}pa(PB,kb);p=PB.prototype; | |
p.generateRequest=function(a,b){var c=this;this.h=new Wg;try{var d=this.l.createSession("video/mp4",Mb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.xc()?"license-request":"license-renewal").set("message",Nb(e.message));e=new T("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(RB(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror", | |
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:RB(c,"output-not-allowed");break;default:RB(c,"internal-error")}});RB(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))}; | |
p.update=function(a){this.g=new Wg;try{this.i.update(Mb(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ua()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function RB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)} | |
function QB(){this.size=0;this.g=void 0}p=QB.prototype;p.xc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,Xb.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Xb.value();return this.g&&Lb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var OB="apple";function SB(){}function TB(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||ic()||gc("Tizen 4")||gc("Tizen 5.0")||jc()&&38===lc())&&(MediaKeys.prototype.setServerCertificate=UB)}function UB(){return Promise.resolve(!1)}VA.PatchedMediaKeysCert=SB;SB.install=TB;YA(TB);function VB(){} | |
function WB(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)XB="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=YB;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=ZB;window.MediaKeys=$B;window.MediaKeySystemAccess=aC;window.shakaMediaKeysPolyfill=bC}} | |
function cC(a){var b=XB;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function YB(a,b){try{var c=new aC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ZB(a){var b=this.mediaKeys;b&&b!=a&&dC(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&dC(a,this);return Promise.resolve()}VA.PatchedMediaKeysWebkit=VB;VB.install=WB; | |
function aC(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=u(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=u(f.audioCapabilities), | |
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=u(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]): | |
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}aC.prototype.createMediaKeys=function(){var a=new $B(this.g);return Promise.resolve(a)};aC.prototype.getConfiguration=function(){return this.h};function $B(a){this.l=a;this.h=null;this.g=new td;this.i=[];this.j=new Map} | |
function dC(a,b){a.h=b;a.g.Ua();var c=XB;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Nb(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=eC(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.xc()?"licenserequest":"licenserenewal").set("message",d.message),d=new T("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){(d=eC(a,d.sessionId))&&d.ready()}), | |
a.g.o(b,c+"keyerror",function(d){var e=eC(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?fC(e,"output-restricted"):1==f?fC(e,"expired"):fC(e,"internal-error"))}}))} | |
$B.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new gC(b,this.l,a);this.i.push(a);return a};$B.prototype.setServerCertificate=function(){return Promise.resolve(!1)};$B.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")}; | |
function eC(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function gC(a,b,c){kb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Wg;this.keyStatuses=new hC}pa(gC,kb);p=gC.prototype;p.ready=function(){fC(this,"usable");this.g&&this.g.resolve();this.g=null}; | |
function iC(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Mb(Fc("LOAD_SESSION|"+c));else{var e=Fc("PERSISTENT|");d=Pc(e,b)}else d=Mb(b)}catch(g){return Promise.reject(g)}a.h=new Wg;var f=cC("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new ac(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).Y(.01)}return a.h} | |
function jC(a,b,c){if(a.g)a.g.then(function(){return jC(a,b,c)}).catch(function(){return jC(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Bc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Mc(e.keys[0].k);e=Mc(e.keys[0].kid)}else d=Mb(c),e=null;var f=cC("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}} | |
function fC(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}p.generateRequest=function(a,b){return iC(this,b,null)};p.load=function(a){return"persistent-license"==this.l?iC(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Wg;jC(this,b,a);return b}; | |
p.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=cC("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function hC(){this.size=0;this.g=void 0}p=hC.prototype;p.xc=function(){return this.g}; | |
p.forEach=function(a){this.g&&a(this.g,Xb.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Xb.value();return this.g&&Lb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var XB="",bC="webkit";YA(WB);function kC(){}function lC(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=mC,Object.defineProperty(a,"disablePictureInPicture",{get:nC,set:oC,enumerable:!0,configurable:!0}),document.exitPictureInPicture=pC,document.addEventListener("webkitpresentationmodechanged",qC,!0))}} | |
function qC(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)} | |
function mC(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function pC(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))} | |
function nC(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function oC(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}VA.PiPWebkit=kC;kC.install=lC;YA(lC);function rC(){}function sC(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=tC))}function tC(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}VA.RandomUUID=rC;rC.install=sC;YA(sC);function uC(){}function vC(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:wC})}function wC(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}VA.Symbol=uC;uC.install=vC;YA(vC);function xC(){}function yC(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}VA.VideoPlayPromise=xC;xC.install=yC;YA(yC);function zC(){}function AC(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||jc()&&38===lc())&&(a.getVideoPlaybackQuality=BC)}}function BC(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}VA.VideoPlaybackQuality=zC;zC.install=AC;YA(AC);function CC(){}function DC(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=EC;else if(6==b)a=FC;else{try{var c=!!EC(1,2,"")}catch(d){c=!1}c&&(a=EC)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function EC(a,b,c){return new window.TextTrackCue(a,b,c)}function FC(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}VA.VTTCue=CC;CC.install=DC;YA(DC);function GC(){}GC.prototype.parseInit=function(){};GC.prototype.setSequenceMode=function(){};GC.prototype.setManifestType=function(){};GC.prototype.parseMedia=function(a,b){var c=null,d=[];a=Bc(a).split(/\r?\n/);a=u(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=HC.exec(e))){var f=IC.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Pe(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d}; | |
S("shaka.text.LrcTextParser",GC);GC.prototype.parseMedia=GC.prototype.parseMedia;GC.prototype.setManifestType=GC.prototype.setManifestType;GC.prototype.setSequenceMode=GC.prototype.setSequenceMode;GC.prototype.parseInit=GC.prototype.parseInit;var HC=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,IC=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Pf["application/x-subtitle-lrc"]=function(){return new GC};function JC(){}JC.prototype.parseInit=function(){};JC.prototype.setSequenceMode=function(){};JC.prototype.setManifestType=function(){}; | |
JC.prototype.parseMedia=function(a,b,c,d){var e=Bc(a);a=[];if(""==e)return a;var f=fe(e,"tt",!0);if(!f)throw new U(2,2,2005,"Failed to parse TTML.");e=pe(f,"body")[0];if(!e)return[];var g=ye(f,KC,"frameRate"),h=ye(f,KC,"subFrameRate"),k=ye(f,KC,"frameRateMultiplier"),l=ye(f,KC,"tickRate"),m=ye(f,KC,"cellResolution"),n=f.attributes["xml:space"]||"default",q=ye(f,LC,"extent");if("default"!=n&&"preserve"!=n)throw new U(2,2,2005,"Invalid xml:space value: "+n);n="default"==n;g=new MC(g,h,k,l);m=NC(m); | |
h=pe(f,"metadata")[0];h=(h?h.children:[]).filter(function(w){return"\n"!=w});k=pe(f,"style");f=pe(f,"region");l=[];for(var r=u(f),t=r.next();!t.done;t=r.next())(t=OC(t.value,k,q))&&l.push(t);if(me(e,"p").length)throw new U(2,2,2001,"<p> can only be inside <div> in TTML");q=u(me(e,"div"));for(r=q.next();!r.done;r=q.next())if(me(r.value,"span").length)throw new U(2,2,2001,"<span> can only be inside <p> in TTML");if(b=PC(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"), | |
a.push(b);return a}; | |
function PC(a,b,c,d,e,f,g,h,k,l,m,n,q){var r=l;if(ke(a)){if(!m)return null;var t={tagName:"span",children:[ne(a)],attributes:{},parent:null}}else t=a;for(var w=null,v=u(QC),z=v.next();!z.done&&!(w=RC(t,"backgroundImage",d,"#",z.value)[0]);z=v.next());v=null;z=ye(t,QC,"backgroundImage");var y=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(z&&y.test(z)){v=parseInt(z.split(":").pop(),10)-1;if(v>=q.length)return null;v=q[v]}else n&&z&&!z.startsWith("#")&&(y=new sb(n),z=new sb(z),(z=y.resolve(z).toString())&& | |
(v=z));if("p"==a.tagName||w||v)m=!0;a=m;z="default"==(t.attributes["xml:space"]||(h?"default":"preserve"));y=t.children.every(ke);h=[];if(!y)for(var A=u(t.children),E=A.next();!E.done;E=A.next())(E=PC(E.value,b,c,d,e,f,g,z,k,t,m,n,q))&&h.push(E);d=null!=l;n=ne(t);n=t.children.length&&n&&/\S/.test(n);A=t.attributes.begin||t.attributes.end||t.attributes.dur;if(!(A||n||"br"==t.tagName||0!=h.length||d&&!z))return null;q=SC(t,c);n=q.start;for(q=q.end;r&&r.tagName&&"tt"!=r.tagName;)q=TC(r,c,n,q),n=q.start, | |
q=q.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;q=null==q?Infinity:q+b.periodStart;n=Math.max(n,b.segmentStart);q=Math.min(q,b.segmentEnd);if(!A&&0<h.length)for(n=Infinity,q=0,b=u(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),q=Math.max(q,c.endTime);if("br"==t.tagName)return e=new Pe(n,q,""),e.lineBreak=!0,e;b="";y&&(b=Ic(ne(t)||""),z&&(b=b.replace(/\s+/g," ")));b=new Pe(n,q,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=RC(t,"region",f,"")[0];if(t.attributes.region&& | |
k&&k.attributes["xml:id"]){var C=k.attributes["xml:id"];b.region=g.filter(function(B){return B.id==C})[0]}g=k;l&&d&&!t.attributes.region&&!t.attributes.style&&(g=RC(l,"region",f,"")[0]);UC(b,t,g,w,v,e,a,0==h.length);return b} | |
function OC(a,b,c){var d=new Nd,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=VC.exec(c)||WC.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=XC(a,b,"extent");if(g){var h=(f=VC.exec(g))||WC.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?Od:0,d.heightUnits=f||null!=e?Od:0)}if(a=XC(a,b,"origin"))if(h=(f=VC.exec(a))||WC.exec(a),null!=h)d.viewportAnchorX=Number(h[1]), | |
d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Od,d.height=100-d.viewportAnchorY,d.heightUnits=Od):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Od:0;return d}function YC(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a} | |
function UC(a,b,c,d,e,f,g,h){g=g||h;"rtl"==ZC(b,c,f,"direction",g)&&(a.direction="rtl");h=ZC(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Se);(h=ZC(b,c,f,"textAlign",!0))?(a.positionAlign=$C[h],a.lineAlign=aD[h],a.textAlign=nf[h.toUpperCase()]):a.textAlign=Re;if(h=ZC(b,c,f,"displayAlign",!0))a.displayAlign=of[h.toUpperCase()];if(h=ZC(b,c,f,"color",g))a.color=YC(h);if(h=ZC(b,c,f,"backgroundColor", | |
g))a.backgroundColor=YC(h);if(h=ZC(b,c,f,"border",g))a.border=h;if(h=ZC(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!= | |
k}).join(",")}(h=ZC(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=kf);h=ZC(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=ZC(b,c,f,"lineHeight",g))&&h.match(bD)&&(a.lineHeight=h);(h=ZC(b,c,f,"fontSize",g))&&(h.match(bD)||h.match(cD))&&(a.fontSize=h);if(h=ZC(b,c,f,"fontStyle",g))a.fontStyle=qf[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=ne(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage= | |
e);if(d=ZC(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(bD)?a.textStrokeColor=a.color:(a.textStrokeColor=YC(d[0]),d.shift()),d[0]&&d[0].match(bD)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=ZC(b,c,f,"letterSpacing",g))&&d.match(bD)&&(a.letterSpacing=d);(d=ZC(b,c,f,"linePadding",g))&&d.match(bD)&&(a.linePadding=d);if(d=ZC(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=XC(c,f,"textDecoration"))&&dD(a,d);(d=eD(b,f,"textDecoration"))&&dD(a,d);if(d=ZC(b,c,f,"textCombine",g))a.textCombineUpright= | |
d;switch(ZC(b,c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}} | |
function dD(a,b){b=u(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(mf)||a.textDecoration.push(mf);break;case "noUnderline":a.textDecoration.includes(mf)&&Rd(a.textDecoration,mf);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Rd(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")|| | |
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Rd(a.textDecoration,"overline")}}function ZC(a,b,c,d,e){e=void 0===e?!0:e;return(a=eD(a,c,d))?a:e?XC(b,c,d):null}function XC(a,b,c){if(!a)return null;var d=ye(a,LC,c);return d?d:fD(a,b,c)}function eD(a,b,c){var d=ye(a,LC,c);return d?d:fD(a,b,c)} | |
function fD(a,b,c){a=RC(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=xe(a[e],"urn:ebu:tt:style",c);f||(f=ye(a[e],LC,c));f||(f=eD(a[e],b,c));f&&(d=f)}return d}function RC(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?xe(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=u(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=u(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f} | |
function TC(a,b,c,d){a=SC(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function SC(a,b){var c=gD(a.attributes.begin,b),d=gD(a.attributes.end,b);a=gD(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}} | |
function gD(a,b){var c=null;if(hD.test(a)){a=hD.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(iD.test(a))c=jD(iD,a);else if(kD.test(a))c=jD(kD,a);else if(lD.test(a))a=lD.exec(a),c=Number(a[1])/b.frameRate;else if(mD.test(a))a=mD.exec(a),c=Number(a[1])/b.g;else if(nD.test(a))c=jD(nD,a);else if(a)throw new U(2,2,2001,"Could not parse cue time range in TTML");return c} | |
function jD(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function NC(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Jc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",JC);JC.prototype.parseMedia=JC.prototype.parseMedia;JC.prototype.setManifestType=JC.prototype.setManifestType;JC.prototype.setSequenceMode=JC.prototype.setSequenceMode;JC.prototype.parseInit=JC.prototype.parseInit; | |
function MC(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))} | |
var VC=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,cD=/^(\d{1,4}(?:\.\d+)?|100)%$/,bD=/^(\d+px|\d+em|\d*\.?\d+c)$/,WC=/^(\d+)px (\d+)px$/,hD=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,iD=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,kD=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,lD=/^(\d*(?:\.\d*)?)f$/,mD=/^(\d*(?:\.\d*)?)t$/,nD=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),aD={left:Ve,center:"center",right:"end",start:Ve, | |
end:"end"},$C={left:"line-left",center:"center",right:"line-right"},KC=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],LC=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],QC=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Pf["application/ttml+xml"]=function(){return new JC};function oD(){this.g=new JC}oD.prototype.parseInit=function(a){var b=!1;(new zh).box("moov",Eh).box("trak",Eh).box("mdia",Eh).box("minf",Eh).box("stbl",Eh).X("stsd",Gh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new U(2,2,2007);};oD.prototype.setSequenceMode=function(){};oD.prototype.setManifestType=function(){}; | |
oD.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[],g=[];(new zh).box("moof",Eh).box("traf",Eh).X("subs",function(h){g=[];for(var k=h.reader,l=k.V(),m=0;m<l;m++){k.V();for(var n=k.Ba(),q=0;q<n;q++)1==h.version?g.push(k.V()):g.push(k.Ba()),k.$(),k.$(),k.V()}}).box("mdat",Jh(function(h){e=!0;if(g.length){for(var k=Mb(h,0,g[0]),l=[],m=g[0],n=1;n<g.length;n++){var q=Mb(h,m,g[n]);q=Kc(q);l.push("data:image/png;base64,"+q);m+=g[n]}f=f.concat(d.g.parseMedia(k,b,c,l))}else f=f.concat(d.g.parseMedia(h, | |
b,c,[]))})).parse(a,!1);if(!e)throw new U(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",oD);oD.prototype.parseMedia=oD.prototype.parseMedia;oD.prototype.setManifestType=oD.prototype.setManifestType;oD.prototype.setSequenceMode=oD.prototype.setSequenceMode;oD.prototype.parseInit=oD.prototype.parseInit;Pf['application/mp4; codecs="stpp"']=function(){return new oD};Pf['application/mp4; codecs="stpp.ttml"']=function(){return new oD};Pf['application/mp4; codecs="stpp.ttml.im1i"']=function(){return new oD}; | |
Pf['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new oD};Pf['application/mp4; codecs="stpp.ttml.im2i"']=function(){return new oD};Pf['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new oD};Pf['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new oD};Pf['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new oD};Pf['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new oD};Pf['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new oD};function pD(){this.g="UNKNOWN"}pD.prototype.parseInit=function(){};pD.prototype.setSequenceMode=function(){};pD.prototype.setManifestType=function(a){this.g=a}; | |
pD.prototype.parseMedia=function(a,b){a=Bc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new U(2,2,2E3);a=b.vttOffset;if("HLS"==this.g)if(c[0].includes("X-TIMESTAMP-MAP")){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new U(2,2,2E3);a=ae(a[1]);if(null==a)throw new U(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889, | |
d+=8589934592;a=b.periodStart+d |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment