chaimPaneth / react-native-jw-media-player

React-Native Android/iOS bridge for JWPlayer SDK (https://www.jwplayer.com/)
MIT License
193 stars 91 forks source link

PIP mode #258

Open DevanshuQuovantis opened 1 year ago

DevanshuQuovantis commented 1 year ago

PIP mode somehow is not working. Either the PIP button(present at top right corner with chromecast and airplay button) is disabled or not showing. In the document, it is written that PIP can only be worked when viewOnly prop is true, and I have tried doing so, but still PIP is not working. Additionally, we would want to have PIP even when viewOnly is false. I have checked @chaimPaneth's answer in this issue and still Picture in Picture is not working. Any way to enable Picture In Picture for both platforms i.e. android/ios?

I am on the latest version of the library "react-native-jw-media-player": "^0.2.33"

chaimPaneth commented 1 year ago

Did you enable for background modes, audio capabilities in XCode and are you passing backgroundAudioEnabled: true? prop also might help to pass category: 'Playback', categoryOptions: ['AllowBluetooth'], mode: 'SpokenAudio', also are you testing on real device or simulator, PIP doesn't work in the simulator.

the viewOnly prop basically means that under the hood we only render a simple view displaying the videos with no controls no casting no nothing just a view, when viewOnly is false (default) then we render a ViewController with controls, PIP handling, casting etc so the controller is the better option for PIP as it handles everything automatically - when it works :-)

Does the above help you?

Thanks.

vanditmehta commented 1 year ago

Getting some issue on android also 1673015872704 after closing player screen if I go to background then this is how it is showing me.

vanditmehta commented 1 year ago

Above issue I am getting on iOS as well

vanditmehta commented 1 year ago

@chaimPaneth can you help with this?

geoff-schultz commented 1 year ago

I am also experiencing this on android emulator, when i press the PiP button the view minimizes down(still showing the video) but once it is in position the whole app rerenders back to the entry point of the application.

geoff-schultz commented 1 year ago

Was just able to confirm this is happening in the example android app as well, the only change made to the Player was the addition of the pipEnabled flag.

image