UNPKG

libpgs

Version:

Renderer for graphical subtitles (PGS) in the browser.

30 lines (29 loc) 957 B
import { PgsRendererImpl } from "./pgsRendererImpl"; import { PgsRendererOptions } from "./pgsRendererOptions"; /** * The implementation without web workers. This loads and renders the subtitle in the main thread. * This is meant as a compatibility fallback if advanced workers are not supported. */ export declare class PgsRendererInMainThread extends PgsRendererImpl { constructor(options: PgsRendererOptions, canvas: HTMLCanvasElement); /** * The PGS loader. * @private */ private readonly pgs; /** * The subtitle renderer, running in the main thread. */ private readonly renderer; protected render(index: number): void; loadFromUrl(url: string): void; loadFromBuffer(buffer: ArrayBuffer): void; /** * Submits the update timestamps from the pgs loader and invokes events. */ private invokeTimestampsUpdate; /** * Disposes the renderer. */ dispose(): void; }