import { EventEmitter } from "../events/EventEmitter"; import { PlayerEventMap, PlayerState, PlayerConfig, VideoTrack, AudioTrack, SubtitleTrack } from "../types"; import { TrackManager } from "../core/TrackManager"; export declare class ShakaPlayerWrapper extends EventEmitter { private config; private player; private videoElement; private canvasRenderer; private state; trackManager: TrackManager; private frameCallbackId; private _framesRendered; private variants; private videoRenditions; private audioRenditions; private textTracks; private imageTrackId; private spriteCache; private textContainer; private textStyle; private _loaded; constructor(config: PlayerConfig); private setupTrackSwitching; private activeVariant; /** * Map a Shaka error to a plain, user-facing message. The technical code and * category are logged for developers but never surfaced in the UI — viewers * see why playback failed in everyday language, not "Shaka … (code 6012)". * Categories follow shaka.util.Error.Category (thousands digit of the code). */ private friendlyMessage; private setupEventHandlers; private setState; private startFrameLoop; private stopFrameLoop; private renderFrame; /** * Ensure the external LCEVC decoder library (lcevc_dec.js) is present. Returns * true if the global `LCEVCdec` is available — lazy-loading it from `url` when * given. The library is proprietary (V-Nova) and not bundled, so LCEVC is * opt-in and degrades gracefully to base-layer playback when it's missing. */ private ensureLcevcLib; load(): Promise; /** * Audio-only (data-saver) mode. Picks a true audio-only variant when the * manifest exposes one (zero video bandwidth); otherwise pins the SMALLEST * video rendition (most of the saving without breaking a stream whose audio * is only muxed with video). ABR is disabled so it doesn't climb back up. * Toggling off re-enables ABR. NOT done via manifest.disableVideo — that * fails (Shaka 4032) on HLS streams with no separate audio-only variant. */ setAudioOnly(enabled: boolean): void; /** Build the video/audio/subtitle track lists from Shaka's manifest. */ private updateTracks; /** True for a live (dynamic) stream — drives the LIVE indicator UI. */ isLive(): boolean; /** True when the stream carries audio but no video (→ audio-strip layout). */ isAudioOnly(): boolean; /** Live edge time (seekable range end) — where "go live" jumps to. */ getLiveEdge(): number; /** Start of the seekable (DVR) window — used to scale the live progress bar. */ getSeekRangeStart(): number; /** Size the canvas from the highest rendition (or the