insidegui / WWDC

The unofficial WWDC app for macOS
https://wwdc.io
BSD 2-Clause "Simplified" License
8.6k stars 777 forks source link

Use AVPictureInPictureController for supporting picture-in-picture #691

Closed allenhumphreys closed 1 year ago

insidegui commented 1 year ago

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

dreness commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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!

insidegui commented 1 year ago

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