mirror of
https://github.com/zoriya/libpgs-js.git
synced 2026-08-27 00:00:51 +00:00
Not for upstream: this branch only exists so a consumer can depend on the fork straight from git while the `ready` promise waits on a release.
30 lines
975 B
TypeScript
30 lines
975 B
TypeScript
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): Promise<void>;
|
|
loadFromBuffer(buffer: ArrayBuffer): Promise<void>;
|
|
/**
|
|
* Submits the update timestamps from the pgs loader and invokes events.
|
|
*/
|
|
private invokeTimestampsUpdate;
|
|
/**
|
|
* Disposes the renderer.
|
|
*/
|
|
dispose(): void;
|
|
}
|