Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Unresolved variable jsmediatags' when using window.jsmediatags #157

Open
Android789515 opened this issue Feb 19, 2022 · 1 comment
Open

Comments

@Android789515
Copy link

Android789515 commented Feb 19, 2022

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:
Screenshot 2022-02-19 174739

@Offroaders123
Copy link

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.

My Project - Librar.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants