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

Use AVPictureInPictureController for supporting picture-in-picture #691

Merged
merged 5 commits into from
Jun 8, 2023

Conversation

allenhumphreys
Copy link
Collaborator

No description provided.

@insidegui
Copy link
Owner

Amazing that this has been working for so long without it ever breaking in newer OS versions (I think)

@dreness
Copy link

dreness commented Jun 8, 2023

Amazing that this has been working for so long without it ever breaking in newer OS versions (I think)

fascinating :) This suggests that whoever is providing PIPViewControllerDelegate has a pretty defensible position, isolated from the substantial changes in window management and graphics frameworks since 2015 (when this app was born, according to git log).

@allenhumphreys
Copy link
Collaborator Author

The biggest difference in the api surface seems to be we cannot distinguish between the return button and the close button.

The upside is I think all the goofy layer moving code can be removed. Pros and cons, but we've been talking about simplifying implementation as a theme going forward, so the minor experience change is probably worth it.

@allenhumphreys
Copy link
Collaborator Author

allenhumphreys commented Jun 8, 2023

Seems we spoke too soon, the PIP button in the player UI cannot exit PIP! Also, the private API cannot replace a PiP video that is playing from another application, while the public API can!

@allenhumphreys allenhumphreys changed the title Ok, hear me out, no more private API usage Use AVPictureInPictureController for supporting picture-in-picture Jun 8, 2023
@allenhumphreys allenhumphreys force-pushed the ah/public-pip branch 2 times, most recently from 421c9fb to a9654d5 Compare June 8, 2023 14:10
@allenhumphreys allenhumphreys marked this pull request as ready for review June 8, 2023 14:12
@insidegui insidegui merged commit 78b29db into master Jun 8, 2023
@insidegui
Copy link
Owner

Tested in macOS 12, 13, and 14 beta, didn't find any issues ✅

@allenhumphreys allenhumphreys deleted the ah/public-pip branch June 22, 2023 00:01
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

Successfully merging this pull request may close these issues.

3 participants