Open seanmaisch opened 1 month ago
So player is going into Picture in Picture even if pictureInPicture
is set to false? - this is unexpected
Correct. In the example mentioned by @jcksncllwy in https://github.com/TheWidlarzGroup/react-native-video/issues/2373#issuecomment-1537235603, they are attempting to use the video player as a background element and when switching the application, it opens the video player in PIP.
My use-case where the issue is presenting itself is as follows:
We have a "preview" video for users who are not paid users. They are only allowed to watch for a certain amount of time, but if they switch away from the application (via ExternalLink) to convert to a paid user, the video follows them outside of the application and they are able to continue to watch in the "pop out" / "picture-in-picture" mode indefinitely, which is problematic for us.
This issue is stale because it has been open for 30 days with no activity. If there won't be any activity in the next 14 days, this issue will be closed automatically.
When a user navigates away from our app, whether it be by switching apps manually or externally linking to the web, the video player enters "pop out" mode, which can be construed by some as
pictureInPicture
.Simply setting
pictureInPicture={false}
does not rectify this issue. We would really like to prevent iOS from popping the player out when leaving the application. One solution I considered, but would like to avoid due to performance issues and poor user experience, would be to completely unload the player when the app loses focus or is inactive, but that seems like a nuclear option.Is there any way to prevent this behavior, or any plan on adding support for a feature like this?
Referenced as well by @jcksncllwy in https://github.com/TheWidlarzGroup/react-native-video/issues/2373#issuecomment-1537235603