Skip to content
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

feat(YouTube): Add Exit fullscreen mode patch #4223

Merged

Conversation

LisoUseInAIKyrios
Copy link
Contributor

@LisoUseInAIKyrios LisoUseInAIKyrios commented Dec 26, 2024

Adds an option to exit fullscreen mode at the end of a video.

Works well with Open Shorts in regular player and the fullscreen player.

@LisoUseInAIKyrios LisoUseInAIKyrios linked an issue Dec 26, 2024 that may be closed by this pull request
3 tasks
@0xrxL
Copy link

0xrxL commented Dec 26, 2024

It was easier than I thought 😁

@LisoUseInAIKyrios
Copy link
Contributor Author

Very. I spent longer typing out all the boiler plate code and resources than making the actual patch.

@MarcaDian
Copy link
Contributor

MarcaDian commented Dec 26, 2024

Continuing the idea, it would be cool to add the ability not to exit full-screen mode when returning to the player, for example, after unlocking the screen.
If I remember correctly, Vanced had this feature.

@0xrxL
Copy link

0xrxL commented Dec 26, 2024

Continuing the idea, it would be cool to add the ability not to exit full-screen mode when returning to the player, for example, after unlocking the screen.

LOL...you can save the previous player state in a field and use this to send a onClick() event to the same button again...once the player quit from fullscreen.

@0xrxL
Copy link

0xrxL commented Dec 26, 2024

...but, honestly, idk if this approach will increase the patch complexity too much.

@LisoUseInAIKyrios
Copy link
Contributor Author

It might be easier, and probably more reliable, to instead patch the logic that switches from fullscreen to portrait when the app is resumed.

@MarcaDian
Copy link
Contributor

LOL...you can save the previous player state in a field and use this to send a onClick() event to the same button again.

I once used a similar function in another fork, but there was a bug in PiP mode on some firmwares (in my case, MIUI), although no such bug was detected in others.
YT-Advanced/ReX-patches#86

@0xrxL
Copy link

0xrxL commented Dec 26, 2024

@LisoUseInAIKyrios yeah, it is, but if you want to speed up the patch development...xD

@LisoUseInAIKyrios

This comment was marked as resolved.

@MarcaDian

This comment was marked as resolved.

@LisoUseInAIKyrios

This comment was marked as resolved.

@LisoUseInAIKyrios LisoUseInAIKyrios merged commit bb5d03b into ReVanced:dev Dec 27, 2024
1 check passed
@LisoUseInAIKyrios LisoUseInAIKyrios deleted the feat/exit_fullscreen branch December 27, 2024 06:25
github-actions bot pushed a commit that referenced this pull request Dec 27, 2024
# [5.8.0-dev.4](v5.8.0-dev.3...v5.8.0-dev.4) (2024-12-27)

### Bug Fixes

* **GmsCore support:** Do not show battery optimization error on Android Automotive devices (Google built-in) ([#4218](#4218)) ([d6e389c](d6e389c))

### Features

* **Swipe controls:** Add option to enable/disable fullscreen swipe to next video ([#4222](#4222)) ([119092f](119092f))
* **YouTube:** Add `Exit fullscreen mode` patch ([#4223](#4223)) ([bb5d03b](bb5d03b))
github-actions bot pushed a commit that referenced this pull request Dec 30, 2024
# [5.8.0](v5.7.2...v5.8.0) (2024-12-30)

### Bug Fixes

* **GmsCore support:** Do not show battery optimization error on Android Automotive devices (Google built-in) ([#4218](#4218)) ([d6e389c](d6e389c))
* **YouTube - Exit fullscreen mode:** Exit fullscreen mode of first video opened after cold start ([be5cf2e](be5cf2e))
* **YouTube - Force original audio:** If stream spoofing to Android then show a summary text why force audio is not available ([#4220](#4220)) ([029aee8](029aee8))
* **YouTube - Spoof video streams:** Ignore harmless error toast if hide ads is disabled ([c3423bb](c3423bb))

### Features

* **Swipe controls:** Add option to enable/disable fullscreen swipe to next video ([#4222](#4222)) ([119092f](119092f))
* **YouTube - Hide Shorts components:** Add option to hide Shorts in watch history ([#4214](#4214)) ([19c2742](19c2742))
* **YouTube - Spoof app version:** Add 'Restore old navigation and toolbar icons' ([f84e459](f84e459))
* **YouTube:** Add `Change form factor` patch ([#4217](#4217)) ([644ac5b](644ac5b))
* **YouTube:** Add `Exit fullscreen mode` patch ([#4223](#4223)) ([bb5d03b](bb5d03b))
* **YouTube:** Add in app option to select a preferred language for ReVanced specific text ([#4231](#4231)) ([3932af3](3932af3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(YouTube): Exit fullscreen mode when video ends
4 participants