diff --git a/src/box.js b/src/box.js index e64fef44..6b6eefab 100644 --- a/src/box.js +++ b/src/box.js @@ -166,7 +166,7 @@ var BoxParser = { if (parseMethod) BoxParser[type+"TrackGroupTypeBox"].prototype.parse = parseMethod; }, createUUIDBox: function(uuid, isFullBox, isContainerBox, parseMethod) { - //BoxParser.UUIDs.push(uuid); + BoxParser.UUIDs.push(uuid); BoxParser.UUIDBoxes[uuid] = function(size) { if (isFullBox) { BoxParser.FullBox.call(this, "uuid", size, uuid); diff --git a/src/parsing/uuid/piff/piffLsm.js b/src/parsing/uuid/piff/piffLsm.js new file mode 100644 index 00000000..5db099dc --- /dev/null +++ b/src/parsing/uuid/piff/piffLsm.js @@ -0,0 +1,8 @@ +BoxParser.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66", true, false, function(stream) { + this.LiveServerManifest = stream.readString(this.size - this.hdr_size) + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); +}); \ No newline at end of file diff --git a/src/parsing/uuid/piff/piffTfrf.js b/src/parsing/uuid/piff/piffTfrf.js new file mode 100644 index 00000000..26bdcd2e --- /dev/null +++ b/src/parsing/uuid/piff/piffTfrf.js @@ -0,0 +1,23 @@ +BoxParser.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f", true, false, function(stream) { + this.fragment_count = stream.readUint8(); + this.entries = []; + + for (var i = 0; i < this.fragment_count; i++) { + var entry = {}; + var absolute_time = 0; + var absolute_duration = 0; + + if (this.version === 1) { + absolute_time = stream.readUint64(); + absolute_duration = stream.readUint64(); + } else { + absolute_time = stream.readUint32(); + absolute_duration = stream.readUint32(); + } + + entry.absolute_time = absolute_time; + entry.absolute_duration = absolute_duration; + + this.entries.push(entry); + } +}); \ No newline at end of file diff --git a/src/parsing/uuid/piff/piffTfxd.js b/src/parsing/uuid/piff/piffTfxd.js new file mode 100644 index 00000000..5399b888 --- /dev/null +++ b/src/parsing/uuid/piff/piffTfxd.js @@ -0,0 +1,9 @@ +BoxParser.createUUIDBox("6d1d9b0542d544e680e2141daff757b2", true, false, function(stream) { + if (this.version === 1) { + this.absolute_time = stream.readUint64(); + this.duration = stream.readUint64(); + } else { + this.absolute_time = stream.readUint32(); + this.duration = stream.readUint32(); + } +}); \ No newline at end of file