938a2f7f by Simeon Bateman Committed by David LaPalomento

added styp generator and default audio hdlr box

1 parent c9f97355
......@@ -33,6 +33,7 @@ DataView = window.DataView;
stsd: [],
stsz: [],
stts: [],
styp: [],
tfhd: [],
traf: [],
trak: [],
......@@ -71,6 +72,18 @@ DataView = window.DataView;
0x6f, 0x48, 0x61, 0x6e,
0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'
]);
SOUND_HDLR = new Uint8Array([
0x00, // version 0
0x00, 0x00, 0x00, // flags
0x00, 0x00, 0x00, 0x00, // pre_defined
0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'
0x00, 0x00, 0x00, 0x00, // reserved
0x00, 0x00, 0x00, 0x00, // reserved
0x00, 0x00, 0x00, 0x00, // reserved
0x56, 0x69, 0x64, 0x65,
0x6f, 0x48, 0x61, 0x6e,
0x73, 0x6f, 0x75, 0x6e, 0x00 // name: 'VideoHandler'
]);
DREF = new Uint8Array([
0x00, // version 0
0x00, 0x00, 0x00, // flags
......@@ -296,6 +309,10 @@ stsd = function(width, height) {
));
};
styp = function() {
return box(types.styp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND);
};
tkhd = function(duration, width, height) {
return box(types.tkhd, new Uint8Array([
0x00, // version 0
......