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 restoration does not work when running as iPadOS app on macOS #760

Open
1 task done
defagos opened this issue Feb 7, 2024 · 2 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@defagos
Copy link
Member

defagos commented Feb 7, 2024

Description of the problem

Picture in Picture restoration does not work when an iPadOS app is run on macOS.

The reason is that the PiP lifecycle is not consistent between platforms when restoring via the dedicated button:

  • iOS, iPadOS, tvOS: restore, will stop, did stop
  • iPadOS on macOS: will stop, restore, did stop

I suspect this is a macOS issue since the lifecycle is documented on tvOS when swapping players. This should be reported to Apple.

In the meantime it might be possible to fix the macOS behavior to make it consistent with iOS, iPadOS and tvOS. If not possible reliably then we should likely do nothing and wait for an official fix. Reliable means that all usual use cases should work on all platforms.

Relevant stack trace or log output

No response

Reproducibility

Always

Steps to reproduce

  1. Open the demo.
  2. Play the Fondue example.
  3. Enable PiP.
  4. Restore from PiP. PiP closes.

Library version

0.9.0

Operating system

macOS 14.3

Code sample

No response

Is there an existing issue for this?

  • I have searched existing issues and found no similar bug report.
@defagos defagos added bug Something isn't working triage Requires triage first and removed triage Requires triage first labels Feb 7, 2024
@defagos
Copy link
Member Author

defagos commented Feb 7, 2024

One tempting fix would be to set previousPresented to nil in the did stop method of Router but this does not work with all the use cases we have (e.g. normal to transition 360° via PiP). We probably should carefully study in which order the PiP delegate methods are called in all scenarios we have if we want to find whether a fix is possible or not. This order is namely different whether we are restoring via the dedicated button or by switching to another content.

@defagos
Copy link
Member Author

defagos commented Oct 4, 2024

The order is the following when restoring via the PiP overlay restoration button:

  • iPhone / iPad device: restore, will stop, did stop
  • iPad on macOS: will stop, restore, did stop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant