Fix Youtube and Invidious links not rewinding their time when video playback position is rewound#5601
Open
Fijxu wants to merge 2 commits intoiv-org:masterfrom
Open
Conversation
…imestamp is rewinded
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes a bug where external YouTube and Invidious links would not update their timestamp parameter when users rewound the video playback. The old throttling logic only allowed timestamp updates when the time increased, preventing proper behavior when seeking backward.
Changes:
- Removed the
timeupdate_last_tsglobal variable that tracked the last timestamp - Removed the conditional logic that prevented the timeupdate callback from executing when time didn't increase
- Enabled bidirectional timestamp updates in external links
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
122
to
123
| */ | ||
| player.on('timeupdate', function () { |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Member
|
I feel like removing code is probably not the best idea, that code was there for a reason. I can indeed reproduce the issue though. |
Member
Author
|
That should be better!, it will only update every second |
… video timestamp is rewinded" This reverts commit c3ee8a5.
e759871 to
584c815
Compare
SamantazFox
approved these changes
Feb 26, 2026
Member
|
Please squash your commits though! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When rewinding a video, the time in the links Watch on Youtube, (Embed), Switch Invidious Instance, Embed Link was not rewound, so the time in the links only increased and it didn't decrease depending of the video playback timestamp position.
If it's not clear, here is a video of the fix, trying to rewind without this fix, makes the
tparameter only increase.2026-01-19.02-12-50.mp4
This fix does not affect at all with the saved playback position of each video (Save playback position: preference in Invidious settings that saves the video playback positions in Local Storage), the
timeupdate_last_tswas only used here.