/** * NativeVideoController — wraps an HTMLVideoElement to act as the video * playback path for codecs the browser supports natively. The element is * always muted because our existing AudioRenderer pipeline owns audio so * features like the Signalsmith pitch-preserved time-stretcher keep * working in native mode. * * The element's `currentTime` is the master clock when this controller is * active. The audio pipeline slaves to it via a clock provider callback. */ import { EventEmitter } from "../events/EventEmitter"; export interface NativeVideoControllerEventMap { timeupdate: number; durationchange: number; loadedmetadata: void; canplay: void; play: void; pause: void; ended: void; waiting: void; playing: void; ratechange: number; seeking: number; seeked: number; error: Error; } export declare class NativeVideoController extends EventEmitter { private video; private blobURL; private listenerCleanups; constructor(videoElement: HTMLVideoElement); private attachListeners; /** * Load a File via an Object URL. We deliberately do not slurp the * File into an in-memory Blob first: minimal players that * successfully play 4K AV1 on the same device (e.g. * simplevideoplayer.com) use a direct URL.createObjectURL(file) and * leave buffering policy to the browser. The in-memory variant we * tried earlier did not eliminate Chrome on Android's GOP-boundary * rebuffering and added an upfront 263MB allocation on top. */ loadFile(file: File): Promise; /** * Load a network URL directly. */ loadURL(url: string): Promise; private waitForMetadata; play(): Promise; pause(): void; seek(time: number): void; setPlaybackRate(rate: number): void; setVolume(volume: number): void; getVolume(): number; setMuted(muted: boolean): void; getMuted(): boolean; getCurrentTime(): number; getDuration(): number; getPaused(): boolean; getEnded(): boolean; getReadyState(): number; getVideoWidth(): number; getVideoHeight(): number; getElement(): HTMLVideoElement; destroy(): void; } /** * Probe whether the browser claims to support a given codec/container in * `