aadsm / jsmediatags

Media Tags Reader (ID3, MP4, FLAC)
Other
758 stars 127 forks source link

Error: No suitable file reader found for blob:http://localhost:8888/... jsmediatags.min.js:80:33 #86

Closed rjh78 closed 6 years ago

rjh78 commented 6 years ago

Have only been working with JS for a few months, so this is probably user ignorance, but some assistance would be greatly appreciated. I have written some test code to select and play local mp3 files. Here is my test code: https://jsfiddle.net/rjhbiz/rjmfo1z4/

I get the above error message when trying to read the tag info from an mp3 on my localhost.

I select the local file with the (input type="file") and then use window.URL.createObjectURL(file); to get the info which I pass to the (audio)(source) tags and the mp3 file plays as expected. I just can't use it to read the tag info for artist, title, album, which I would very much like to get.

Am I just doing something wrong or is it not possible to get the tag information via the info from window.URL.createObjectURL? If it is not possible, might you point me in a direction where I can read the tag info and still allow the user to select local audio files to play?

I understand the limitations of accessing local files from the browser and at first thought the createObjectURL was going to be the solution, which it is sortof. Thank you in advance for any assistance you can provide. Cheers!

rjh78 commented 6 years ago

Closed - I solved the problem with more trial and error.