-
Notifications
You must be signed in to change notification settings - Fork 31
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
Subtitles are not updated in PAUSE mode #15
Comments
Hello @arcadeus ! Thanks for noticing the error, it really does exist. However I'm not sure if I can fix it. The problem is, that the YouTube Iframe Api doesn't have an event for seeking, it only has events for playing, stopping and buffering. Now it works like the following: when the play event is triggered, the script starts an interval check (it runs every 500 milliseconds) and gets the current time from the api. And when the stop event occures, the script cleares the interval. We could do the same thing and run the current time check even in the stopped state. But I think that would be a bit too much. Imagine, that there 50 embedded videos on a page. Now it only checks the time and renders the subtitle on the video which is currently playing (usually I think a person used to watch only one video at a time). Otherwise it would check all the videos constantly of course and most of the time there wouldn't be any change at all. Only in this case, when the video is paused and someone presses an arrow or seeks with the mouse. My opinion is, that this is something we can live with, and I think the script shouldn't do anything until the video is not playing. What do you think, should we fix this? I would appreciate hearing your thoughts about the issue! |
"Now it works like the following: when the play event is triggered, the script starts an interval check (it runs every 500 milliseconds) and gets the current time from the api. And when the stop event occures, the script cleares the interval." Could you please point out the lines in the code (in "docs/static/vendor/youtube.external.subtitle.js") where those things are done? I'm trying to understand how it works. There's a lot of stuff here I don't understand yet, but I'm hoping to understand enough... |
Hello @siloor !
|
Stop YouTube video and forward it by the Right Arrow on the keyboard.
Subtitles are not updated.
The text was updated successfully, but these errors were encountered: