jsmediatags
jsmediatags copied to clipboard
'Unresolved variable jsmediatags' when using window.jsmediatags
Not really understanding the usage instructions, I need a bit of help.
I have a script tag:
<script
src='https://cdnjs.cloudflare.com/ajax/libs/jsmediatags/3.9.5/jsmediatags.min.js'
integrity='sha512-YsR46MmyChktsyMMou+Bs74oCa/CDdwft7rJ5wlnmDzMj1mzqncsfJamEEf99Nk7IB0JpTMo5hS8rxB49FUktQ=='
crossorigin='anonymous'
referrerpolicy='no-referrer'
>
</script>
however when I try to use it:
I'm not exactly sure what your dev stack is like for your use case, but I currently have a workaround to use jsmediatags
as an ES Module exclusively, in the browser (Relating to the issue I opened that you also commented on recently).
First, I load the <script>
tag into the window
like JS MediaTags currently supports. Then, I essentially create my own wrapper module that contains the jsmediatags
object from the window
, Lastly, to tidy things up a little, I remove it from the window
object so it is only accessible by using import
with my wrapper module.