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

window.jwplayer(...).setup is not a function #12

Open
pepsipwns opened this issue Aug 16, 2022 · 1 comment
Open

window.jwplayer(...).setup is not a function #12

pepsipwns opened this issue Aug 16, 2022 · 1 comment
Labels
bug Something isn't working triaged

Comments

@pepsipwns
Copy link

image

Using Nextjs and jwplayer-react.

The player most of the time is loading fine, but some times when the page loads the component itself loads before the jwplayer.js script has loaded. I had deduced that the jwplayer script will set the window.player, allowing us to use .setup(). However if the jwplayer.js script is not loaded before the component, the error is produced. I (think) I have found a workaround by loading the jwplayer in webpack, but its my understanding that this will load the library on every page, which isn't required for my site, the video component is in fact only on one page.

@jwbrandon
Copy link

Is this related to server side rendering? If not we will need a reproducible test case here as we cannot reproduce on our end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged
Projects
None yet
Development

No branches or pull requests

3 participants