Skip to content

Instantly share code, notes, and snippets.

@chikoski
Created October 6, 2015 03:00
Show Gist options
  • Save chikoski/c320dbcb3c990f68947c to your computer and use it in GitHub Desktop.
Save chikoski/c320dbcb3c990f68947c to your computer and use it in GitHub Desktop.
var storage = navigator.getDeviceStorage("music");
window.addEventListener("load", function() {
var cursor = storage.enumerate();
cursor.onsuccess = function(){
var file = this.result;
console.log(file);
var reader = new FileReader();
reader.onload = function(){
var bytes = this.result;
console.log(bytes);
};
reader.readAsArrayBuffer(file);
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment