PGS (Presentation Graphic Stream) Subtitle For HTML5 Media Playback
npm install pgs.js* HTML5 Canvas based PGS (Presentation Graphic Stream) rendering
``ts`
export type PGSControllerOption = {
renderOption: {
preferHTMLCanvasElement: boolean; // preffer HTMLCanvasElement in Main Thread. (default: false, recommended firefox is true)
webWorker: boolean; // use WebWorker for rendering (default: false)
}
}
`ts`
export type PGSSupFeederOption = {
timeshift: number; // offset for time (default: 0)
preload: 'none' | 'decode' | 'render' ; // prelodd rgba data (default: none)
}
`html`
`html`
`html`
`html`
`bash``
yarn
yarn build