-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
hey there! I've been going over what your doing and im a bit confused as to what kind of data the ID3 class is expecting.
for example, ive got a file input called "fileselect" which im manipulating through jquery:
//functions that get called second
function getDataURL(file, callback){
reader = new FileReader();
reader.onload = function(){
callback(reader.result)
};
reader.readAsDataURL(file)
}
function fileLoadCallback(file){console.log(file)}
// heres the jquery that gets called first
jQuery("#fileselect").change(function(){
file = this.files[0]
getDataURL(file, fileLoadCallback)
})
and i was hoping to put the ID3 stuff into the callback for the onChange. However, im not sure what the ID3 class is expecting from a url (im testing all of this locally btw). i thought it would want the DataURL generated by readAsDataURL, however, when i give it that, nothing happens. btw the callback looks like this with ID3:
function fileLoadCallback(file){
console.log(file)
ID3.loadTags(file,function(){
var tags = ID3.getAllTags(file);
console.log(tags.artist)
})
}
So what kind of URL is it expecting?
Metadata
Metadata
Assignees
Labels
No labels