import { MediaStreamType } from "../../core/types.js"; import { DrmSystemsConfig } from "../../core/drm.js"; import { MediaError } from "../../core/media-error.js"; import { HTMLVideoElementHost } from "../video-host/video-host.js"; import * as _$_videojs_utils_types0 from "@videojs/utils/types"; //#region src/dom/native-hls/media.d.ts type PreloadType = '' | 'none' | 'metadata' | 'auto'; type StreamType = MediaStreamType; declare const StreamTypes: { readonly ON_DEMAND: 'on-demand'; readonly LIVE: 'live'; readonly UNKNOWN: 'unknown'; }; interface NativeHlsMediaProps { src: string; source: NativeHlsSource | null; preload: PreloadType; streamType: StreamType; } /** * Structured native HLS source: which source to play, plus how to play it. * * Playback options sit under `engine`, keyed by engine, rather than at the top * level. Native HLS is one of two paths `HlsJsVideo` can take, and namespacing * by engine lets a single source describe both without either reading the * other's options. */ interface NativeHlsSource { /** Manifest URL. Mirrors the host's `src` property. */ src?: string | undefined; /** * License servers for protected content, keyed by EME key system id. Safari * negotiates keys itself and reaches FairPlay only, so the `com.apple.fps` * entry is the one read here — the rest can ride along for an engine that can * negotiate them. */ drm?: DrmSystemsConfig | undefined; /** Playback options, keyed by the engine that reads them. */ engine?: NativeHlsEngineConfig | undefined; } /** The engines a native HLS source can configure. */ interface NativeHlsEngineConfig { /** Options for the browser's own HLS playback. */ nativeHls?: NativeHlsConfig | undefined; } /** * Native HLS playback options. There is no JS engine to configure here — the * browser plays the manifest itself — so this is what Video.js does around it. */ interface NativeHlsConfig { /** * License servers for protected content, keyed by EME key system id. An * escape hatch for licensing native playback differently from every other * path: naming it replaces `source.drm` here, and nowhere else. */ drmSystems?: DrmSystemsConfig | undefined; } declare const nativeHlsMediaDefaultProps: NativeHlsMediaProps; declare class NativeHlsMediaBase extends HTMLVideoElementHost implements Omit { #private; /** * Underlying playback engine — always `null`. Native HLS has no JS engine; * the browser handles playback directly. */ get engine(): null; /** * Media source URL. Assigning it replaces the identity half of `source` and * leaves `engine` intact, so changing the URL never disturbs key exchange. * * Like the element's own `src`, assigning it always loads — including the URL * already playing. This is the imperative half of the API, and what * `HlsJsMedia` loads its native delegate through. */ get src(): string; set src(src: string); /** * Structured source: what to play (`src`) plus how to play it * (`engine.nativeHls`). Assigning it derives `src`. * * Only a new URL reaches the element, so reassigning an equivalent source — * an inline React prop, for instance — neither reloads nor disturbs key * exchange. Use `src` or `load()` to reload what is already playing. * * Unlike `HlsJsMedia`, this does not announce a `sourcechange`. It is also * the delegate `HlsJsMedia` plays native sources through, and every event it * dispatches is re-dispatched there — which already announces its own. */ get source(): NativeHlsSource | null; set source(value: NativeHlsSource | null); /** Preload type (`'none'` / `'metadata'` / `'auto'`). */ get preload(): PreloadType; set preload(value: PreloadType); attach(target: HTMLVideoElement): void; } declare const NativeHlsMedia_base: typeof NativeHlsMediaBase & _$_videojs_utils_types0.Constructor<{ readonly error: MediaError | null; setError(error: MediaError): void; }> & _$_videojs_utils_types0.Constructor<{ streamType: MediaStreamType; }> & _$_videojs_utils_types0.Constructor<{ readonly liveEdgeStart: number; readonly targetLiveWindow: number; }>; declare class NativeHlsMedia extends NativeHlsMedia_base {} //#endregion export { NativeHlsConfig, NativeHlsEngineConfig, NativeHlsMedia, NativeHlsMediaProps, NativeHlsSource, PreloadType, StreamType, StreamTypes, nativeHlsMediaDefaultProps }; //# sourceMappingURL=media.d.ts.map