Im building a Phonegap application for a friend where I intend to let people record audio on their phone, save it to the browser's localstorage and then upload it later.
AFAIK, you can't store binary files in localstorage, so Im trying to convert this file to base64, but so far I cant get it to work the way I want it to.
var file = document.getElementById('audioinput').files[0];
var url = window.URL.createObjectURL(file);
encodedAudio = windows.btoa(url);
All this does is encoding the link to the blob where the file is temporarily stored. How do I encode the actual audio file?