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

Player not updating when playlist attribute changes. #20

Open
derweili opened this issue Mar 29, 2023 · 0 comments
Open

Player not updating when playlist attribute changes. #20

derweili opened this issue Mar 29, 2023 · 0 comments
Labels

Comments

@derweili
Copy link

Bug

When the value passed to the playlist attribute gets changed, the video shown by the jwplayer-react component does not change. Instead it still shows the "old" video.

Expected Behaviour

When changing the playlist attribute, the the jwplayer should show the videos from the new playlist.

Current workaround

Currently I fix this by adding a "key" attribute to the component which is unique to the playlist.

<JWPlayer library={script} playlist={playlist} key={playlist}/>

This forces the component to unmount and mount again, but I think the jwplayer-react component should be able to handle this case by itself.

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

No branches or pull requests

2 participants