+ var subset = file.webkitSlice(offset, offset + length);
+ reader.readAsArrayBuffer(subset);
+ };
+
+ checkForMoovAtom(0);
+ }
+
+ function toDOMRepresentation(object)
+ {
+ if (object instanceof Atom)
+ return toDOMNode(object);
+ else if (object instanceof Array) {
+ var span = document.createElement('span');
+ span.appendChild(document.createTextNode('['));
+ for (var i = 0; i < object.length; ++i) {
+ span.appendChild(toDOMRepresentation(object[i]));
+ if (i + 1 < object.length)
+ span.appendChild(document.createTextNode(', '));
+ }
+ span.appendChild(document.createTextNode(']'));
+ return span;
+ }
+ else if (typeof(object) == "string")
+ return document.createTextNode('"' + object + '"');
+ else if (object instanceof Date)
+ return document.createTextNode(object.toLocaleString());
+ else
+ return document.createTextNode(object.toString());