mp4box
Version:
JavaScript version of GPAC's MP4Box tool
17 lines (15 loc) • 510 B
JavaScript
BoxParser.createFullBoxCtor("mdhd", "MediaHeaderBox", function(stream) {
if (this.version == 1) {
this.creation_time = stream.readUint64();
this.modification_time = stream.readUint64();
this.timescale = stream.readUint32();
this.duration = stream.readUint64();
} else {
this.creation_time = stream.readUint32();
this.modification_time = stream.readUint32();
this.timescale = stream.readUint32();
this.duration = stream.readUint32();
}
this.parseLanguage(stream);
stream.readUint16();
});