Skip to content

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
Fijxu:fix-watch-on-youtube-t-parameter-value-when-video-ends
Open

Fix Youtube and Invidious links not rewinding their time when video playback position is rewound#5601
Fijxu wants to merge 2 commits intoiv-org:masterfrom
Fijxu:fix-watch-on-youtube-t-parameter-value-when-video-ends

Conversation

@Fijxu
Copy link
Member

@Fijxu Fijxu commented Jan 19, 2026

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 t parameter 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_ts was only used here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ts global 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.

@unixfox
Copy link
Member

unixfox commented Jan 19, 2026

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.

@Fijxu
Copy link
Member Author

Fijxu commented Feb 16, 2026

That should be better!, it will only update every second

… video timestamp is rewinded"

This reverts commit c3ee8a5.
@Fijxu Fijxu force-pushed the fix-watch-on-youtube-t-parameter-value-when-video-ends branch from e759871 to 584c815 Compare February 16, 2026 19:48
@SamantazFox
Copy link
Member

Please squash your commits though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants