-
-
Notifications
You must be signed in to change notification settings - Fork 484
feat(Prime Video): Add Playback speed
patch
#5444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Related to feature #5443 |
...imevideo/src/main/java/app/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch.java
Outdated
Show resolved
Hide resolved
...imevideo/src/main/java/app/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch.java
Outdated
Show resolved
Hide resolved
...imevideo/src/main/java/app/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch.java
Outdated
Show resolved
Hide resolved
...imevideo/src/main/java/app/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch.java
Outdated
Show resolved
Hide resolved
...imevideo/src/main/java/app/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch.java
Outdated
Show resolved
Hide resolved
patches/src/main/kotlin/app/revanced/patches/primevideo/video/speed/PlaybackSpeedPatch.kt
Outdated
Show resolved
Hide resolved
patches/src/main/kotlin/app/revanced/patches/primevideo/video/speed/PlaybackSpeedPatch.kt
Show resolved
Hide resolved
patches/src/main/kotlin/app/revanced/patches/primevideo/video/speed/PlaybackSpeedPatch.kt
Outdated
Show resolved
Hide resolved
patches/src/main/kotlin/app/revanced/patches/primevideo/video/speed/PlaybackSpeedPatch.kt
Outdated
Show resolved
Hide resolved
patches/src/main/kotlin/app/revanced/patches/primevideo/video/speed/PlaybackSpeedPatch.kt
Outdated
Show resolved
Hide resolved
...imevideo/src/main/java/app/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch.java
Outdated
Show resolved
Hide resolved
...imevideo/src/main/java/app/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for 1×, 1.5×, and 2× playback speeds to the Prime Video player by injecting a new button into the user controls and wiring it up to an extension class.
- Hooks into
PlaybackUserControlsFeature.initialize
andprepareForPlayback
to register the extension. - Defines fingerprints for the target methods and exposes the patch through the API.
- Implements the UI overlay, dialog, and icon in the extension module.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
patches/src/main/kotlin/.../PlaybackSpeedPatch.kt | Injects calls to initialize the overlay and set the player instance |
patches/src/main/kotlin/.../Fingerprints.kt | Adds fingerprints for the initialization and playback methods |
patches/api/patches.api | Registers the new getPlaybackSpeedPatch entry |
extensions/primevideo/stub/src/.../Player.java | Defines the Player interface with playback rate methods |
extensions/primevideo/stub/src/.../VideoPlayer.java | Adds pause , play , and isPlaying to VideoPlayer stub |
extensions/primevideo/src/.../PlaybackSpeedPatch.java | Implements the speed button UI, dialog, and icon drawable |
Comments suppressed due to low confidence (2)
extensions/primevideo/src/main/java/app/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch.java:102
- Method name
changePlayBackSpeed
has inconsistent capitalization of "Back". Consider renaming tochangePlaybackSpeed
for readability and consistency.
private static void changePlayBackSpeed(TextView speedText) {
extensions/primevideo/src/main/java/app/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch.java:23
- [nitpick] Consider adding unit or integration tests for the playback speed controls and UI interactions to ensure the new feature works reliably and prevent regressions.
public class PlaybackSpeedPatch {
...imevideo/src/main/java/app/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch.java
Outdated
Show resolved
Hide resolved
...imevideo/src/main/java/app/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch.java
Outdated
Show resolved
Hide resolved
...imevideo/src/main/java/app/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch.java
Outdated
Show resolved
Hide resolved
Playback speed
patch
Thank you for contributing to ReVanced. Join us on Discord to receive a role for your contribution. |
# [5.32.0-dev.1](v5.31.3-dev.1...v5.32.0-dev.1) (2025-07-16) ### Features * **Prime Video:** Add `Playback speed` patch ([#5444](#5444)) ([22cf313](22cf313))
# [5.32.0](v5.31.2...v5.32.0) (2025-07-20) ### Bug Fixes * **YouTube - GmsCore support:** Fix search suggestions when logged out by using correct search provider ([ReVanced#5483](https://github.com/cecekpawon/revanced-patches/issues/5483)) ([e86fdc8](e86fdc8)) ### Features * **Prime Video:** Add `Playback speed` patch ([ReVanced#5444](https://github.com/cecekpawon/revanced-patches/issues/5444)) ([22cf313](22cf313))
# [5.32.0](v5.31.2...v5.32.0) (2025-07-20) ### Bug Fixes * **YouTube - GmsCore support:** Fix search suggestions when logged out by using correct search provider ([ReVanced#5483](https://github.com/cecekpawon/revanced-patches/issues/5483)) ([e86fdc8](e86fdc8)) ### Features * **Prime Video:** Add `Playback speed` patch ([ReVanced#5444](https://github.com/cecekpawon/revanced-patches/issues/5444)) ([22cf313](22cf313))
# [5.32.0-dev.1](v5.31.2...v5.32.0-dev.1) (2025-07-20) ### Bug Fixes * **YouTube - GmsCore support:** Fix search suggestions when logged out by using correct search provider ([ReVanced#5483](https://github.com/Hiirbaf/revanced-patches/issues/5483)) ([e86fdc8](e86fdc8)) ### Features * **Prime Video:** Add `Playback speed` patch ([ReVanced#5444](https://github.com/Hiirbaf/revanced-patches/issues/5444)) ([22cf313](22cf313))
# [5.32.0-dev.1](v5.31.2...v5.32.0-dev.1) (2025-07-20) ### Bug Fixes * **YouTube - GmsCore support:** Fix search suggestions when logged out by using correct search provider ([ReVanced#5483](https://github.com/Hiirbaf/revanced-patches/issues/5483)) ([e86fdc8](e86fdc8)) ### Features * **Prime Video:** Add `Playback speed` patch ([ReVanced#5444](https://github.com/Hiirbaf/revanced-patches/issues/5444)) ([22cf313](22cf313))
# [5.32.0-dev.1](v5.31.2...v5.32.0-dev.1) (2025-07-20) ### Bug Fixes * **YouTube - GmsCore support:** Fix search suggestions when logged out by using correct search provider ([ReVanced#5483](https://github.com/Hiirbaf/revanced-patches/issues/5483)) ([e86fdc8](e86fdc8)) ### Features * **Prime Video:** Add `Playback speed` patch ([ReVanced#5444](https://github.com/Hiirbaf/revanced-patches/issues/5444)) ([22cf313](22cf313))
# [5.32.0-dev.1](v5.31.2...v5.32.0-dev.1) (2025-07-20) ### Bug Fixes * **YouTube - GmsCore support:** Fix search suggestions when logged out by using correct search provider ([ReVanced#5483](https://github.com/Hiirbaf/revanced-patches/issues/5483)) ([e86fdc8](e86fdc8)) ### Features * **Prime Video:** Add `Playback speed` patch ([ReVanced#5444](https://github.com/Hiirbaf/revanced-patches/issues/5444)) ([22cf313](22cf313))
I made this patch during the weekend, and this is the initial working version
Adds the playback support for 1x,1.5x and 2x
The button opens up a dialog with radio buttons just like in subtitles
Opening up the dialog pauses and resumes the playback when the dialog is closed.
Selecting an item will set the playback rate
Drawable icon to match other two icons in the top overlay
The player instance is hooked in from PlaybackUserControlsFeature -> prepareForPlayback
The dialog overlay is added at PlaybackUserControlsFeature -> initialize
Tested on 3.0.412.2947