feat(player): Alt/Ctrl + scroll to change playback speed #3113
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.
Summary
This PR adds an optional hotkey to change YouTube playback speed using the mouse wheel:
Rationale:
Ctrl + scrollis handled by the browser as page zoom and cannot be reliably prevented from a content script. Therefore, Alt + scroll is enabled by default, with an opt-in to Ctrl for users who prefer it or have page zoom disabled.UX
playbackRatein 0.1 steps./tvandaudiolibrarylike other features.Settings (Player → Playback)
Technical notes
wheelevents on the player/video element.e.altKey || (useCtrl && e.ctrlKey).preventDefault()onCtrl + scroll(browser zoom takes precedence by design).i18n
Added minimal English strings (other locales fall back to
en):alt_scroll_speed_name: "Change speed with Alt + Scroll"alt_scroll_speed_desc: "Hold Alt and use the mouse wheel to change playback speed."use_ctrl_instead_of_alt_name: "Use Ctrl instead of Alt (may conflict with browser zoom)"use_ctrl_instead_of_alt_desc: "Hold Ctrl and scroll to change playback speed. Note: browsers use Ctrl + scroll for page zoom."Testing
Limitations
Ctrl + scrollcontinues to trigger browser zoom; this is expected and documented. Alt is the safe default.Screenshots/GIF (optional)
If needed I can add a short GIF demo of Alt + scroll on a watch page.
Checklist
Closes #3105