I am developing an epub reader in js. My app works on chrome 35 and recent browsers but not the old ones (ex: safari 5). I got this error "can't find variable FileReader" which occurs when I attempt to read a Blob.
var reader = new FileReader();
reader.readAsArrayBuffer(blob);
I am searching for an alternative to FileReader. I tried to use FileAPI instead which provides a readAsArrayBuffer method too :
var reader = FileAPI;
reader.readAsArrayBuffer(blob, function(e) {
console.debug(e);
});
but console.debug returns : Object {type: "error", target: Blob, result: undefined, error: "filreader_not_support_BinaryString"}
I found this polyfill : https://github.com/Jahdrien/FileReader but I avoid using jquery. Thanks for your help.