FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Fix ctrl+click to reset playback rate not working

Open absidue opened this issue 1 year ago • 3 comments

Fix ctrl+click to reset playback rate not working

Pull Request Type

  • [x] Bugfix

Related issue

  • closes #6668

Description

This pull request fixes CTRL+clicking not resetting the playback rate "Scroll Playback Rate over Video Player" is enabled and that the toast message doesn't show up notifying you of the new playback rate, like it does when scrolling. The problem was that we were trying to restore it to the current playback rate instead of the default configured in the settings. As for the toast message, we just had not implemented it for the playback rate reset.

Testing

  1. Turn on "Scroll Playback Rate over Video Player" in the "Player" settings.
  2. Change the playback rate by holding CTRL or Cmd and then try resetting it by CTRL or Cmd + clicking.
  3. Check that it remembers the playback rate that you are currently on when you go to the next video e.g. click on a video in the recommended videos section.
  4. Test that it correctly resets the playback rate even if it was not 1x (e.g. 2x).

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 68ec1e12bbdfa6b37122f9513ae1a5fc05ddb3e2

absidue avatar Feb 27 '25 21:02 absidue

No reset is happening when ctrl clicking

https://github.com/user-attachments/assets/0a5a868d-f80a-4645-885a-77fa89aa4ffa

The code is fixed to what it was doing before BUT https://github.com/FreeTubeApp/FreeTube/pull/6449 changed the way how ctrl + clicked worked when autoplay is enabled

Default playback rate is set to 1x in the setting -> playback rate has been changed while watching the video, 9x -> next video uses playback rate of previous video so still 9x-> ctrl click resets to 9x instead of the default playback rate predefined in the settings

It basically sets the session playback rate as its default playback rate

https://github.com/user-attachments/assets/62759840-7677-4335-9ed4-8b38251f6c99

The wording in the tooltip indicate that it should always reset to the value set in the settings

135803944-907060fe-41c6-4a18-a1e8-5c86ecb7b585

Should be fixed now.

absidue avatar Mar 01 '25 22:03 absidue