-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Unified Player seekbar not appearing on Android 11 #4277
Comments
Can you confirm that this or a similar problem doesn't appear on any other media players like VLC and mpv-android? |
Can confirm the stock YouTube app does not have similar issue, and VLC also does not have a similar issue on latest stable 3.2.12 https://get.videolan.org/vlc-android/3.2.12/, and the latest nightly VLC-Android-3.3.0-armv8-20200913-0135.apk from https://artifacts.videolan.org/vlc-android/nightly-arm64/. |
Try my latest test version. It should handle gesture navigation correctly, although I've only been able to test it on Android 10. |
I can see that it's correctly applying insets, but it looks like your status bar and navigation heights are being reported incorrectly. Could you please try this test version and let me know the values that it displays? |
@blackbox87 see the deprecation notice, maybe it's what we need. Some flags we use also deprecated so some of new methods may be used instead |
@blackbox87 Values are as follows: |
So hideSystemUi and showSystemUi should be aware about android 11 methods |
@avently Maybe it's caused by that, but I'm not sure. The status bar height shouldn't be greater than the navbar on a device without a cutout though. Honestly, the way I'm fixing most of these issues is more of a hack than a true fix. To do it correctly you'd need to recreate the video player so that it's aware of insets and applies them correctly without all of the calculations that I'm currently having to do. |
In this case navbar is a thin line which has less height than status bar by visual comparison.
Do you know how to do it? It's easy to do in separate activity (just for a player) but not for activity with other fragments. Also the video should be below navbar while other controls should be side-by-side with it. I don't know how to do it without custom calculations |
Actually I know that in theory we can use insets even here but it's hard to do. MainActivity should always be in contact with videodetalfragment. So whenever insets changes new values should be sent to the fragment which should apply side padding to some views. It's possible, maybe even easier than our calculations but I don't have time on testing this idea. Maybe some day |
Actually it's not. The value is for the traditional navbar and the gesture controls are handled by insets. I couldn't get a value to return from this though, so I'm using the navbar height + 4dp of extra padding. It works perfectly on Android 10.
No, otherwise I would of done it already. But I'm going to see if it's possible to add padding to the root view instead of specific controls. |
@ZeroPucks Does everything work correctly if you disable gesture navigation? |
Unfortunately no, seekbar is still off-screen with 3-button and 2-button navigation. The fullscreen minimize button is now partially visible. There is more of the video visible, but a portion of the bottom is still cut off. Again this is on a 18.5:9 screen ratio (2220x1080) on Android 11. |
@avently Here's another test version. It contains my changes, but I've also compiled it against API 30 so that I could try out setDecorFitsSystemWindows(). |
No difference from the last APK, seekbar is still partially off-screen. Appreciate you trying, though. Hopefully someone else on Android 11 can test to make sure it isn't just my device. |
I'll see if I can setup an emulator with Android 11 to try some stuff. I'm currently low on disk space which is why I haven't done that already. |
Please, check this one. Works ok on emulator |
@avently Thank you, the status bar is no longer persistent, video is completely visible, and the seekbar is now mostly visible. There is an opaque gesture navigation bar when the UI elements appear, but as you said it works okay. The seekbar is completely visible when using 3-button and 2-button navigation: |
Combined with my changes it'd likely fully fix the problem. I'm not sure what @avently changed though, so can't copy his changes into my build. |
This will be probably fixed by @blackbox87's work so you'll get fully working app. Thank you for detailed issue and testing! |
@avently and @blackbox87 Thank you both for looking into this issue and working to resolve! Hopefully the changes can be merged with the notification changes in #3178 for a fully-compatible Android 11 build. |
Here's my changes with the Android 11 changes from @avently @ZeroPucks There's still some issues though, like the fact that the status bar and navigation bar should be transparent. I don't know if my previous test build fixed that for you? |
Thank you @blackbox87, the seekbar is now completely visible and actionable. As you mention, status bar and navigation bar are still opaque. Unfortunately, previous test builds did not change that behavior. Small price to pay, if you ask me. Big thanks to you and to @avently again for the very fast work to diagnose and fix. |
Try this one. Status bar and navigation bar will be transparent. This apk doesn't include @blackbox87 changes. If everything is fine, I'll upload changes to #4272 |
@blackbox87 since you have Android 10, do you see red status bar in fullscreen? Or it's only Android 11 problem? I can apply my status bar fix for Android 10 too if it's needed. |
@avently: That red status bar looks a bit like energy saving mode. On my Android 10 phone, I don't see the status bar, but I don't think I can test with energy saving mode, because of Samsung's weird One UI. Edit: Wait… NewPipe is also red, duh… |
I installed an Android 10 ROM to test things, but went back to my Android 9 backup. Luckily I still have screenshots though, so I can confirm that the issues unique to Android 11. On Android 10 the status bar, navigation bar and gesture bar are all transparent. |
Confirmed, status bar and navigation bar are transparent on Android 11 with gesture navigation. As you said, it does not include @blackbox87 changes so the seekbar padding isn't quite there. But everything is on-screen and transparent as advertised. |
Version
0.19.8 pr3178 from Notification Improvements #3178
https:/TeamNewPipe/NewPipe/files/5204058/app-debug.zip
0.19.8 530f745 from Prevent jumping of the player and wrong padding on devices with cutout #4154
https:/TeamNewPipe/NewPipe/files/5190324/app-debug.zip
0.19.8 from Center videos correctly & fix padding for controls #4255
https:/TeamNewPipe/NewPipe/files/5196395/app-debug.zip
Steps to reproduce the bug
Expected behavior
The seekbar should appear with timestamps, and status bar should disappear.
Actual behaviour
Seekbar does not appear, and status bar is a persistent red bar across top of video, even when the other UI elements are gone.
Screenshots/Screen recordings
Unified Player APKs:
Stable release APK 0.19.8 from 2020-07-28:
https:/TeamNewPipe/NewPipe/releases/download/v0.19.8/NewPipe_v0.19.8.apk
Logs
N/A
Notes
Screenshots taken on Pixel 3a (2220x1080 resolution, no cutouts or notches) running Android 11, sideloaded OTA and factory reset.
The text was updated successfully, but these errors were encountered: