UNPKG

mp4box

Version:

JavaScript version of GPAC's MP4Box tool

25 lines (23 loc) 668 B
BoxParser.mvhdBox.prototype.write = function(stream) { this.version = 0; this.flags = 0; this.size = 23*4+2*2; this.writeHeader(stream); stream.writeUint32(this.creation_time); stream.writeUint32(this.modification_time); stream.writeUint32(this.timescale); stream.writeUint32(this.duration); stream.writeUint32(this.rate); stream.writeUint16(this.volume<<8); stream.writeUint16(0); stream.writeUint32(0); stream.writeUint32(0); stream.writeUint32Array(this.matrix); stream.writeUint32(0); stream.writeUint32(0); stream.writeUint32(0); stream.writeUint32(0); stream.writeUint32(0); stream.writeUint32(0); stream.writeUint32(this.next_track_id); }