UNPKG

mp4box

Version:

JavaScript version of GPAC's MP4Box tool

12 lines 417 B
BoxParser.createBoxCtor("cmpd", "ComponentDefinitionBox", function(stream) { this.component_count = stream.readUint32(); this.component_types = []; this.component_type_urls = []; for (i = 0; i < this.component_count; i++) { var component_type = stream.readUint16(); this.component_types.push(component_type); if (component_type >= 0x8000) { this.component_type_urls.push(stream.readCString()); } } });