-
-
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
[Android 8.0+] Add Android Picture in Picture support #2223
Comments
Sad. Google is 100% annoying recently. So yea I guess we need pip now. We might also need help for that. |
It seems like it was a bug, or a test with Android Q beta that has been reverted ( https://teddit.net/r/Android/comments/b5y1yz/allow_display_over_other_apps_and_other/ ). The issue stays open because we should still implement Android's picture in picture. |
@B0pol Does PiP lack or implement any features different from NewPipe's popup player? |
It lacks resizability on Android 10- (new feature in android 11) and I think we can add buttons (speed, subtitles) but I'm not sure. But then because it does not bring a lot of benefits, it does not have a high priority indeed. |
Then we should probably wait until the minimum Google-supported Android version is 11, which will take 3 years, I think. |
With the advent of Android 12, overlays have become restrictive to the point that activating them essentially renders all other OS interaction useless. https://developer.android.com/about/versions/12/behavior-changes-all#untrusted-touch-events The Android 12 PiP now supports resizing and even includes features NewPipe currently does not support: "stashing" and smooth transitioning when exiting PiP. And, speaking of which, the gesture to dismiss PiP is now effortless. You don't have to carefully target a specific touch point, you just fling the window down vaguely toward the bottom and Android gets the gist and closes it for you. The time to move on to PiP is now (at least for Android 12+). |
Alternatively, it seems one could use ADB as a workaround on an individual basis:
|
I would take on this issue as a direct victim of the changes Google introduced 😅 But first I would like to address the issue of compatibility with the existing popup. In my opinion the best solutions would be to either make the PiP player dependent on the Android version (Starting with the first that needs it -> 12.0+) or as already mentioned by @dbenjaminmiller on #6770 as an option in the player settings. Personally I prefer the first one, as it is more user friendly, but with the ability to switch back to the old popup player. Any opinions on this? |
I agree here. The option in the menu should be a drop-down between:
Providing an option is good in case one has problems, and the overlay version should stay in place in the event that either Google makes a fix (such as adding a permission to allow overlay touches) or the user is on a previous version of Android. Please let us know about your progress as work continues. |
Agree with @mastereric drop-down menu. Defaulting on auto but being able to overrule it would be great for everyones needs. |
@schnatzi assigned. :) |
@schnatzi Any progress with this? |
Because of the lack of response of @schnatzi, someone else can now work on this issue. Free feel to ask for help if you have difficulties to implement this feature here and on our IRC channel. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@TiA4f8R: Sorry, I missed the notification. I haven't made significant progress on this matter. I failed to locate the current code for the popup player or as I understand the fragment which it is part of. I didn't follow up on this, because I'm currently involved with other stuff. If nobody else is going to implement this, I will pick it up again, but I have to take some exams first 🥲 |
If it's not done by the player and all its components rewrite, I suggest to work on this only after the player rewrite is done. |
This comment was marked as spam.
This comment was marked as spam.
Curiously, this seems to be working for me with version 0.23.1 on my S22 Ultra. On prior versions, picture-in-pucture was not working. |
@infinitytec that bug was fixed in #8279. Note that we're still not using Android's PiP player, but our own custom popup player. |
Note that the player rewrite has been completed. Nothing should prevent now tries to implement this feature, even if changes to its structure/core may be required! |
With the latest Android Q beta release, apps installed outside the play store have their Screen Overlay permission revoked in 30 seconds after enabling them. This is to track down and stop shady apk apps which abuse the screen overlay option and get users to click on things they didn't mean to, malware etc. More info in article below
https://www.androidpolice.com/2019/03/16/android-q-steps-up-the-fight-up-against-overlay-based-malware/
Problem is, NewPipe uses screen overlay for the popup and having to re-enable the permission every time a new popup video is being played... The ideal solution is to switch to the native PIP mode from Oreo API 26 and up, and leave the existing floating player code for Android Nougat and older.
https://developer.android.com/guide/topics/ui/picture-in-picture
Slowly as dev time goes on and more users move to Oreo and higher, the floating player method can switch to PIP completely.
The text was updated successfully, but these errors were encountered: