-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Updating video subtitles dynamically #329
Comments
Fixed in |
Thanks! |
This seems to be an issue still in 2.8.1. Toggling subtitle mode from visible to hidden, or changing the subtitle URL at run time does not trigger the player to update properly. Is there anything special that needs to be done to the config object to trigger the player to update? The VTT file is pulled in using fetch so it is initially empty until the signed url is retrieved for use. Also the subtitle display is controlled via a react state, and while it appears to work properly the actual DOM doesn't update to reflect the change. If the player goes from one video straight into the next, the video itself changes but the subtitles from the previous movie play again unless the page is reloaded. Here is what my object looks like:
|
encountering this same issue in Nov 2023. dynamically changing the tracks through a new config doesnt trigger an update in the underlying |
Hi. I have a problem with setting video subtitles at runtime via React Player.
As I found in docs, subtitles should be set through
config -> file -> tracks
. When I set them like this it works perfectly:However, if I want to set another current subtitles file there is no way to do it. As I understood config is set only once.
Is there any workaround to dynamically update current subtitles?
Thanks
The text was updated successfully, but these errors were encountered: