iOS 14 brought Picture in Picture support to the iPhone. Unfortunately, YouTube only supports PiP for YouTube Premium subscribers. It used to work without a YouTube Premium subscription using mobile Safari but YouTube recently disabled this functionality.
Good news: There is a simple workaround. I built a little website and iOS shortcut, so one can easily open a YouTube video in mobile Safari and then use PiP again! ✨ See it in action here.
How does it work?
The website accepts a URL parameter with a YouTube URL or video ID. It then shows an iFrame for the particular video. You can find the code here.
The shortcut accepts a URL and then builds the needed URL for the website, e.g. https://6d4uz.csb.app?v=https://www.youtube.com/watch?v=Obgnr9pc820. Thanks for the help with Shortcuts, Philipp!
Let's hope, YouTube does not disable PiP for iFrames as well.