Add 2x speed hold for mobile and desktop#187
Open
fivepandasna wants to merge 2 commits into
Open
Conversation
Fixes build error
Author
|
I thought that builds were fine but I was looking at a workflow run from before I amended a commit, apologies. I fixed the build error and retested on iOS, all is the same. I will test again on Windows and update if there are any issues, but there shouldn't be. |
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.
Summary
Adds long-press 2x speed hold for mobile and extends the existing TV speed hold to desktop. Includes minor renames to reflect that the speed constant and restore method are now shared across supported platforms.
Related Issues
Type of Change
Changes Made
_mobileTemporarySpeedHoldActive/_mobileTemporarySpeedRestoreSpeedstate variables for mobile hold tracking_canUseMobileTemporarySpeedHold,_activateMobileTemporarySpeedHold, and_cancelMobileTemporarySpeedHoldto implement long-press 2x speed on mobileonLongPress/onLongPressEndon the mainGestureDetectorto activate/cancel the mobile speed hold_canUseTvTemporarySpeedHoldand the key event handler to includeuseDesktopUi, enabling the media key hold for 2× speed on desktop_cancelMobileTemporarySpeedHoldindisposeanddidChangeAppLifecycleStateto clean up properly_tvTemporarySpeed→_temporarySpeedand_restoreTvTemporarySpeed→_restoreTemporarySpeedsince both are now shared across TV, mobile, and desktopPlatform
Testing
Test Steps
Screenshots (if applicable)
N/A
Checklist
Notes
There should probably be some sort of indicator for when the video is on 2x speed, maybe near the top of the player. It may also be a good idea to use the space bar/left click on desktop for 2x, but I left it to media keys for now.
I also had some troubles with unlocking the OSD during testing, however I also experienced these on stable 1.4.0, so I don't think they're related to these changes.