UNPKG

libpgs

Version:

Renderer for graphical subtitles (PGS) in the browser.

39 lines (38 loc) 1.26 kB
import { WindowDefinition } from "./pgs/windowDefinitionSegment"; import { CompositionObject } from "./pgs/presentationCompositionSegment"; /** * This class contains the compiled subtitle data for a whole frame. */ export declare class SubtitleData { /** * The total width of the presentation composition (screen). */ readonly width: number; /** * The total height of the presentation composition (screen). */ readonly height: number; /** * The pre-compiled composition elements. */ readonly compositionData: SubtitleCompositionData[]; constructor(width: number, height: number, compositionData: SubtitleCompositionData[]); } /** * This class contains the compiled subtitle data for a single composition. */ export declare class SubtitleCompositionData { /** * The original composition object of the subtile data. */ readonly compositionObject: CompositionObject; /** * The pgs window to draw on (the on-screen position). */ readonly window: WindowDefinition; /** * The compiled pixel data of the subtitle. */ readonly pixelData: ImageData; constructor(compositionObject: CompositionObject, window: WindowDefinition, pixelData: ImageData); }