NewPipe
NewPipe copied to clipboard
Fix persistent hover overlay when in desktop/DeX mode or using a mouse/non-touch input
What is it?
- [x] Bugfix (user facing)
- [ ] Feature (user facing)
- [ ] Codebase improvement (dev facing)
- [ ] Meta improvement to the project (dev facing)
Description of the changes in your PR
A non-touch input device that supports hover events results in a persistent transparent overlay on top of the video player. When using an Android device in desktop mode or with a mouse, the content is obscured with said overlay.
The bug was first reported here: https://github.com/TeamNewPipe/NewPipe/issues/4357
This PR adds an isDesktopMode
check and removes the hover overlay for the detailThumbnailRootLayout
only when in desktop mode (DeX, Android desktop, etc.)
Before/After Screenshots/Screen Record
-
Before:
-
After:
Fixes the following issue(s)
- Fixes #4357
APK testing
APK for testing: app-debug.apk.zip
Due diligence
- [x] I read the contribution guidelines.
I see the same problem on my random cheap android tv shitbox (X88 Pro 10) so I tried this patch. As it is it doesn't help, because DeviceUtils.isDesktopMode
doesn't return true
, if I remove the condition it does work. Not sure if there's another way to detect usage as tv box, or an attached mouse (since presumably this would be annoying regardless of platform.)
edit: #4422 says that there are more devices / conditions where this overlay appears unwantedly. Maybe just disabling it unconditionally would be an option, since the player is highlighted by a border as well?
I've added a check for devices with cursors: https://github.com/cybersphinx/NewPipe/commit/e86a34b1c4eedead1bc791b7869c03f833f5265a (full branch)
With this it works on my tv box (and phone with attached mouse), I don't have any of the fancy devices mentioned in #4422 with stylus or finger hover detection.
There's an SDK version check around it that can/should be removed if minSdk is raised to 21.
There's an SDK version check around it that can/should be removed if minSdk is raised to 21.
The barrier has been lifted.
Updated my branch to remove the check, and fix a silly oversight.
@cybersphinx do you want me to add your commits here? Or do you want to open a new PR?
If you can add them here I guess that's the best place.
Done; @litetex could you review again?
I rebased the PR and pushed a commit to the branch which improves the code added, let me know if it is good for you :)
Thanks @AudricV, looks good to me!
Issue solved in v0.25.0.