Skip to content

Conversation

caetano-dev
Copy link
Contributor

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Closes #7445

Description

Fixes a bug that made the video speed reset when the video ended.

These changes include a session storage to preserve the selected speed and a watch to monitor the currentPlaybackRate prop and keep it in sync.

Testing

1 - Open a video and set a custom speed.
2 - Let the video end.
3 - See that the video speed remains the same.

(previously, the speed would automatically reset to the default at the end)

Desktop

  • OS: Linux
  • OS Version: Ubuntu 24.04.2 LTS
  • FreeTube version: v0.23.5 Beta

Additional context

It seems like the bug was happening because the Shaka Player replaces the <video> element's source when it loads a new manifest. This throws away the current playbackRate.

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jul 21, 2025
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) July 21, 2025 14:23
@efb4f5ff-1298-471a-8973-3d47447115dc

fyi: havent forgotten about this one but i have made some notes on my issue you are trying to solve and the gist of it is that the issue is maybe running way deeper than i though. So i will investigate the notes first and come back to this

@efb4f5ff-1298-471a-8973-3d47447115dc

So the other case that was listed in my notes and should be checked is playlists

  1. Watch a playlist
  2. Change playback rate
  3. Video ends
  4. Next video resets playback rate
  5. Change playback rate again
  6. Click on next video in Playlist
  7. See that playback is saved

@caetano-dev
Copy link
Contributor Author

Hello! It seems like it is working fine on this branch.

Here is my test on a playlist I created. The same behaviour was found on playlists from other channels.

video.mp4

@efb4f5ff-1298-471a-8973-3d47447115dc

Could you rebase into dev so we can test this with working playback

auto-merge was automatically disabled August 13, 2025 11:47

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) August 13, 2025 11:47
@caetano-dev
Copy link
Contributor Author

Rebased

Copy link
Member

Choose a reason for hiding this comment

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

Functionally wise LGTM but i prefer @absidue to sign off code wise first

Copy link
Member

@absidue absidue left a comment

Choose a reason for hiding this comment

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

Please remove the sessionStorage code.

auto-merge was automatically disabled August 17, 2025 22:53

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) August 17, 2025 22:53
@caetano-dev
Copy link
Contributor Author

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: waiting for review For PRs that are complete, tested, and ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Playback rate not saved when autoplay is enabled
4 participants