Repository navigation
Add clear-cache app shortcut and player keyboard shortcuts - #13930
Closed
awaisdev5765 wants to merge 2 commits into
Closed
awaisdev5765 wants to merge 2 commits into
awaisdev5765 wants to merge 2 commits into
Conversation
Implements TeamNewPipe#8981 (long-press Clear cache action on the app icon) and partially implements TeamNewPipe#10448 (keyboard shortcuts: space/media keys for play-pause, J/L for seek, M for mute) as a gift to the project.
Contributor
|
Please link this PR to an existing issue you are assigned to. Assignees are expected to discuss the details of the PR beforehand. This PR will be closed if it is not linked to an issue. |
Author
Hardware keyboard users reported that arrow keys initiate focus jumps between player UI elements instead of seeking. On non-TV devices, LEFT/RIGHT now seek and D-pad-center toggles playback. TV D-pad navigation behavior is unchanged.
|
Author
Member
|
Closing this due to no violating contribution guidelines. |
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.



Implements #8981 (long-press "Clear cache" action on the app icon) and partially implements #10448 (keyboard shortcuts in the player).
What is it?
Description of the changes in PR
ClearCacheActivitythat wipes the metadata cache (InfoCache) and Coil's image memory + disk caches, shows a toast, and returns to the previous screen without opening the app. Registered viares/xml/shortcuts.xml, so it appears when long-pressing the app icon. The shortcut intent resolves through the activity's intent-filter instead of a hardcodedtargetPackage, because debug builds use anapplicationIdSuffix.VideoPlayerUi.onKeyDown()—Space/ media play-pause → play/pause,J/L→ seek backward / forward,M/ volume-mute → toggle mute. Applies to both mini and fullscreen players; the existing fullscreen Space behavior inMainPlayerUiis unchanged.Before/After Screenshots/Screen Record
Fixes the following issue(s)
Note: #10448 is only partially implemented (play-pause, seek, mute); full shortcut support including arrow-key seek would need more discussion with maintainers.
Relies on the following changes
Testing/QA
Devices
devbranch source only.Steps for testing
Space(toggles play/pause),J/L(seek backward/forward),M(mute/unmute).APK for testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence