Fix YouTube seek resetting native playback speed to 1x#1532
Open
ColtonIdle wants to merge 1 commit into
Open
Conversation
Note: I verified the fix myself, but this change was done completely by AI, as well as the following description. This was mostly done to start a conversation with a possible solution. I'm an android dev so this chrome extension code goes over my head =) ## Summary Fixes YouTube/native-player speed changes being lost after seeking or unpausing. The extension previously treated any unhandled click/key as possible native speed-control intent. On YouTube, seeking can trigger a playbackRate reset to `1x` right after a progress-bar click, so the extension accepted that reset as the user's chosen speed. This change narrows gesture tracking to likely native speed controls and known native speed shortcuts (`<` / `>`), so generic seek clicks continue to fight back to the selected speed. Also allows a native speed-menu change to establish in-session `lastSpeed` even before the extension has set a speed itself. Fixes igrigorik#1521. ## Tests - `npm test -- tests/unit/utils/event-manager.test.js` - `npm run test:unit` - `npm run lint -- src/utils/event-manager.js tests/unit/utils/event-manager.test.js` - `npm run build`
|
I ran into this bug, realized this extension was the one causing the issue, tried the fix and it worked :-) |
|
Found another bug:
|
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.
Note: I verified the fix myself, but this change was done completely by AI, as well as the following description. This was mostly done to start a conversation with a possible solution. I'm an android dev so this chrome extension code goes over my head =)
Summary
Fixes YouTube/native-player speed changes being lost after seeking or unpausing.
The extension previously treated any unhandled click/key as possible native speed-control intent. On YouTube, seeking can trigger a playbackRate reset to
1xright after a progress-bar click, so the extension accepted that reset as the user's chosen speed.This change narrows gesture tracking to likely native speed controls and known native speed shortcuts (
</>), so generic seek clicks continue to fight back to the selected speed.Also allows a native speed-menu change to establish in-session
lastSpeedeven before the extension has set a speed itself.Fixes #1521.
Tests
npm test -- tests/unit/utils/event-manager.test.jsnpm run test:unitnpm run lint -- src/utils/event-manager.js tests/unit/utils/event-manager.test.jsnpm run build