This message was deleted.
# helpdesk
s
This message was deleted.
f
@eager-raincoat-52616 @dry-elephant-14928, is PIP mode something supported as design in RN sdk? Thanks.
e
it’s not something we currently support at the moment. what are you using for pip support at the moment?
f
we used Android's PIP mode to support PIP, in the RN part when enters the PIP mode, we restructured the layout to the small window.
e
are you calling the android pip mode directly, or using another RN library for that?
f
The way works is: When pip butter is pressed, RN will tell android we are going to PIP mode, then Android will move the activity to PIP mode, then RN will adjust the elements in the page to a smaller window
e
I mean are you just calling
Activity.enterPictureInPictureMode()
in native code or are you using another RN library for that?
f
Activity.enterPictureInPictureMode() is called
e
looks like RN pauses timeouts and intervals when the app is in the background, this’ll need some work to fix
for knowing when the app enters PIP, you can see how this library does it (or just use this library): https://github.com/adkaushik/react-native-pip-android
there’s a native callback upon entering pip mode, just send an event back to RN when it’s called.
f
Client-ask-is also needs to know whether app goes to pip mode or not for the sake of issue I met above.
e
the appVisibilityChangedListener is something separate and isn’t what’s causing the issue with the ping timeouts here
that’s for adaptive streaming
f
The ping timeout is caused by js goes into pip background modes till back, if longer than 20 s, then timeout happens. We need a way to know whether app goes to pip or background so that we can do some work around such as delete the timer when app goes to background or pip mode
e
Again, the linked library above can help you do that