Closed KestasVenslauskas closed 4 months ago
Hi @KestasVenslauskas ,
The PiP presentation mode gets the visible rectangle of the player screen and passes this to the PiP parameters when transitioning to PiP.
So I wouldn't expect to see the action bar here. Can you check if the visible rectangle is computed correctly here? As a workaround you could also experiment with hiding/showing the action bar when transitioning to/from PiP.
Additionally, you can also contact us through the service desk to pass some relevant app code. In that case the issue will flow through our regular defect flow.
Everyting works fine if I make a full screen layout will test different layouting options
@tvanlaerhoven
So I tried to play around with layouts. To get the best results I tried to use as minimal layout as possible:
My findings:
If a player is at the top of the screen & screen is without header so there is nothing above the player it works fine. Rect(0, 66 - 1080, 673)
I tried adding text "test" on over the video player. Rect(0, 119 - 1080, 726)
Added 2 more "test" texts on top & 2 "test" texts on bottom Rect(0, 225 - 1080, 832)
@KestasVenslauskas we'll take it up internally
Hey @KestasVenslauskas , following up on the issue above. Was this solved?
We do set a sourceRectHint
in our code, as mentioned before, but this is only for the transition from/to PiP. The screen's layout needs to make sure no other UI elements are visible:
https://developer.android.com/develop/ui/views/picture-in-picture#best
PiP is intended for activities that play full-screen video. When switching your activity into PiP mode, avoid showing anything except video content. Track when your activity enters PiP mode and hide UI elements, as described in Handling UI during PiP.
So in the example above, the "test" Text element would need to be hidden in PiP mode:
{presentationMode !== PresentationMode.pip && <Text>test</Text>}
@KestasVenslauskas closing this ticket for now. Let us know in case you need additional support.
When trying to use PIP on android while player is not a fullscreen view it renders just the top of the screen:
Here is that screen: