an alternative implementation for b24.js
npm install aribb24.jsARIB STD-B24 Captione Renderer
* ARIB STD-B24 Caption Rendering
* Caption (A Profile)
* Superimpose (A Profile)
* Support various broadcast specification
* ARIB STD-B24 (TR-B14, TR-B15)
* SBTVD ABNT NBR 15606-1
* Support various streaming protocol embedded ARIB STD-B24
* MPEG-TS (xqq/mpegts.js):
* Private Stream: Specified by ARIB STD-B24
* ID3 Timed Metadata: Sent by xtne6f/tsreadex
* HLS:
* ID3 Timed Metadata: above MPEG-TS ID3 Timed Metadata
* Support various rendering methods
* Canvas (CanvasMainThreadRenderer, CanvasWebWorkerRenderer)
* SVG (SVGDOMRenderer)
* HTML (HTMLFragmentRenderer)
* Text (TextRenderer)
* also CLI Tools Availables
* ts2sup: ARIB STD-B24 to SUP (PGS)
* ts2vobsub: ARIB STD-B24 to VOBSUB (SPU)
* ts2ass: ARIB STD-B24 to Advanced SubStation Alpha (ASS)
* ts2imsc: ARIB STD-B24 to IMSC (Image Profile)
* ts2b36: ARIB STD-B24 to ARIB STD-B36
* Use glyph data from 和田研中丸ゴシック2004ARIB for ARIB additional symbol rendering.
* Embedded glyph data exported from the font which is released under public domain license.
* Inspired by b24.js.
* The pioneer of ARIB caption rendering on Web.
* Influenced by TVCaptionMod2.
* Got lots of feedback form the project author and heavily inspired by it.
``javascript`
typescript
type FeederOption = Partial<{
recieve: {
association: 'ARIB' | 'SBTVD' | null; // null is AutoDetect
type: 'Caption' | 'Superimpose';
language: number | string; // index or iso language code
},
tokenizer: {
pua: boolean; // use PUA for ARIB NON-STANDARD CHARACTER
};
offset: {
time: number,
}
}>;
`$3
#### CanvasRenderer
`typescript
type CanvasRendererOption = Partial<{
font: {
normal: string;
arib: string;
},
replace: {
half: boolean, // default: true
drcs: Map,
glyph: Map,
}
color: {
stroke: string | null,
foreground: string | null,
background: string | null,
},
resize: {
target: 'video' | 'container'
objectFit: 'contain' | 'none'
}
}>;
``