import { Component, Context, DOMEvent, Dispose, EventsTarget, InferEventDetail, MaverickElementConstructor, MaybeStopEffect, ReadSignal, ReadSignalRecord, Scope, SetRequired, State, Store, ViewController, Writable, WriteSignal } from "./vidstack-DKjAgHWd.js"; import DASH from "dashjs"; import * as HLS from "hls.js"; import { CaptionsFileFormat, CaptionsParserFactory, VTTCue as VTTCue$1, VTTHeaderMetadata, VTTRegion } from "media-captions"; //#region types/foundation/logger/log-level.d.ts type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'debug'; //#endregion //#region types/foundation/logger/grouped-log.d.ts declare const GROUPED_LOG: unique symbol; declare class GroupedLog { readonly logger: Logger; readonly level: LogLevel; readonly title: string; readonly root?: GroupedLog | undefined; readonly parent?: GroupedLog | undefined; readonly [GROUPED_LOG] = true; readonly logs: ({ label?: string; data: any[]; } | GroupedLog)[]; constructor(logger: Logger, level: LogLevel, title: string, root?: GroupedLog | undefined, parent?: GroupedLog | undefined); log(...data: any[]): GroupedLog; labelledLog(label: string, ...data: any[]): GroupedLog; groupStart(title: string): GroupedLog; groupEnd(): GroupedLog; dispatch(): boolean; } //#endregion //#region types/foundation/logger/controller.d.ts declare class Logger { #private; error(...data: any[]): boolean; warn(...data: any[]): boolean; info(...data: any[]): boolean; debug(...data: any[]): boolean; errorGroup(title: string): GroupedLog; warnGroup(title: string): GroupedLog; infoGroup(title: string): GroupedLog; debugGroup(title: string): GroupedLog; setTarget(newTarget: EventTarget | null): void; dispatch(level: LogLevel, ...data: any[]): boolean; } //#endregion //#region types/foundation/list/symbols.d.ts declare const ADD: unique symbol, REMOVE: unique symbol, RESET: unique symbol, SELECT: unique symbol, READONLY: unique symbol, SET_READONLY: unique symbol, ON_RESET: unique symbol, ON_REMOVE: unique symbol, ON_USER_SELECT: unique symbol; /** @internal */ declare const ListSymbol: { readonly add: typeof ADD; readonly remove: typeof REMOVE; readonly reset: typeof RESET; readonly select: typeof SELECT; readonly readonly: typeof READONLY; readonly setReadonly: typeof SET_READONLY; readonly onReset: typeof ON_RESET; readonly onRemove: typeof ON_REMOVE; readonly onUserSelect: typeof ON_USER_SELECT; }; //#endregion //#region types/foundation/list/list.d.ts interface ListItem { id: string; } declare class List extends EventsTarget implements Iterable { [index: number]: Item | undefined; protected items: Item[]; /** @internal */ protected [ListSymbol.readonly]: boolean; /** @internal */ protected [ListSymbol.onReset]?(trigger?: Event): void; /** @internal */ protected [ListSymbol.onRemove]?(item: Item, trigger?: Event): void; get length(): number; get readonly(): boolean; /** * Returns the index of the first occurrence of the given item, or -1 if it is not present. */ indexOf(item: Item): number; /** * Returns an item matching the given `id`, or `null` if not present. */ getById(id: string): Item | null; /** * Transform list to an array. */ toArray(): Item[]; [Symbol.iterator](): ArrayIterator; /** @internal */ [ListSymbol.add](item: Item, trigger?: Event): void; /** @internal */ [ListSymbol.remove](item: Item, trigger?: Event): void; /** @internal */ [ListSymbol.reset](trigger?: Event): void; /** @internal */ [ListSymbol.setReadonly](readonly: boolean, trigger?: Event): void; } interface ListEvents { add: ListAddEvent; remove: ListRemoveEvent; 'readonly-change': ListReadonlyChangeEvent; } /** * Fired when an item has been added to the list. * * @detail item */ interface ListAddEvent extends DOMEvent {} /** * Fired when an item has been removed from the list. * * @detail item */ interface ListRemoveEvent extends DOMEvent {} /** * Fired when the readonly state of the list has changed. * * @detail isReadonly */ interface ListReadonlyChangeEvent extends DOMEvent {} //#endregion //#region types/foundation/fullscreen/events.d.ts interface FullscreenEvents { 'fullscreen-change': FullscreenChangeEvent; 'fullscreen-error': FullscreenErrorEvent; } /** * Fired when an element enters/exits fullscreen. The event detail is a `boolean` indicating * if fullscreen was entered (`true`) or exited (`false`). * * @bubbles * @composed * @detail isFullscreen */ interface FullscreenChangeEvent extends DOMEvent {} /** * Fired when an error occurs either entering or exiting fullscreen. This will generally occur * if the user has not interacted with the page yet. * * @bubbles * @composed * @detail error */ interface FullscreenErrorEvent extends DOMEvent {} //#endregion //#region types/foundation/fullscreen/controller.d.ts declare class FullscreenController extends ViewController<{}, {}, FullscreenEvents> implements FullscreenAdapter { #private; get active(): boolean; get supported(): boolean; protected onConnect(): void; enter(): Promise; exit(): Promise; } declare function canFullscreen(): boolean; interface FullscreenAdapter { /** * Whether the host element is in fullscreen mode. */ readonly active: boolean; /** * Whether the native browser fullscreen API is available, or the current provider can * toggle fullscreen mode. This does not mean that the operation is guaranteed to be successful, * only that it can be attempted. * * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API} */ readonly supported: boolean; /** * Request to display the current host element in fullscreen. * * @throws Error - if fullscreen API is not available. * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullscreen} */ enter(): Promise; /** * Attempt to exit fullscreen on the current host element. * * @throws Error - if fullscreen API is not available. * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Document/exitFullscreen} */ exit(): Promise; } //#endregion //#region types/foundation/logger/events.d.ts declare global { interface HTMLElementEventMap extends LoggerEvents {} } interface LoggerEvents { 'vds-log': LogEvent; } interface LogEventDetail { /** * The log level. */ level: LogLevel; /** * Data to be logged. */ data?: any[]; } /** * @bubbles * @composed * @detail log */ interface LogEvent extends DOMEvent {} //#endregion //#region types/foundation/orientation/types.d.ts type ScreenOrientationType = /** * Landscape-primary is an orientation where the screen width is greater than the screen height. * If the device's natural orientation is landscape, then it is in landscape-primary when held * in that position. If the device's natural orientation is portrait, the user agent sets * landscape-primary from the two options as shown in the screen orientation values table. */ 'landscape-primary' /** * Landscape-secondary is an orientation where the screen width is greater than the screen * height. If the device's natural orientation is landscape, it is in landscape-secondary when * rotated 180º from its natural orientation. If the device's natural orientation is portrait, * the user agent sets landscape-secondary from the two options as shown in the screen * orientation values table. */ | 'landscape-secondary' /** * Portrait-primary is an orientation where the screen width is less than or equal to the screen * height. If the device's natural orientation is portrait, then it is in portrait-primary when * held in that position. If the device's natural orientation is landscape, the user agent sets * portrait-primary from the two options as shown in the screen orientation values table. */ | 'portrait-primary' /** * Portrait-secondary is an orientation where the screen width is less than or equal to the * screen height. If the device's natural orientation is portrait, then it is in * portrait-secondary when rotated 180º from its natural position. If the device's natural * orientation is landscape, the user agent sets portrait-secondary from the two options as * shown in the screen orientation values table. */ | 'portrait-secondary'; type ScreenOrientationLockType = /** * Any is an orientation that means the screen can be locked to any one of portrait-primary, * portrait-secondary, landscape-primary and landscape-secondary. */ 'any' /** * Landscape is an orientation where the screen width is greater than the screen height and * depending on platform convention locking the screen to landscape can represent * landscape-primary, landscape-secondary or both. */ | 'landscape' /** * Landscape-primary is an orientation where the screen width is greater than the screen height. * If the device's natural orientation is landscape, then it is in landscape-primary when held * in that position. If the device's natural orientation is portrait, the user agent sets * landscape-primary from the two options as shown in the screen orientation values table. */ | 'landscape-primary' /** * Landscape-secondary is an orientation where the screen width is greater than the screen * height. If the device's natural orientation is landscape, it is in landscape-secondary when * rotated 180º from its natural orientation. If the device's natural orientation is portrait, * the user agent sets landscape-secondary from the two options as shown in the screen * orientation values table. */ | 'landscape-secondary' /** * Natural is an orientation that refers to either portrait-primary or landscape-primary * depending on the device's usual orientation. This orientation is usually provided by the * underlying operating system. */ | 'natural' /** * Portrait is an orientation where the screen width is less than or equal to the screen height * and depending on platform convention locking the screen to portrait can represent * portrait-primary, portrait-secondary or both. */ | 'portrait' /** * Portrait-primary is an orientation where the screen width is less than or equal to the screen * height. If the device's natural orientation is portrait, then it is in portrait-primary when * held in that position. If the device's natural orientation is landscape, the user agent sets * portrait-primary from the two options as shown in the screen orientation values table. */ | 'portrait-primary' /** * Portrait-secondary is an orientation where the screen width is less than or equal to the * screen height. If the device's natural orientation is portrait, then it is in * portrait-secondary when rotated 180º from its natural position. If the device's natural * orientation is landscape, the user agent sets portrait-secondary from the two options as * shown in the screen orientation values table. */ | 'portrait-secondary'; //#endregion //#region types/foundation/orientation/events.d.ts interface ScreenOrientationEvents { 'orientation-change': ScreenOrientationChangeEvent; } interface ScreenOrientationChangeEventDetail { orientation: ScreenOrientationType; lock?: ScreenOrientationLockType; } /** * Fired when the current screen orientation changes. * * @detail orientation */ interface ScreenOrientationChangeEvent extends DOMEvent {} //#endregion //#region types/foundation/orientation/controller.d.ts declare class ScreenOrientationController extends ViewController<{}, {}, ScreenOrientationEvents> { #private; /** * The current screen orientation type. * * @signal * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation} * @see https://w3c.github.io/screen-orientation/#screen-orientation-types-and-locks */ get type(): ScreenOrientationType | undefined; /** * Whether the screen orientation is currently locked. * * @signal * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation} * @see https://w3c.github.io/screen-orientation/#screen-orientation-types-and-locks */ get locked(): boolean; /** * Whether the viewport is in a portrait orientation. * * @signal */ get portrait(): boolean; /** * Whether the viewport is in a landscape orientation. * * @signal */ get landscape(): boolean; /** * Whether the native Screen Orientation API is available. */ static readonly supported: boolean; /** * Whether the native Screen Orientation API is available. */ get supported(): boolean; protected onConnect(): void; /** * Locks the orientation of the screen to the desired orientation type using the * Screen Orientation API. * * @param lockType - The screen lock orientation type. * @throws Error - If screen orientation API is unavailable. * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation} * @see {@link https://w3c.github.io/screen-orientation} */ lock(lockType: ScreenOrientationLockType): Promise; /** * Unlocks the orientation of the screen to it's default state using the Screen Orientation * API. This method will throw an error if the API is unavailable. * * @throws Error - If screen orientation API is unavailable. * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation} * @see {@link https://w3c.github.io/screen-orientation} */ unlock(): Promise; } //#endregion //#region types/core/api/media-request-events.d.ts interface MediaRequestEvents { 'media-airplay-request': MediaAirPlayRequestEvent; 'media-audio-track-change-request': MediaAudioTrackChangeRequestEvent; 'media-clip-start-change-request': MediaClipStartChangeRequestEvent; 'media-clip-end-change-request': MediaClipEndChangeRequestEvent; 'media-duration-change-request': MediaDurationChangeRequestEvent; 'media-enter-fullscreen-request': MediaEnterFullscreenRequestEvent; 'media-exit-fullscreen-request': MediaExitFullscreenRequestEvent; 'media-enter-pip-request': MediaEnterPIPRequestEvent; 'media-exit-pip-request': MediaExitPIPRequestEvent; 'media-google-cast-request': MediaGoogleCastRequestEvent; 'media-live-edge-request': MediaLiveEdgeRequestEvent; 'media-loop-request': MediaLoopRequestEvent; 'media-user-loop-change-request': MediaUserLoopChangeRequestEvent; 'media-orientation-lock-request': MediaOrientationLockRequestEvent; 'media-orientation-unlock-request': MediaOrientationUnlockRequestEvent; 'media-mute-request': MediaMuteRequestEvent; 'media-pause-request': MediaPauseRequestEvent; 'media-pause-controls-request': MediaPauseControlsRequestEvent; 'media-play-request': MediaPlayRequestEvent; 'media-quality-change-request': MediaQualityChangeRequestEvent; 'media-rate-change-request': MediaRateChangeRequestEvent; 'media-audio-gain-change-request': MediaAudioGainChangeRequestEvent; 'media-resume-controls-request': MediaResumeControlsRequestEvent; 'media-seek-request': MediaSeekRequestEvent; 'media-seeking-request': MediaSeekingRequestEvent; 'media-start-loading': MediaStartLoadingRequestEvent; 'media-poster-start-loading': MediaPosterStartLoadingRequestEvent; 'media-text-track-change-request': MediaTextTrackChangeRequestEvent; 'media-unmute-request': MediaUnmuteRequestEvent; 'media-volume-change-request': MediaVolumeChangeRequestEvent; } /** * Fired when requesting the AirPlay picker to open. * * @bubbles * @composed */ interface MediaAirPlayRequestEvent extends DOMEvent {} /** * Fired when requesting the media poster to begin loading. This will only take effect if the * `posterLoad` strategy on the player is set to `custom`. * * @bubbles * @composed */ interface MediaPosterStartLoadingRequestEvent extends DOMEvent {} /** * Fired when requesting to change the `mode` on a text track at the given index in the * `TextTrackList` on the player. * * @bubbles * @composed */ interface MediaTextTrackChangeRequestEvent extends DOMEvent<{ index: number; mode: TextTrackMode; }> {} /** * Fired when requesting the media to be muted. * * @bubbles * @composed */ interface MediaMuteRequestEvent extends DOMEvent {} /** * Fired when requesting the media to be unmuted. * * @bubbles * @composed */ interface MediaUnmuteRequestEvent extends DOMEvent {} /** * Whether to request fullscreen on the media (i.e., ``). The `prefer-media` option * will first see if the native fullscreen API is available, if not it'll try the media provider. */ type MediaFullscreenRequestTarget = 'prefer-media' | 'media' | 'provider'; /** * Fired when requesting to change the current audio track to the given index in the * `AudioTrackList` on the player. * * @bubbles * @composed */ interface MediaAudioTrackChangeRequestEvent extends DOMEvent {} /** * Fired when requesting to change the clip start time. The event `detail` specifies the new start * time in seconds. * * @bubbles * @composed */ interface MediaClipStartChangeRequestEvent extends DOMEvent {} /** * Fired when requesting to change the clip end time. The event `detail` specifies the new end * time in seconds. * * @bubbles * @composed */ interface MediaClipEndChangeRequestEvent extends DOMEvent {} /** * Fired when requesting to change the length of the media. The event `detail` specifies the * new length in seconds. * * @bubbles * @composed */ interface MediaDurationChangeRequestEvent extends DOMEvent {} /** * Fired when requesting media to enter fullscreen. The event `detail` can specify the * fullscreen target, which can be the media or provider (defaults to `prefer-media`). * * @bubbles * @composed */ interface MediaEnterFullscreenRequestEvent extends DOMEvent {} /** * Fired when requesting media to exit fullscreen. The event `detail` can specify the fullscreen * target, which can be the media or provider (defaults to `prefer-media`). * * @bubbles * @composed */ interface MediaExitFullscreenRequestEvent extends DOMEvent {} /** * Fired when requesting media to enter picture-in-picture mode. * * @bubbles * @composed */ interface MediaEnterPIPRequestEvent extends DOMEvent {} /** * Fired when requesting media to exit picture-in-picture mode. * * @bubbles * @composed */ interface MediaExitPIPRequestEvent extends DOMEvent {} /** * Fired when requesting Google Cast. * * @bubbles * @composed */ interface MediaGoogleCastRequestEvent extends DOMEvent {} /** * Fired when requesting media to seek to the live edge (i.e., set the current time to the current * live time). */ interface MediaLiveEdgeRequestEvent extends DOMEvent {} /** * Fired when requesting media playback to begin/resume. * * @bubbles * @composed */ interface MediaPlayRequestEvent extends DOMEvent {} /** * Fired when requesting to change the current video quality to the given index in the * `VideoQualityList` on the player. * * @bubbles * @composed * @detail qualityIndex */ interface MediaQualityChangeRequestEvent extends DOMEvent {} /** * Fired when requesting to change the current playback rate. * * @bubbles * @composed * @detail rate */ interface MediaRateChangeRequestEvent extends DOMEvent {} /** * Fired when requesting to change the current audio gain. * * @bubbles * @composed * @detail gain */ interface MediaAudioGainChangeRequestEvent extends DOMEvent {} /** * Fired when requesting media playback to temporarily stop. * * @bubbles * @composed */ interface MediaPauseRequestEvent extends DOMEvent {} /** * Fired when requesting a time change. In other words, moving the play head to a new position. * * @bubbles * @composed * @detail seekTo */ interface MediaSeekRequestEvent extends DOMEvent {} /** * Fired when seeking/scrubbing to a new playback position. * * @bubbles * @composed * @detail time */ interface MediaSeekingRequestEvent extends DOMEvent {} /** * Fired when requesting media to begin loading. This will only take effect if the `load` * strategy on the player is set to `custom`. * * @bubbles * @composed */ interface MediaStartLoadingRequestEvent extends DOMEvent {} /** * Fired when requesting the media volume to be set to a new level. * * @bubbles * @composed * @detail volume */ interface MediaVolumeChangeRequestEvent extends DOMEvent {} /** * Fired when controls visibility tracking may resume. This is typically called after requesting * tracking to pause via `media-pause-controls-request`. * * @bubbles * @composed */ interface MediaResumeControlsRequestEvent extends DOMEvent {} /** * Fired when controls visibility tracking should pause. This is typically used when a control * is being actively interacted with, and we don't want the controls to be hidden before * the interaction is complete (eg: scrubbing, or settings is open). * * @bubbles * @composed */ interface MediaPauseControlsRequestEvent extends DOMEvent {} /** * Fired when requesting the poster _should_ be rendered by the media provider. This should be * fired if a custom poster is _not_ being used. * * @bubbles * @composed */ interface MediaShowPosterRequestEvent extends DOMEvent {} /** * Fired when requesting the poster should _not_ be rendered by the media provider. This * should be fired if a custom poster element is being used (e.g., `media-poster`). * * @bubbles * @composed */ interface MediaHidePosterRequestEvent extends DOMEvent {} /** * Internal event that is fired by a media provider when requesting media playback to restart after * reaching the end. This event also helps notify the player that media will be looping. * * @internal * @bubbles * @composed */ interface MediaLoopRequestEvent extends DOMEvent {} /** * Fired when the user loop preference changes. * * @bubbles * @composed */ interface MediaUserLoopChangeRequestEvent extends DOMEvent {} /** * Fired when requesting the screen orientation to be locked to a certain type. * * @bubbles * @composed */ interface MediaOrientationLockRequestEvent extends DOMEvent {} /** * Fired when requesting the screen orientation to be unlocked. * * @bubbles * @composed */ interface MediaOrientationUnlockRequestEvent extends DOMEvent {} //#endregion //#region types/providers/dash/events.d.ts interface DASHProviderEvents { 'dash-lib-load-start': DASHLibLoadStartEvent; 'dash-lib-loaded': DASHLibLoadedEvent; 'dash-lib-load-error': DASHLibLoadErrorEvent; 'dash-instance': DASHInstanceEvent; 'dash-unsupported': DASHUnsupportedEvent; 'dash-ast-in-future': DASHAstInFutureEvent; 'dash-base-urls-updated': DASHBaseUrlsUpdatedEvent; 'dash-buffer-empty': DASHBufferStalledEvent; 'dash-buffer-loaded': DASHBufferLoadedEvent; 'dash-buffer-level-state-changed': DASHBufferStateChangedEvent; 'dash-buffer-level-updated': DASHBufferLevelUpdatedEvent; 'dash-dvb-font-download-added': DASHDvbFontDownloadAddedEvent; 'dash-dvb-font-download-complete': DASHDvbFontDownloadCompleteEvent; 'dash-dvb-font-download-failed': DASHDvbFontDownloadFailedEvent; 'dash-dynamic-to-static': DASHDynamicToStaticEvent; 'dash-error': DASHErrorEvent; 'dash-fragment-loading-completed': DASHFragmentLoadingCompletedEvent; 'dash-fragment-loading-progress': DASHFragmentLoadingProgressEvent; 'dash-fragment-loading-started': DASHFragmentLoadingStartedEvent; 'dash-fragment-loading-abandoned': DASHFragmentLoadingAbandonedEvent; 'dash-log': DASHLogEvent; 'dash-manifest-loading-started': DASHManifestLoadingStartedEvent; 'dash-manifest-loading-finished': DASHManifestLoadingFinishedEvent; 'dash-manifest-loaded': DASHManifestLoadedEvent; 'dash-metrics-changed': DASHMetricsChangedEvent; 'dash-metric-changed': DASHMetricChangedEvent; 'dash-metric-added': DASHMetricAddedEvent; 'dash-metric-updated': DASHMetricUpdatedEvent; 'dash-period-switch-started': DASHPeriodSwitchStartedEvent; 'dash-period-switch-completed': DASHPeriodSwitchCompletedEvent; 'dash-quality-change-requested': DASHQualityChangeRequestedEvent; 'dash-quality-change-rendered': DASHQualityChangeRenderedEvent; 'dash-track-change-rendered': DASHTrackChangeRenderedEvent; 'dash-stream-initializing': DASHStreamInitializingEvent; 'dash-stream-updated': DASHStreamUpdatedEvent; 'dash-stream-activated': DASHStreamActivatedEvent; 'dash-stream-deactivated': DASHStreamDeactivatedEvent; 'dash-stream-initialized': DASHStreamInitializedEvent; 'dash-stream-teardown-complete': DASHStreamTeardownCompleteEvent; 'dash-text-tracks-added': DASHAllTextTracksAddedEvent; 'dash-text-track-added': DASHTextTrackAddedEvent; 'dash-cue-enter': DASHCueEnterEvent; 'dash-cue-exit': DASHCueExitEvent; 'dash-throughput-measurement-stored': DASHThroughputMeasurementStoredEvent; 'dash-ttml-parsed': DASHTtmlParsedEvent; 'dash-ttml-to-parse': DASHTtmlToParseEvent; 'dash-caption-rendered': DASHCaptionRenderedEvent; 'dash-caption-container-resize': DASHCaptionContainerResizeEvent; 'dash-can-play': DASHCanPlayEvent; 'dash-can-play-through': DASHCanPlayThroughEvent; 'dash-playback-ended': DASHPlaybackEndedEvent; 'dash-playback-error': DASHPlaybackErrorEvent; 'dash-playback-not-allowed': DASHPlaybackNotAllowedEvent; 'dash-playback-metadata-loaded': DASHPlaybackMetaDataLoadedEvent; 'dash-playback-loaded-data': DASHPlaybackLoadedDataEvent; 'dash-playback-paused': DASHPlaybackPausedEvent; 'dash-playback-playing': DASHPlaybackPlayingEvent; 'dash-playback-progress': DASHPlaybackProgressEvent; 'dash-playback-rate-changed': DASHPlaybackRateChangedEvent; 'dash-playback-seeked': DASHPlaybackSeekedEvent; 'dash-playback-seeking': DASHPlaybackSeekingEvent; 'dash-playback-stalled': DASHPlaybackStalledEvent; 'dash-playback-started': DASHPlaybackStartedEvent; 'dash-playback-time-updated': DASHPlaybackTimeUpdatedEvent; 'dash-playback-volume-changed': DASHPlaybackVolumeChangedEvent; 'dash-playback-waiting': DASHPlaybackWaitingEvent; 'dash-manifest-validity-changed': DASHManifestValidityChangedEvent; 'dash-event-mode-on-start': DASHEventModeOnStartEvent; 'dash-event-mode-on-receive': DASHEventModeOnReceiveEvent; 'dash-conformance-violation': DASHConformanceViolationEvent; 'dash-representation-switch': DASHRepresentationSwitchEvent; 'dash-adaptation-set-removed-no-capabilities': DASHAdaptationSetRemovedNoCapabilitiesEvent; 'dash-content-steering-request-completed': DASHContentSteeringRequestCompletedEvent; 'dash-inband-prft': DASHInbandPrftEvent; 'dash-managed-media-source-start-streaming': DASHManagedMediaSourceStartStreamingEvent; 'dash-managed-media-source-end-streaming': DASHManagedMediaSourceEndStreamingEvent; } interface DASHMediaEvent extends DOMEvent { target: MediaPlayer; } /** * Fired when the browser begins downloading the `dash.js` library. */ interface DASHLibLoadStartEvent extends DASHMediaEvent {} /** * Fired when the `dash.js` library has been loaded. * * @detail constructor */ interface DASHLibLoadedEvent extends DASHMediaEvent {} /** * Fired when the `dash.js` library fails during the download process. * * @detail error */ interface DASHLibLoadErrorEvent extends DASHMediaEvent {} /** * Fired when the `dash.js` instance is built. This will not fire if the browser does not * support `DASH.js`. * * @detail instance */ interface DASHInstanceEvent extends DASHMediaEvent {} /** * Fired when the browser doesn't support DASH natively, _and_ `dash.js` doesn't support * this environment either, most likely due to missing Media Extensions or video codecs. */ interface DASHUnsupportedEvent extends DASHMediaEvent {} /** * Triggered when playback will not start yet as the MPD's `availabilityStartTime` is in the future. * Check delay property in payload to determine time before playback will start. * * @detail data */ interface DASHAstInFutureEvent extends DASHMediaEvent {} /** * Triggered when the `BaseURL` have been updated. */ interface DASHBaseUrlsUpdatedEvent extends DASHMediaEvent {} /** * Triggered when the video element's buffer state changes to `stalled`. Check `mediaType` in * payload to determine type (Video, Audio, FragmentedText). */ interface DASHBufferStalledEvent extends DASHMediaEvent {} /** * Triggered when the video element's buffer state changes to `loaded`. Check `mediaType` in payload * to determine type (Video, Audio, FragmentedText). * * @detail data */ interface DASHBufferLoadedEvent extends DASHMediaEvent {} /** * Triggered when the video element's buffer state changes, either stalled or loaded. Check * payload for state. * * @detail data */ interface DASHBufferStateChangedEvent extends DASHMediaEvent {} /** * Triggered when the buffer level of a media type has been updated. */ interface DASHBufferLevelUpdatedEvent extends DASHMediaEvent {} /** * Triggered when a font signalled by a DVB Font Download has been added to the document `ntFaceSet` * interface. * * @detail data */ interface DASHDvbFontDownloadAddedEvent extends DASHMediaEvent {} /** * Triggered when a font signalled by a DVB Font Download has successfully downloaded and the * `ntFace` can be used. * * @detail data */ interface DASHDvbFontDownloadCompleteEvent extends DASHMediaEvent {} /** * Triggered when a font signalled by a DVB Font Download could not be successfully downloaded, so * the `FontFace` will not be used. * * @detail data */ interface DASHDvbFontDownloadFailedEvent extends DASHMediaEvent {} /** * Triggered when a dynamic stream changed to static (transition phase between Live and -Demand). * * @detail data */ interface DASHDynamicToStaticEvent extends DASHMediaEvent {} /** * Triggered when there is an error from the element or MSE source buffer. * * @detail error */ interface DASHErrorEvent extends DASHMediaEvent {} /** * Triggered when a fragment download has completed. * * @detail data */ interface DASHFragmentLoadingCompletedEvent extends DASHMediaEvent {} /** * Triggered when a partial fragment download has completed. */ interface DASHFragmentLoadingProgressEvent extends DASHMediaEvent {} /** * Triggered when a fragment download has started. */ interface DASHFragmentLoadingStartedEvent extends DASHMediaEvent {} /** * Triggered when a fragment download is abandoned due to detection of slow download base on e * ABR abandon rule. * * @detail data */ interface DASHFragmentLoadingAbandonedEvent extends DASHMediaEvent {} /** * Triggered when Debug logger methods are called. * * @detail data */ interface DASHLogEvent extends DASHMediaEvent {} /** * Triggered when the manifest load has started. */ interface DASHManifestLoadingStartedEvent extends DASHMediaEvent {} /** * Triggered when the manifest loading is finished, providing the request object information. */ interface DASHManifestLoadingFinishedEvent extends DASHMediaEvent {} /** * Triggered when the manifest load is complete, providing the payload. * * @detail data */ interface DASHManifestLoadedEvent extends DASHMediaEvent {} /** * Triggered anytime there is a change to the overall metrics. */ interface DASHMetricsChangedEvent extends DASHMediaEvent {} /** * Triggered when an individual metric is added, updated or cleared. * * @detail data */ interface DASHMetricChangedEvent extends DASHMediaEvent {} /** * Triggered every time a new metric is added. * * @detail data */ interface DASHMetricAddedEvent extends DASHMediaEvent {} /** * Triggered every time a metric is updated. * * @detail data */ interface DASHMetricUpdatedEvent extends DASHMediaEvent {} /** * Triggered when a new stream (period) starts. * * @detail data */ interface DASHPeriodSwitchStartedEvent extends DASHMediaEvent {} /** * Triggered at the stream end of a period. * * @detail data */ interface DASHPeriodSwitchCompletedEvent extends DASHMediaEvent {} /** * Triggered when an ABR up /down switch is initiated; either by user in manual mode or auto de via * ABR rules. * * @detail data */ interface DASHQualityChangeRequestedEvent extends DASHMediaEvent {} /** * Triggered when the new ABR quality is being rendered on-screen. * * @detail data */ interface DASHQualityChangeRenderedEvent extends DASHMediaEvent {} /** * Triggered when the new track is being rendered. * * @detail data */ interface DASHTrackChangeRenderedEvent extends DASHMediaEvent {} /** * Triggered when a stream (period) is being loaded. */ interface DASHStreamInitializingEvent extends DASHMediaEvent {} /** * Triggered when a stream (period) is loaded. */ interface DASHStreamUpdatedEvent extends DASHMediaEvent {} /** * Triggered when a stream (period) is activated. */ interface DASHStreamActivatedEvent extends DASHMediaEvent {} /** * Triggered when a stream (period) is deactivated */ interface DASHStreamDeactivatedEvent extends DASHMediaEvent {} /** * Triggered when a stream (period) is activated. * * @detail data */ interface DASHStreamInitializedEvent extends DASHMediaEvent {} /** * Triggered when the player has been reset. */ interface DASHStreamTeardownCompleteEvent extends DASHMediaEvent {} /** * Triggered once all text tracks detected in the MPD are added to the video element. * * @detail data */ interface DASHAllTextTracksAddedEvent extends DASHMediaEvent {} /** * Triggered when a text track is added to the video element's `TextTrackList`. * * @detail data */ interface DASHTextTrackAddedEvent extends DASHMediaEvent {} /** * Triggered when a text track should be shown. * * @detail data */ interface DASHCueEnterEvent extends DASHMediaEvent {} /** * Triggered when a text track should be hidden. * * @detail data */ interface DASHCueExitEvent extends DASHMediaEvent {} /** * Triggered when a throughput measurement based on the last segment request has been stored. * * @detail data */ interface DASHThroughputMeasurementStoredEvent extends DASHMediaEvent {} /** * Triggered when a `ttml` chunk is parsed. * * @detail data */ interface DASHTtmlParsedEvent extends DASHMediaEvent {} /** * Triggered when a `ttml` chunk has to be parsed. * * @detail data */ interface DASHTtmlToParseEvent extends DASHMediaEvent {} /** * Triggered when a caption is rendered. * * @detail data */ interface DASHCaptionRenderedEvent extends DASHMediaEvent {} /** * Triggered when the caption container is resized. * * @detail data */ interface DASHCaptionContainerResizeEvent extends DASHMediaEvent {} /** * Sent when enough data is available that the media can be played, at least for a couple of * frames. This corresponds to the `HAVE_ENOUGH_DATA` `readyState`. */ interface DASHCanPlayEvent extends DASHMediaEvent {} /** * This corresponds to the `CAN_PLAY_THROUGH` `readyState`. */ interface DASHCanPlayThroughEvent extends DASHMediaEvent {} /** * Sent when playback completes. */ interface DASHPlaybackEndedEvent extends DASHMediaEvent {} /** * Sent when an error occurs. The element's error attribute contains more information. * * @detail data */ interface DASHPlaybackErrorEvent extends DASHMediaEvent {} /** * Sent when playback is not allowed (for example if user gesture is needed). */ interface DASHPlaybackNotAllowedEvent extends DASHMediaEvent {} /** * The media's metadata has finished loading; all attributes now contain as much useful * information as they're going to. */ interface DASHPlaybackMetaDataLoadedEvent extends DASHMediaEvent {} /** * The event is fired when the frame at the current playback position of the media has finished * loading; often the first frame. */ interface DASHPlaybackLoadedDataEvent extends DASHMediaEvent {} /** * Sent when playback is paused. * * @detail data */ interface DASHPlaybackPausedEvent extends DASHMediaEvent {} /** * Sent when the media begins to play (either for the first time, after having been paused, * or after ending and then restarting). * * @detail data */ interface DASHPlaybackPlayingEvent extends DASHMediaEvent {} /** * Sent periodically to inform interested parties of progress downloading the media. Information * about the current amount of the media that has been downloaded is available in the media * element's buffered attribute. */ interface DASHPlaybackProgressEvent extends DASHMediaEvent {} /** * Sent when the playback speed changes. * * @detail data */ interface DASHPlaybackRateChangedEvent extends DASHMediaEvent {} /** * Sent when a seek operation completes. */ interface DASHPlaybackSeekedEvent extends DASHMediaEvent {} /** * Sent when a seek operation begins. * * @detail data */ interface DASHPlaybackSeekingEvent extends DASHMediaEvent {} /** * Sent when the video element reports stalled. */ interface DASHPlaybackStalledEvent extends DASHMediaEvent {} /** * Sent when playback of the media starts after having been paused; that is, when playback is * resumed after a prior pause event. * * @detail data */ interface DASHPlaybackStartedEvent extends DASHMediaEvent {} /** * The time indicated by the element's currentTime attribute has changed. * * @detail data */ interface DASHPlaybackTimeUpdatedEvent extends DASHMediaEvent {} /** * Sent when the video element reports that the volume has changed. */ interface DASHPlaybackVolumeChangedEvent extends DASHMediaEvent {} /** * Sent when the media playback has stopped because of a temporary lack of data. * * @detail data */ interface DASHPlaybackWaitingEvent extends DASHMediaEvent {} /** * Manifest validity changed - As a result of an MPD validity expiration event. */ interface DASHManifestValidityChangedEvent extends DASHMediaEvent {} /** * Dash events are triggered at their respective start points on the timeline. */ interface DASHEventModeOnStartEvent extends DASHMediaEvent {} /** * Dash events are triggered as soon as they were parsed. */ interface DASHEventModeOnReceiveEvent extends DASHMediaEvent {} /** * Event that is dispatched whenever the player encounters a potential conformance validation at * might lead to unexpected/not optimal behavior. */ interface DASHConformanceViolationEvent extends DASHMediaEvent {} /** * Event that is dispatched whenever the player switches to a different representation. */ interface DASHRepresentationSwitchEvent extends DASHMediaEvent {} /** * Event that is dispatched whenever an adaptation set is removed due to all representations to * being supported. * * @detail data */ interface DASHAdaptationSetRemovedNoCapabilitiesEvent extends DASHMediaEvent {} /** * Triggered when a content steering request has completed. */ interface DASHContentSteeringRequestCompletedEvent extends DASHMediaEvent {} /** * Triggered when an inband prft (ProducerReferenceTime) boxes has been received. * * @detail data */ interface DASHInbandPrftEvent extends DASHMediaEvent {} /** * The streaming attribute of the Managed Media Source is `true`. */ interface DASHManagedMediaSourceStartStreamingEvent extends DASHMediaEvent {} /** * The streaming attribute of the Managed Media Source is `false`. */ interface DASHManagedMediaSourceEndStreamingEvent extends DASHMediaEvent {} //#endregion //#region types/providers/google-cast/events.d.ts interface GoogleCastEvents { 'google-cast-load-start': GoogleCastLoadStartEvent; 'google-cast-loaded': GoogleCastLoadedEvent; 'google-cast-prompt-open': GoogleCastPromptEvent; 'google-cast-prompt-close': GoogleCastPromptEvent; 'google-cast-prompt-error': GoogleCastPromptErrorEvent; } interface GoogleCastEvent extends DOMEvent { target: MediaPlayer; } /** * Fired when the Google Cast framework starts loading. */ interface GoogleCastLoadStartEvent extends GoogleCastEvent {} /** * Fired when the Google Cast framework has loaded. */ interface GoogleCastLoadedEvent extends GoogleCastEvent {} /** * Fired when the Google Cast prompt is opened/closed. */ interface GoogleCastPromptEvent extends GoogleCastEvent {} interface GoogleCastPromptError extends Error { code: GoogleCastPromptErrorCode; } type GoogleCastPromptErrorCode = 'CAST_NOT_AVAILABLE' | 'CANCEL' | 'TIMEOUT' | 'API_NOT_INITIALIZED' | 'INVALID_PARAMETER' | 'EXTENSION_NOT_COMPATIBLE' | 'EXTENSION_MISSING' | 'RECEIVER_UNAVAILABLE' | 'SESSION_ERROR' | 'CHANNEL_ERROR' | 'NO_DEVICES_AVAILABLE' | 'LOAD_MEDIA_FAILED'; /** * Fired when requesting Google Cast has failed. */ interface GoogleCastPromptErrorEvent extends GoogleCastEvent {} //#endregion //#region types/providers/hls/events.d.ts interface HLSProviderEvents { 'hls-lib-load-start': HLSLibLoadStartEvent; 'hls-lib-loaded': HLSLibLoadedEvent; 'hls-lib-load-error': HLSLibLoadErrorEvent; 'hls-instance': HLSInstanceEvent; 'hls-unsupported': HLSUnsupportedEvent; 'hls-media-attaching': HLSMediaAttachingEvent; 'hls-media-attached': HLSMediaAttachedEvent; 'hls-media-detaching': HLSMediaDetachingEvent; 'hls-media-detached': HLSMediaDetachedEvent; 'hls-buffer-reset': HLSBufferResetEvent; 'hls-buffer-codecs': HLSBufferCodecsEvent; 'hls-buffer-created': HLSBufferCreatedEvent; 'hls-buffer-appending': HLSBufferAppendingEvent; 'hls-buffer-appended': HLSBufferAppendedEvent; 'hls-buffer-eos': HLSBufferEosEvent; 'hls-buffer-flushing': HLSBufferFlushingEvent; 'hls-buffer-flushed': HLSBufferFlushedEvent; 'hls-manifest-loading': HLSManifestLoadingEvent; 'hls-manifest-loaded': HLSManifestLoadedEvent; 'hls-manifest-parsed': HLSManifestParsedEvent; 'hls-level-switching': HLSLevelSwitchingEvent; 'hls-level-switched': HLSLevelSwitchedEvent; 'hls-level-loading': HLSLevelLoadingEvent; 'hls-level-loaded': HLSLevelLoadedEvent; 'hls-level-updated': HLSLevelUpdatedEvent; 'hls-level-pts-updated': HLSLevelPtsUpdatedEvent; 'hls-levels-updated': HLSLevelsUpdatedEvent; 'hls-audio-tracks-updated': HLSAudioTracksUpdatedEvent; 'hls-audio-track-switching': HLSAudioTrackSwitchingEvent; 'hls-audio-track-switched': HLSAudioTrackSwitchedEvent; 'hls-audio-track-loading': HLSAudioTrackLoadingEvent; 'hls-audio-track-loaded': HLSAudioTrackLoadedEvent; 'hls-subtitle-tracks-updated': HLSSubtitleTracksUpdatedEvent; 'hls-subtitle-tracks-cleared': HLSSubtitleTracksClearedEvent; 'hls-subtitle-track-switch': HLSSubtitleTrackSwitchEvent; 'hls-subtitle-track-loading': HLSSubtitleTrackLoadingEvent; 'hls-subtitle-track-loaded': HLSSubtitleTrackLoadedEvent; 'hls-subtitle-frag-processed': HLSSubtitleFragProcessedEvent; 'hls-cues-parsed': HLSCuesParsedEvent; 'hls-non-native-text-tracks-found': HLSNonNativeTextTracksFoundEvent; 'hls-init-pts-found': HLSInitPtsFoundEvent; 'hls-frag-loading': HLSFragLoadingEvent; 'hls-frag-load-emergency-aborted': HLSFragLoadEmergencyAbortedEvent; 'hls-frag-loaded': HLSFragLoadedEvent; 'hls-frag-decrypted': HLSFragDecryptedEvent; 'hls-frag-parsing-init-segment': HLSFragParsingInitSegmentEvent; 'hls-frag-parsing-userdata': HLSFragParsingUserdataEvent; 'hls-frag-parsing-metadata': HLSFragParsingMetadataEvent; 'hls-frag-parsed': HLSFragParsedEvent; 'hls-frag-buffered-data': HLSFragBufferedDataEvent; 'hls-frag-changed': HLSFragChangedEvent; 'hls-fps-drop': HLSFpsDropEvent; 'hls-fps-drop-level-capping': HLSFpsDropLevelCappingEvent; 'hls-error': HLSErrorEvent; 'hls-destroying': HLSDestroyingEvent; 'hls-key-loading': HLSKeyLoadingEvent; 'hls-key-loaded': HLSKeyLoadedEvent; 'hls-back-buffer-reached': HLSBackBufferReachedEvent; } interface HLSMediaEvent extends DOMEvent { target: MediaPlayer; } /** * Fired when the browser begins downloading the `hls.js` library. */ interface HLSLibLoadStartEvent extends HLSMediaEvent {} /** * Fired when the `hls.js` library has been loaded. * * @detail constructor */ interface HLSLibLoadedEvent extends HLSMediaEvent {} /** * Fired when the `hls.js` library fails during the download process. * * @detail error */ interface HLSLibLoadErrorEvent extends HLSMediaEvent {} /** * Fired when the `hls.js` instance is built. This will not fire if the browser does not * support `hls.js`. * * @detail instance */ interface HLSInstanceEvent extends HLSMediaEvent {} /** * Fired when the browser doesn't support HLS natively, _and_ `hls.js` doesn't support * this environment either, most likely due to missing Media Extensions or video codecs. */ interface HLSUnsupportedEvent extends HLSMediaEvent {} /** * Fired before `MediaSource` begins attaching to the media element. * * @detail data */ interface HLSMediaAttachingEvent extends HLSMediaEvent {} /** * Fired when `MediaSource` has been successfully attached to the media element. * * @detail data */ interface HLSMediaAttachedEvent extends HLSMediaEvent {} /** * Fired before detaching `MediaSource` from the media element. */ interface HLSMediaDetachingEvent extends HLSMediaEvent {} /** * Fired when `MediaSource` has been detached from media element. */ interface HLSMediaDetachedEvent extends HLSMediaEvent {} /** * Fired when we buffer is going to be reset. */ interface HLSBufferResetEvent extends HLSMediaEvent {} /** * Fired when we know about the codecs that we need buffers for to push into. * * @detail data */ interface HLSBufferCodecsEvent extends HLSMediaEvent {} /** * Fired when `SourceBuffer`'s have been created. * * @detail data */ interface HLSBufferCreatedEvent extends HLSMediaEvent {} /** * Fired when we begin appending a media segment to the buffer. * * @detail data */ interface HLSBufferAppendingEvent extends HLSMediaEvent {} /** * Fired when we are done with appending a media segment to the buffer. * * @detail data */ interface HLSBufferAppendedEvent extends HLSMediaEvent {} /** * Fired when the stream is finished and we want to notify the media buffer that there will be no * more data. * * @detail data */ interface HLSBufferEosEvent extends HLSMediaEvent {} /** * Fired when the media buffer should be flushed. * * @detail data */ interface HLSBufferFlushingEvent extends HLSMediaEvent {} /** * Fired when the media buffer has been flushed. * * @detail data */ interface HLSBufferFlushedEvent extends HLSMediaEvent {} /** * Fired to signal that manifest loading is starting. * * @detail data */ interface HLSManifestLoadingEvent extends HLSMediaEvent {} /** * Fired after the manifest has been loaded. * * @detail data */ interface HLSManifestLoadedEvent extends HLSMediaEvent {} /** * Fired after manifest has been parsed. * * @detail data */ interface HLSManifestParsedEvent extends HLSMediaEvent {} /** * Fired when a level switch is requested. * * @detail data */ interface HLSLevelSwitchingEvent extends HLSMediaEvent {} /** * Fired when a level switch is effective. * * @detail data */ interface HLSLevelSwitchedEvent extends HLSMediaEvent {} /** * Fired when a level playlist loading starts. * * @detail data */ interface HLSLevelLoadingEvent extends HLSMediaEvent {} /** * Fired when a level playlist loading finishes. * * @detail data */ interface HLSLevelLoadedEvent extends HLSMediaEvent {} /** * Fired when a level's details have been updated based on previous details, after it has been * loaded. * * @detail data */ interface HLSLevelUpdatedEvent extends HLSMediaEvent {} /** * Fired when a level's PTS information has been updated after parsing a fragment. * * @detail data */ interface HLSLevelPtsUpdatedEvent extends HLSMediaEvent {} /** * Fired when a level is removed after calling `removeLevel()`. * * @detail data */ interface HLSLevelsUpdatedEvent extends HLSMediaEvent {} /** * Fired to notify that the audio track list has been updated. * * @detail data */ interface HLSAudioTracksUpdatedEvent extends HLSMediaEvent {} /** * Fired when an audio track switching is requested. * * @detail data */ interface HLSAudioTrackSwitchingEvent extends HLSMediaEvent {} /** * Fired when an audio track switch actually occurs. * * @detail data */ interface HLSAudioTrackSwitchedEvent extends HLSMediaEvent {} /** * Fired when loading an audio track starts. * * @detail data */ interface HLSAudioTrackLoadingEvent extends HLSMediaEvent {} /** * Fired when loading an audio track finishes. * * @detail data */ interface HLSAudioTrackLoadedEvent extends HLSMediaEvent {} /** * Fired to notify that the subtitle track list has been updated. * * @detail data */ interface HLSSubtitleTracksUpdatedEvent extends HLSMediaEvent {} /** * Fired to notify that subtitle tracks were cleared as a result of stopping the media. */ interface HLSSubtitleTracksClearedEvent extends HLSMediaEvent {} /** * Fired when a subtitle track switch occurs. * * @detail data */ interface HLSSubtitleTrackSwitchEvent extends HLSMediaEvent {} /** * Fired when loading a subtitle track starts. * * @detail data */ interface HLSSubtitleTrackLoadingEvent extends HLSMediaEvent {} /** * Fired when loading a subtitle track finishes. * * @detail data */ interface HLSSubtitleTrackLoadedEvent extends HLSMediaEvent {} /** * Fired when a subtitle fragment has been processed. * * @detail data */ interface HLSSubtitleFragProcessedEvent extends HLSMediaEvent {} /** * Fired when a set of `VTTCue`'s to be managed externally has been parsed. * * @detail data */ interface HLSCuesParsedEvent extends HLSMediaEvent {} /** * Fired when a text track to be managed externally is found. * * @detail data */ interface HLSNonNativeTextTracksFoundEvent extends HLSMediaEvent {} /** * Fired when the first timestamp is found. * * @detail data */ interface HLSInitPtsFoundEvent extends HLSMediaEvent {} /** * Fired when loading a fragment starts. * * @detail data */ interface HLSFragLoadingEvent extends HLSMediaEvent {} /** * Fired when fragment loading is aborted for emergency switch down. * * @detail data */ interface HLSFragLoadEmergencyAbortedEvent extends HLSMediaEvent {} /** * Fired when fragment loading is completed. * * @detail data */ interface HLSFragLoadedEvent extends HLSMediaEvent {} /** * Fired when a fragment has finished decrypting. * * @detail data */ interface HLSFragDecryptedEvent extends HLSMediaEvent {} /** * Fired when `InitSegment` has been extracted from a fragment. * * @detail data */ interface HLSFragParsingInitSegmentEvent extends HLSMediaEvent {} /** * Fired when parsing sei text is completed. * * @detail data */ interface HLSFragParsingUserdataEvent extends HLSMediaEvent {} /** * Fired when parsing id3 is completed. * * @detail data */ interface HLSFragParsingMetadataEvent extends HLSMediaEvent {} /** * Fired when fragment parsing is completed. * * @detail data */ interface HLSFragParsedEvent extends HLSMediaEvent {} /** * Fired when fragment remuxed MP4 boxes have all been appended into `SourceBuffer`. * * @detail data */ interface HLSFragBufferedDataEvent extends HLSMediaEvent {} /** * Fired when fragment matching with current media position is changing. * * @detail data */ interface HLSFragChangedEvent extends HLSMediaEvent {} /** * Fired when a FPS drop is identified. * * @detail data */ interface HLSFpsDropEvent extends HLSMediaEvent {} /** * Fired when FPS drop triggers auto level capping. * * @detail data */ interface HLSFpsDropLevelCappingEvent extends HLSMediaEvent {} /** * Fired when an error has occurred during loading or playback. * * @detail data */ interface HLSErrorEvent extends HLSMediaEvent {} /** * Fired when the `hls.js` instance is being destroyed. Different from `hls-media-detached` as * one could want to detach, and reattach media to the `hls.js` instance to handle mid-rolls. */ interface HLSDestroyingEvent extends HLSMediaEvent {} /** * Fired when a decrypt key loading starts. * * @detail data */ interface HLSKeyLoadingEvent extends HLSMediaEvent {} /** * Fired when a decrypt key has been loaded. * * @detail data */ interface HLSKeyLoadedEvent extends HLSMediaEvent {} /** * Fired when the back buffer is reached as defined by the `backBufferLength` config option. * * @detail data */ interface HLSBackBufferReachedEvent extends HLSMediaEvent {} //#endregion //#region types/providers/video/presentation/events.d.ts type VideoPresentationEvents = { 'video-presentation-change': VideoPresentationChangeEvent; }; /** * Fired when the video presentation mode changes. Only available in Safari. * * @detail mode */ interface VideoPresentationChangeEvent extends DOMEvent {} //#endregion //#region types/core/api/player-events.d.ts interface MediaPlayerEvents extends MediaEvents, MediaRequestEvents, MediaUserEvents, LoggerEvents, VideoPresentationEvents, HLSProviderEvents, DASHProviderEvents, GoogleCastEvents { 'media-player-connect': MediaPlayerConnectEvent; /** @internal */ 'find-media-player': FindMediaPlayerEvent; /** @internal */ 'vds-font-change': Event; } /** * Fired when the player element `` connects to the DOM. * * @bubbles * @composed * @detail player */ interface MediaPlayerConnectEvent extends DOMEvent {} interface FindMediaPlayerEventDetail { (player: MediaPlayer | null): void; } /** * @internal * @bubbles * @composed * @detail callback */ interface FindMediaPlayerEvent extends DOMEvent {} interface MediaUserEvents {} //#endregion //#region types/providers/google-cast/types.d.ts interface GoogleCastOptions extends Partial {} //#endregion //#region types/core/state/remote-control.d.ts /** * A simple facade for dispatching media requests to the nearest media player element. * * @docs {@link https://www.vidstack.io/docs/player/core-concepts/state-management#updating} * */ declare class MediaRemoteControl { #private; constructor(logger?: Logger | undefined); /** * Set the target from which to dispatch media requests events from. The events should bubble * up from this target to the player element. * * @example * ```ts * const button = document.querySelector('button'); * remote.setTarget(button); * ``` */ setTarget(target: EventTarget | null): void; /** * Returns the current player element. This method will attempt to find the player by * searching up from either the given `target` or default target set via `remote.setTarget`. * * @example * ```ts * const player = remote.getPlayer(); * ``` */ getPlayer(target?: EventTarget | null): MediaPlayer | null; /** * Set the current player element so the remote can support toggle methods such as * `togglePaused` as they rely on the current media state. */ setPlayer(player: MediaPlayer | null): void; /** * Dispatch a request to start the media loading process. This will only work if the media * player has been initialized with a custom loading strategy `load="custom">`. * * @docs {@link https://www.vidstack.io/docs/player/core-concepts/loading#load-strategies} */ startLoading(trigger?: Event): void; /** * Dispatch a request to start the poster loading process. This will only work if the media * player has been initialized with a custom poster loading strategy `posterLoad="custom">`. * * @docs {@link https://www.vidstack.io/docs/player/core-concepts/loading#load-strategies} */ startLoadingPoster(trigger?: Event): void; /** * Dispatch a request to connect to AirPlay. * * @see {@link https://www.apple.com/au/airplay} */ requestAirPlay(trigger?: Event): void; /** * Dispatch a request to connect to Google Cast. * * @see {@link https://developers.google.com/cast/docs/overview} */ requestGoogleCast(trigger?: Event): void; /** * Dispatch a request to begin/resume media playback. */ play(trigger?: Event): void; /** * Dispatch a request to pause media playback. */ pause(trigger?: Event): void; /** * Dispatch a request to set the media volume to mute (0). */ mute(trigger?: Event): void; /** * Dispatch a request to unmute the media volume and set it back to it's previous state. */ unmute(trigger?: Event): void; /** * Dispatch a request to enter fullscreen. * * @docs {@link https://www.vidstack.io/docs/player/api/fullscreen#remote-control} */ enterFullscreen(target?: MediaFullscreenRequestTarget, trigger?: Event): void; /** * Dispatch a request to exit fullscreen. * * @docs {@link https://www.vidstack.io/docs/player/api/fullscreen#remote-control} */ exitFullscreen(target?: MediaFullscreenRequestTarget, trigger?: Event): void; /** * Dispatch a request to lock the screen orientation. * * @docs {@link https://www.vidstack.io/docs/player/screen-orientation#remote-control} */ lockScreenOrientation(lockType: ScreenOrientationLockType, trigger?: Event): void; /** * Dispatch a request to unlock the screen orientation. * * @docs {@link https://www.vidstack.io/docs/player/api/screen-orientation#remote-control} */ unlockScreenOrientation(trigger?: Event): void; /** * Dispatch a request to enter picture-in-picture mode. * * @docs {@link https://www.vidstack.io/docs/player/api/picture-in-picture#remote-control} */ enterPictureInPicture(trigger?: Event): void; /** * Dispatch a request to exit picture-in-picture mode. * * @docs {@link https://www.vidstack.io/docs/player/api/picture-in-picture#remote-control} */ exitPictureInPicture(trigger?: Event): void; /** * Notify the media player that a seeking process is happening and to seek to the given `time`. */ seeking(time: number, trigger?: Event): void; /** * Notify the media player that a seeking operation has completed and to seek to the given `time`. * This is generally called after a series of `remote.seeking()` calls. */ seek(time: number, trigger?: Event): void; seekToLiveEdge(trigger?: Event): void; /** * Dispatch a request to update the length of the media in seconds. * * @example * ```ts * remote.changeDuration(100); // 100 seconds * ``` */ changeDuration(duration: number, trigger?: Event): void; /** * Dispatch a request to update the clip start time. This is the time at which media playback * should start at. * * @example * ```ts * remote.changeClipStart(100); // start at 100 seconds * ``` */ changeClipStart(startTime: number, trigger?: Event): void; /** * Dispatch a request to update the clip end time. This is the time at which media playback * should end at. * * @example * ```ts * remote.changeClipEnd(100); // end at 100 seconds * ``` */ changeClipEnd(endTime: number, trigger?: Event): void; /** * Dispatch a request to update the media volume to the given `volume` level which is a value * between 0 and 1. * * @docs {@link https://www.vidstack.io/docs/player/api/audio-gain#remote-control} * @example * ```ts * remote.changeVolume(0); // 0% * remote.changeVolume(0.05); // 5% * remote.changeVolume(0.5); // 50% * remote.changeVolume(0.75); // 70% * remote.changeVolume(1); // 100% * ``` */ changeVolume(volume: number, trigger?: Event): void; /** * Dispatch a request to change the current audio track. * * @example * ```ts * remote.changeAudioTrack(1); // track at index 1 * ``` */ changeAudioTrack(index: number, trigger?: Event): void; /** * Dispatch a request to change the video quality. The special value `-1` represents auto quality * selection. * * @example * ```ts * remote.changeQuality(-1); // auto * remote.changeQuality(1); // quality at index 1 * ``` */ changeQuality(index: number, trigger?: Event): void; /** * Request auto quality selection. */ requestAutoQuality(trigger?: Event): void; /** * Dispatch a request to change the mode of the text track at the given index. * * @example * ```ts * remote.changeTextTrackMode(1, 'showing'); // track at index 1 * ``` */ changeTextTrackMode(index: number, mode: TextTrackMode, trigger?: Event): void; /** * Dispatch a request to change the media playback rate. * * @example * ```ts * remote.changePlaybackRate(0.5); // Half the normal speed * remote.changePlaybackRate(1); // Normal speed * remote.changePlaybackRate(1.5); // 50% faster than normal * remote.changePlaybackRate(2); // Double the normal speed * ``` */ changePlaybackRate(rate: number, trigger?: Event): void; /** * Dispatch a request to change the media audio gain. * * @example * ```ts * remote.changeAudioGain(1); // Disable audio gain * remote.changeAudioGain(1.5); // 50% louder * remote.changeAudioGain(2); // 100% louder * ``` */ changeAudioGain(gain: number, trigger?: Event): void; /** * Dispatch a request to resume idle tracking on controls. */ resumeControls(trigger?: Event): void; /** * Dispatch a request to pause controls idle tracking. Pausing tracking will result in the * controls being visible until `remote.resumeControls()` is called. This method * is generally used when building custom controls and you'd like to prevent the UI from * disappearing. * * @example * ```ts * // Prevent controls hiding while menu is being interacted with. * function onSettingsOpen() { * remote.pauseControls(); * } * * function onSettingsClose() { * remote.resumeControls(); * } * ``` */ pauseControls(trigger?: Event): void; /** * Dispatch a request to toggle the media playback state. */ togglePaused(trigger?: Event): void; /** * Dispatch a request to toggle the controls visibility. */ toggleControls(trigger?: Event): void; /** * Dispatch a request to toggle the media muted state. */ toggleMuted(trigger?: Event): void; /** * Dispatch a request to toggle the media fullscreen state. * * @docs {@link https://www.vidstack.io/docs/player/api/fullscreen#remote-control} */ toggleFullscreen(target?: MediaFullscreenRequestTarget, trigger?: Event): void; /** * Dispatch a request to toggle the media picture-in-picture mode. * * @docs {@link https://www.vidstack.io/docs/player/api/picture-in-picture#remote-control} */ togglePictureInPicture(trigger?: Event): void; /** * Show captions. */ showCaptions(trigger?: Event): void; /** * Turn captions off. */ disableCaptions(trigger?: Event): void; /** * Dispatch a request to toggle the current captions mode. */ toggleCaptions(trigger?: Event): void; userPrefersLoopChange(prefersLoop: boolean, trigger?: Event): void; } //#endregion //#region types/core/keyboard/types.d.ts type MediaKeyTarget = 'document' | 'player'; interface MediaKeyShortcuts { [keys: string]: MediaKeyShortcut | undefined; togglePaused?: MediaKeyShortcut; toggleMuted?: MediaKeyShortcut; toggleFullscreen?: MediaKeyShortcut; togglePictureInPicture?: MediaKeyShortcut; toggleCaptions?: MediaKeyShortcut; seekBackward?: MediaKeyShortcut; seekForward?: MediaKeyShortcut; speedUp?: MediaKeyShortcut; slowDown?: MediaKeyShortcut; volumeUp?: MediaKeyShortcut; volumeDown?: MediaKeyShortcut; } type MediaKeyShortcut = MediaKeysCallback | string | string[] | null; interface MediaKeysCallback { keys: string | string[]; /** @deprecated - use `onKeyUp` or `onKeyDown` */ callback?(event: KeyboardEvent, remote: MediaRemoteControl): void; onKeyUp?(context: { event: KeyboardEvent; player: MediaPlayer; remote: MediaRemoteControl; }): void; onKeyDown?(context: { event: KeyboardEvent; player: MediaPlayer; remote: MediaRemoteControl; }): void; } //#endregion //#region types/core/api/src-types.d.ts type MediaSrc = string | AudioSrc | VideoSrc | HLSSrc | DASHSrc | YouTubeSrc | VimeoSrc; type MediaSrcObject = MediaStream | MediaSource | Blob; type HTMLMediaSrc = string | MediaSrcObject; interface Src { src: T; type: string; } interface AudioSrc extends AudioSrcMeta { src: HTMLMediaSrc; type: AudioMimeType; } type AudioMimeType = 'audio/mpeg' | 'audio/ogg' | 'audio/3gp' | 'audio/mp3' | 'audio/webm' | 'audio/flac' | 'audio/object'; interface AudioSrcMeta { id?: string; bitrate?: number; channels?: number; } interface VideoSrc extends VideoSrcMeta { src: HTMLMediaSrc; type: VideoMimeType; } type VideoMimeType = 'video/mp4' | 'video/webm' | 'video/3gp' | 'video/ogg' | 'video/avi' | 'video/mpeg' | 'video/object'; interface VideoSrcMeta { id?: string; width?: number; height?: number; bitrate?: number; framerate?: number; codec?: string; } interface HLSSrc { src: string; type: HLSMimeType; } type HLSMimeType = 'application/vnd.apple.mpegurl' | 'audio/mpegurl' | 'audio/x-mpegurl' | 'application/x-mpegurl' | 'video/x-mpegurl' | 'video/mpegurl' | 'application/mpegurl'; interface DASHSrc { src: string; type: DASHMimeType; } type DASHMimeType = 'application/dash+xml'; interface YouTubeSrc { src: string; type: 'video/youtube'; } interface VimeoSrc { src: string; type: 'video/vimeo'; } declare function isVideoQualitySrc(src: Src): src is SetRequired; //#endregion //#region types/core/state/media-storage.d.ts interface MediaStorage { getVolume(): Promise; setVolume?(volume: number): Promise; getMuted(): Promise; setMuted?(muted: boolean): Promise; getTime(): Promise; setTime?(time: number, ended?: boolean): Promise; getLang(): Promise; setLang?(lang: string | null): Promise; getCaptions(): Promise; setCaptions?(captions: boolean): Promise; getPlaybackRate(): Promise; setPlaybackRate?(rate: number): Promise; getVideoQuality(): Promise; setVideoQuality?(quality: SerializedVideoQuality | null): Promise; getAudioGain(): Promise; setAudioGain?(gain: number | null): Promise; /** * Called when media is ready for playback and new data can be loaded. */ onLoad?(src: Src): void | Promise; /** * Called when the `mediaId` has changed. This method can return a function to be called * before the next change. * * - The `mediaId` is computed from the current source and clip times. It will be `null` if * there is no source. * * - The `playerId` is the string provided to the player `storage` prop (if set), or the `id` * set on the player element, otherwise `undefined`. */ onChange?(src: Src, mediaId: string | null, playerId?: string): MaybeStopEffect; /** * Called when storage is being destroyed either because the `storage` property on the player * has changed, or the player is being destroyed. */ onDestroy?(): void; } interface SerializedVideoQuality { id: string; width: number; height: number; bitrate?: number | null; } declare class LocalMediaStorage implements MediaStorage { #private; protected playerId: string; protected mediaId: string | null; getVolume(): Promise; setVolume(volume: number): Promise; getMuted(): Promise; setMuted(muted: boolean): Promise; getTime(): Promise; setTime(time: number, ended: boolean): Promise; getLang(): Promise; setLang(lang: string | null): Promise; getCaptions(): Promise; setCaptions(enabled: boolean): Promise; getPlaybackRate(): Promise; setPlaybackRate(rate: any): Promise; getAudioGain(): Promise; setAudioGain(gain: number | null): Promise; getVideoQuality(): Promise; setVideoQuality(quality: SerializedVideoQuality | null): Promise; onChange(src: Src, mediaId: string | null, playerId?: string): void; protected save(): void; protected saveTimeThrottled: (() => void) & { cancel: () => void; flush: () => void; }; private saveTime; } //#endregion //#region types/foundation/list/select-list.d.ts interface SelectListItem extends ListItem { selected: boolean; } declare class SelectList> extends List { get selected(): Item | null; get selectedIndex(): number; /** @internal */ protected [ListSymbol.onRemove](item: Item, trigger?: Event): void; /** @internal */ protected [ListSymbol.onUserSelect]?(): void; /** @internal */ [ListSymbol.add](item: Omit, trigger?: Event): void; /** @internal */ [ListSymbol.select](item: Item | undefined, selected: boolean, trigger?: Event): void; } interface SelectListEvents extends ListEvents { change: SelectListChangeEvent; } /** * @detail change */ interface SelectListChangeEvent extends DOMEvent> {} interface SelectListChangeEventDetail { prev: Item | null; current: Item | null; } //#endregion //#region types/core/quality/events.d.ts interface VideoQualityListEvents { add: VideoQualityAddEvent; remove: VideoQualityRemoveEvent; change: VideoQualityChangeEvent; 'auto-change': VideoQualityAutoChangeEvent; 'readonly-change': ListReadonlyChangeEvent; } interface VideoQualityListEvent extends DOMEvent { target: VideoQualityList; } /** * Fired when a video quality has been added to the list. * * @detail newQuality */ interface VideoQualityAddEvent extends VideoQualityListEvent {} /** * Fired when a video quality has been removed from the list. * * @detail removedQuality */ interface VideoQualityRemoveEvent extends VideoQualityListEvent {} /** * Fired when the selected video quality has changed. * * @detail change */ interface VideoQualityChangeEvent extends VideoQualityListEvent {} interface VideoQualityChangeEventDetail { prev: VideoQuality | null; current: VideoQuality; } /** * Fired when auto quality selection is enabled or disabled. */ interface VideoQualityAutoChangeEvent extends VideoQualityListEvent {} //#endregion //#region types/core/quality/symbols.d.ts declare const SET_AUTO: unique symbol, ENABLE_AUTO: unique symbol; /** @internal */ declare const QualitySymbol: { readonly setAuto: typeof SET_AUTO; readonly enableAuto: typeof ENABLE_AUTO; }; //#endregion //#region types/core/quality/video-quality.d.ts /** * @see {@link https://vidstack.io/docs/player/core-concepts/video-quality#quality-list} */ declare class VideoQualityList extends SelectList { #private; /** * Configures quality switching: * * - `current`: Trigger an immediate quality level switch. This will abort the current fragment * request if any, flush the whole buffer, and fetch fragment matching with current position * and requested quality level. * * - `next`: Trigger a quality level switch for next fragment. This could eventually flush * already buffered next fragment. * * - `load`: Set quality level for next loaded fragment. * * @see {@link https://www.vidstack.io/docs/player/api/video-quality#switch} * @see {@link https://github.com/video-dev/hls.js/blob/master/docs/API.md#quality-switch-control-api} */ switch: 'current' | 'next' | 'load'; /** * Whether automatic quality selection is enabled. */ get auto(): boolean; /** @internal */ [QualitySymbol.enableAuto]?: (trigger?: Event) => void; /** @internal */ protected [ListSymbol.onUserSelect](): void; /** @internal */ protected [ListSymbol.onReset](trigger?: Event): void; /** * Request automatic quality selection (if supported). This will be a no-op if the list is * `readonly` as that already implies auto-selection. */ autoSelect(trigger?: Event): void; getBySrc(src: unknown): VideoQuality | undefined; /** @internal */ [QualitySymbol.setAuto](auto: boolean, trigger?: Event): void; } interface VideoQuality extends SelectListItem { readonly id: string; readonly src?: unknown; readonly width: number; readonly height: number; readonly bitrate: number | null; readonly codec: string | null; } //#endregion //#region types/core/state/media-player-delegate.d.ts declare class MediaPlayerDelegate { #private; constructor(handle: (event: Event) => void, media: MediaContext); notify(type: Type, ...init: InferEventDetail extends void | undefined | never ? [detail?: never, trigger?: Event] : [detail: InferEventDetail, trigger?: Event]): void; ready(info?: { duration: number; seekable: TimeRanges; buffered: TimeRanges; }, trigger?: Event): Promise; } //#endregion //#region types/core/tracks/audio/events.d.ts interface AudioTrackListEvents { add: AudioTrackAddEvent; remove: AudioTrackRemoveEvent; change: AudioTrackChangeEvent; 'readonly-change': ListReadonlyChangeEvent; } interface AudioTrackListEvent extends DOMEvent { target: AudioTrackList; } /** * Fired when an audio track has been added to the list. * * @detail newTrack */ interface AudioTrackAddEvent extends AudioTrackListEvent {} /** * Fired when an audio track has been removed from the list. * * @detail removedTrack */ interface AudioTrackRemoveEvent extends AudioTrackListEvent {} /** * Fired when the selected audio track has changed. * * @detail change */ interface AudioTrackChangeEvent extends AudioTrackListEvent {} interface ChangeAudioTrackEventDetail { prev: AudioTrack | null; current: AudioTrack; } //#endregion //#region types/core/tracks/audio/audio-tracks.d.ts /** * @see {@link https://vidstack.io/docs/player/api/audio-tracks} */ declare class AudioTrackList extends SelectList {} /** * @see {@link https://vidstack.io/docs/player/api/audio-tracks} */ interface AudioTrack extends SelectListItem { /** * A string which uniquely identifies the track within the media. */ readonly id: string; /** * A human-readable label for the track, or an empty string if unknown. */ readonly label: string; /** * A string specifying the audio track's primary language, or an empty string if unknown. The * language is specified as a BCP 47 (RFC 5646) language code, such as "en-US" or "pt-BR". */ readonly language: string; /** * A string specifying the category into which the track falls. For example, the main audio * track would have a kind of "main". * * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/kind} */ readonly kind: string; } //#endregion //#region types/core/tracks/text/events.d.ts interface TextTrackEvents { 'load-start': TextTrackLoadStartEvent; load: TextTrackLoadEvent; error: TextTrackErrorEvent; 'add-cue': TextTrackAddCueEvent; 'remove-cue': TextTrackRemoveCueEvent; 'cue-change': TextTrackCueChangeEvent; 'mode-change': TextTrackModeChangeEvent; } interface TextTrackEvent extends DOMEvent { target: TextTrack; } /** * Fired when the text track begins the loading/parsing process. */ interface TextTrackLoadStartEvent extends TextTrackEvent {} /** * Fired when the text track has finished loading/parsing. */ interface TextTrackLoadEvent extends TextTrackEvent {} /** * Fired when loading or parsing the text track fails. */ interface TextTrackErrorEvent extends TextTrackEvent {} /** * Fired when a cue is added to the text track. */ interface TextTrackAddCueEvent extends TextTrackEvent {} /** * Fired when a cue is removed from the text track. */ interface TextTrackRemoveCueEvent extends TextTrackEvent {} /** * Fired when the active cues for the current text track have changed. */ interface TextTrackCueChangeEvent extends TextTrackEvent {} /** * Fired when the text track mode (showing/hidden/disabled) has changed. */ interface TextTrackModeChangeEvent extends TextTrackEvent {} //#endregion //#region types/core/tracks/text/symbols.d.ts declare const CROSS_ORIGIN: unique symbol, READY_STATE: unique symbol, UPDATE_ACTIVE_CUES: unique symbol, CAN_LOAD: unique symbol, ON_MODE_CHANGE: unique symbol, NATIVE: unique symbol, NATIVE_HLS: unique symbol; declare const TextTrackSymbol: { readonly crossOrigin: typeof CROSS_ORIGIN; readonly readyState: typeof READY_STATE; readonly updateActiveCues: typeof UPDATE_ACTIVE_CUES; readonly canLoad: typeof CAN_LOAD; readonly onModeChange: typeof ON_MODE_CHANGE; readonly native: typeof NATIVE; readonly nativeHLS: typeof NATIVE_HLS; }; //#endregion //#region types/core/tracks/text/text-track.d.ts /** * - 0: Not Loading * - 1: Loading * - 2: Ready * - 3: Error */ type TextTrackReadyState = 0 | 1 | 2 | 3; interface VTTCueInit extends Omit, 'startTime' | 'endTime' | 'text'>, Pick {} interface VTTRegionInit extends Omit, 'id'>, Pick {} interface VTTContent { cues?: VTTCueInit[]; regions?: VTTRegionInit[]; } declare class TextTrack extends EventsTarget { #private; static createId(track: TextTrack | TextTrackInit): string; readonly src?: string; readonly content?: TextTrackInit['content']; readonly type?: 'json' | CaptionsFileFormat | CaptionsParserFactory; readonly encoding?: string; readonly id = ""; readonly label = ""; readonly language = ""; readonly kind: TextTrackKind; readonly default = false; /** @internal */ [TextTrackSymbol.readyState]: TextTrackReadyState; /** @internal */ [TextTrackSymbol.crossOrigin]?: () => string | null; /** @internal */ [TextTrackSymbol.onModeChange]: (() => void) | null; /** @internal */ [TextTrackSymbol.native]: { default?: boolean; managed?: boolean; track: { mode: TextTrackMode; addCue(cue: any): void; removeCue(cue: any): void; }; remove?(): void; } | null; get metadata(): Readonly; get regions(): ReadonlyArray; get cues(): ReadonlyArray; get activeCues(): ReadonlyArray; /** * - 0: Not Loading * - 1: Loading * - 2: Ready * - 3: Error */ get readyState(): TextTrackReadyState; get mode(): TextTrackMode; set mode(mode: TextTrackMode); constructor(init: TextTrackInit); addCue(cue: VTTCue$1, trigger?: Event): void; removeCue(cue: VTTCue$1, trigger?: Event): void; setMode(mode: TextTrackMode, trigger?: Event): void; /** @internal */ [TextTrackSymbol.updateActiveCues](currentTime: number, trigger?: Event): void; /** @internal */ [TextTrackSymbol.canLoad](): void; } interface TextTrackInit { /** * A unique identifier. * * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/id} */ id?: string; /** * URL of the text track resource. This attribute must be specified and its URL value must have * the same origin as the document — unless the