How can I run a YouTube video in Picture in Picture mode on iOS?
iOS enables PIP easily, there are standard ways to classify all video and unless the web site takes active measures to disable PIP it just works.
Youtube has continually taken steps to disable and remove PIP functionality on iOS, but there are a still few ways to bypass their efforts to control how you consume their video content and watch Picture in Picture:

Bite the bullet and subscribe to Youtube Premium (AKA Youtube Red). If you subscribe to Google Music, it is included. To watch PIP with Youtube Red, swipe down or diagonally across the video to minimize it. Plays in bottom right corner.

Use an app to open and process the links. I found links to two, but can't vouch for either one. Including name of developer in case the location of link changes at some point:



Cornertube by Tiny Whale Pte. Ltd.
https://itunes.apple.com/US/app/id1073199994?mt=8 costs $2.99

Pipifier, made by Arno Appenzeller, can be found at
https://itunes.apple.com/app/pipifier-pip-for-nearly-every/id1160374471?mt=12
free app

Scriptable.app with this YouTube PIP script - both are free



An alternative that needs no payment or extra apps is Safari in split view. This is a part of iOS and is documented at https://support.apple.com/en-us/HT207582.
How to use Split View:

Open an app. Swipe up from the bottom of the screen to open the Dock.

On the Dock, touch &amp; hold the second app that you want to open, then drag it off the dock.

When the app opens in Slide Over, drag the dash icon down.


This question was answered a few years back at How do I play a YouTube video in the background on my iPad? but the solution doesn't work on iOS 10+.