Closed gauravmak closed 4 years ago
I could not reproduce the problem. Hope you have found a solution.
Unfortunately, I am not able to work on this software at the moment - the code will remain public for anyone interested in continuing to work with this library, as well as anyone interested in developing and releasing new versions of it.
Thanks a lot for your concern. I hope you are well, too. :)
We ended up using SoXI
(backend) to extract WAV files data. Hopefully, newer versions of browsers may have rectified the issue.
Thanks for the reply and all the best.
I just had the same problem. Turns out for me, Safari was loading the file as "data:audio/x-wav;". Changing it to "data:audio/wav;" fixed it for me!
// read as data url
var reader = new FileReader();
reader.addEventListener(
"load",
() => {
var inputUrl = reader.result;
// Safari fix: file is loaded as "data:audio/x-wav;" -> change to "data:audio/wav;"
if (inputUrl[11] === 'x') {
inputUrl = inputUrl.slice(0,11) + inputUrl.slice(13,inputUrl.length);
}
wav.fromDataURI(inputUrl);
// ... do stuff
},
false,
);
// Getting file from bootstrap form
reader.readAsDataURL($('#input-b1')[0].files[0]);
Hope this helps someone.
Thanks for the great tool. I am using it to read the selected wave file before uploading it. It works well in Chrome but not in Firefox and Safari. Following is the code snippet.
Upon checking, I found that the
container
value is a blank string in Firefox while 'RIFF' in Chrome.PS - I hope you are safe and healthy in these crazy times.