-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
PIP support for android in case of nested screen #1858
Comments
Hi @nitesh3539, the above described scenario is not an ideal case for PIP mode. PiP mode in general behaves differently on each platform, like this: So far, PiP mode as is, is working only on Android and iOS (iPad ONLY!)
But the case you are describing is fully achievable by styles of the player window (if player is screen B). I have it like this in several projects already. All those examples are combination of styles and PanResponers, and obviously it's working on all platforms. |
can you reference me with a set of code ? Thanks |
Hi @matejpolak please update me on this. I need a neet explanation for this. Thanks |
Hi @nitesh3539, please think about the player as of any other UI element like a div or View for example. You can style it in any way you like, you can for example make it rounded and bouncing on the screen, same as any other element. So in my case, I have a MiniPlayerContainer component, which receiver all the player UI elements and Video component as a children prop and render it like this.
In the code above, width and height are either 100 and 100 (fullscreen player), or any other value like 25 and 30 (landscape miniplayer). Hope this helps. Please consider this as a non tested raw snippet explaining my idea behind it. |
And for the swipe gesture, you can use something like this: https://medium.com/@andi.gu.ca/exploring-react-natives-panresponder-and-layoutanimation-dde77e7f4cc9. But again, please, this is only my idea, and there are of course similar/better/more... ways how to achieve above described behavior. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you are having a similar problem, please open a new issue and reference this one instead of commenting on a stale or closed issue. |
I want to use PIP mode in child screen such that PIP mode comes on top of parent screen.
Like if we have parent screen A and child screen B, If we are in screen B and want to allow Screen B to go In PIP mode, Then , screen B comes as PIP mode on top of Screen A.
Please help me out.
Thanks
The text was updated successfully, but these errors were encountered: