tav-media
Version:
Cross platform media editing framework
26 lines (25 loc) • 890 B
TypeScript
import type { EmscriptenGL } from '../types';
import type { TimeRange } from '../interfaces';
export declare class VideoReader {
static isIOS: () => boolean;
static isAndroidMiniprogram: () => boolean;
private videoEl;
private readonly frameRate;
private lastVideoTime;
private hadPlay;
private staticTimeRanges;
private lastPrepareTime;
private disablePlaybackRate;
constructor(mp4Data: Uint8Array, width: number, height: number, frameRate: number, staticTimeRanges: TimeRange[]);
prepare(targetFrame: number): Promise<boolean>;
renderToTexture(GL: EmscriptenGL, textureID: number): void;
onDestroy(): void;
private onTimeupdate;
private seek;
private alignPlaybackRate;
}
export declare class StaticTimeRanges {
private timeRanges;
constructor(timeRanges: TimeRange[]);
contains(targetFrame: number): boolean;
}