jsmediatags
jsmediatags copied to clipboard
Error: No suitable file reader found
My jsmediatag dowbload: https://github.com/aadsm/jsmediatags/blob/master/dist/jsmediatags.min.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script src="./jsmediatags.min.js"></script>
<script>
// var jsmediatags = require("jsmediatags");
var jsmediatags = window.jsmediatags;
jsmediatags.read("a.mp3", {
onSuccess: function (tag) {
console.log(tag);
},
onError: function (error) {
console.log(error);
}
});
</script>
</body>
</html>
I ran into a similar issue and was able to resolve by provided a full address like this:
jsmediatags.read(new URL(audioPath, document.baseURI).href, { // requires full path
onSuccess: resolve,
onError: reject
});