diff --git a/.changeset/yellow-poems-live.md b/.changeset/yellow-poems-live.md new file mode 100644 index 00000000..599704f4 --- /dev/null +++ b/.changeset/yellow-poems-live.md @@ -0,0 +1,5 @@ +--- +'mp4box': minor +--- + +Read altt item property diff --git a/entries/all-boxes.ts b/entries/all-boxes.ts index 6fc77045..6250bfa5 100644 --- a/entries/all-boxes.ts +++ b/entries/all-boxes.ts @@ -137,6 +137,7 @@ export * from '#/boxes/tsel'; export * from '#/boxes/txtC'; export * from '#/boxes/tyco'; export * from '#/boxes/udes'; +export * from '#/boxes/altt'; export * from '#/boxes/uncC'; export * from '#/boxes/url'; export * from '#/boxes/urn'; diff --git a/src/boxes/altt.ts b/src/boxes/altt.ts new file mode 100644 index 00000000..8c301ce8 --- /dev/null +++ b/src/boxes/altt.ts @@ -0,0 +1,16 @@ +import { FullBox } from '#/box'; +import type { MultiBufferStream } from '#/buffer'; + +export class alttBox extends FullBox { + static override readonly fourcc = 'altt' as const; + box_name = 'AccessibilityTextProperty' as const; + + alt_text: string; + alt_lang: string; + + parse(stream: MultiBufferStream) { + this.parseFullHeader(stream); + this.alt_text = stream.readCString(); + this.alt_lang = stream.readCString(); + } +}