Skip to content
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

Picture-In-Picture does not open when app is backgrounded on iOS #347

Open
paulrinaldi opened this issue Mar 8, 2024 · 2 comments
Open

Comments

@paulrinaldi
Copy link

paulrinaldi commented Mar 8, 2024

Versioning & OS:
iPhone 15 Pro
iOS 17.2
"react-native-jw-media-player": "^0.2.44"

Relevant code block

<JWPlayer
  playerId={"myPlayer"}
  onLayout={this.props.onLayout}
  onTime={(event) => {
    ...
  }}
  onPlay={() => {
    ...
  }}
  onPause={() => {
     ...
   }}
  ref={p => (this.JWPlayer = p)}
  key={this.props.tag}
  style={[{flex: 1}]}
  config={{
     autostart: true,
     fullScreenOnLandscape: true,
     landscapeOnFullScreen: true,
     portraitOnExitFullScreen: true,
     exitFullScreenOnPortrait: true,
     enableLockScreenControls: false,
     backgroundAudioEnabled: true,
     playlist: [
       {
         tracks: this.getTracks(),
         file: this.props.url,
         image: getStoryImageUri(
           this.props.mediaItemImage,
           DEFAULT_CONTENT_IMAGE
         ),
       }
     ],
    license: Platform.select({ios: "...", android: "..."})
  }}
  pipEnabled={true}
/>

Steps to Reproduce:
Load JW Player with a video url and press play.
Screenshot 2024-03-08 at 2 46 24 PM
Press home button on iPhone.

Actual:
The home screen is visible.
Screenshot 2024-03-08 at 2 46 45 PM

Expected:
The home screen is visible. A small window of the video still present and playing.

Would this be because iPhone 15 Pro doesn't support PiP? [Edit: I doubt this is the case, due to reddit discussion]

Or perhaps more likely, PiP is disabled somehow as the docs point out.

@paulrinaldi
Copy link
Author

Added Capability via XCode 'Background Modes' and within that selected Audio, Airplay, and Picture in Picture...

@paulrinaldi
Copy link
Author

Still same result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant