UNPKG

mp4box

Version:

JavaScript version of GPAC's MP4Box tool

15 lines (13 loc) 355 B
BoxParser.createBoxCtor("ftyp", "FileTypeBox", function(stream) { var toparse = this.size - this.hdr_size; this.major_brand = stream.readString(4); this.minor_version = stream.readUint32(); toparse -= 8; this.compatible_brands = []; var i = 0; while (toparse>=4) { this.compatible_brands[i] = stream.readString(4); toparse -= 4; i++; } });