diff --git a/dist/jsmediatags.js b/dist/jsmediatags.js index 66e825d..90a6f18 100644 --- a/dist/jsmediatags.js +++ b/dist/jsmediatags.js @@ -103,7 +103,7 @@ var BlobFileReader = function (_MediaFileReader) { var browserFileReader = new FileReader(); browserFileReader.onloadend = function (event) { - var intArray = new Uint8Array(Number(browserFileReader.result)); + var intArray = new Uint8Array(browserFileReader.result); self._fileData.addData(range[0], intArray); callbacks.onSuccess(); }; diff --git a/dist/jsmediatags.min.js b/dist/jsmediatags.min.js index 2c67cc8..0e039e0 100644 --- a/dist/jsmediatags.min.js +++ b/dist/jsmediatags.min.js @@ -4,7 +4,7 @@ enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.se if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=!a||"object"!==typeof a&&"function"!==typeof a?this:a;a._array=c;a._size=c.length;a._isInitialized=!0;return a}m(d,e);l(d,[{key:"init",value:function(c){setTimeout(c.onSuccess,0)}},{key:"loadRange",value:function(c,a){setTimeout(a.onSuccess,0)}},{key:"getByteAt",value:function(c){if(c>=this._array.length)throw Error("Offset "+c+" hasn't been loaded yet.");return this._array[c]}}],[{key:"canReadFile",value:function(c){return Array.isArray(c)|| "function"===typeof Buffer&&Buffer.isBuffer(c)}}]);return d}(f("./MediaFileReader"));p.exports=f},{"./MediaFileReader":11}],4:[function(f,p,q){function m(d,c){if("function"!==typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);d.prototype=Object.create(c&&c.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});c&&(Object.setPrototypeOf?Object.setPrototypeOf(d,c):d.__proto__=c)}var l=function(){function d(c,a){for(var b= 0;bb.offset&&(e=this._sliceData(b.data,0,e-b.offset),h.data=this._concatData(e,d));c&&(e=this._sliceData(h.data,0,g.offset-h.offset),h.data=this._concatData(e,g.data));this._fileData.splice(a.startIx,a.endIx-a.startIx+1,h)}}},{key:"_concatData",value:function(e,d){if("undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(e)){var c=new e.constructor(e.length+d.length);c.set(e,0);c.set(d,e.length);return c}return e.concat(d)}},{key:"_sliceData",