Skip to content

Commit 42064fd

Browse files
dukesookDenizUgur
andauthored
Read GIMI 'Component Content ID' UUID Property (#533)
* feat: read 'component content id' property * add changeset --------- Co-authored-by: DenizUgur <DenizUgur@users.noreply.github.com>
1 parent c6227fd commit 42064fd

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

.changeset/busy-ears-judge.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mp4box': minor
3+
---
4+
5+
add `ItemComponentContentIDProperty` from GIMI

src/boxes/uuid/index.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,21 @@ export class ItemContentIDPropertyBox extends UUIDBox {
130130
this.content_id = stream.readCString();
131131
}
132132
}
133+
134+
export class ItemComponentContentIDPropertyBox extends UUIDBox {
135+
static uuid = '9db9dd6e373c5a4e811021fc83a911fd' as const;
136+
box_name = 'ItemComponentContentIDProperty' as const;
137+
138+
content_ids: Array<string>;
139+
number_of_components: number;
140+
141+
parse(stream: MultiBufferStream): void {
142+
this.number_of_components = stream.readUint32();
143+
144+
this.content_ids = [];
145+
for (let i = 0; i < this.number_of_components; i++) {
146+
const content_id: string = stream.readCString();
147+
this.content_ids.push(content_id);
148+
}
149+
}
150+
}

0 commit comments

Comments
 (0)