With the new iOS 14 update, you can allow movies, videos and TV shows to be watched in picture in picture mode which is a small window without leaving the active tasks on your iPhone or iPad. Many applications like Hotstar, Netflix etc supports this PIP feature.
Sadly, for now this support is not yet available to YouTube application but you can still take the advantage of YouTube Picture in Picture mode on iPhone or iPad through Safari web browser by creating a simple shortcut. Let me show you how.
YouTube Picture in Picture (PIP) Mode on iPhone/iPad
- First of all, launch the Shortcuts application on your iPhone then tap on this + icon to create a new shortcut.
- Now tap on ‘Web page’ label then select ‘Shortcut Input’ in the pop-up menu.
- Here you must remove the existing code and copy and paste the following code.
let v = document.querySelector('video'); v.addEventListener('webkitpresentationmodechanged', (e)=>e.stopPropagation(), true); setTimeout(()=>v.webkitSetPresentationMode('picture-in-picture'), 3000); completion()
- Now tap on these three dots then name your Shortcut. I’m naming it as Y PIP.
- Now, enable ‘Show in Share Sheet’ then tap on ‘Share Sheet Types’, choose ‘Deselect All’ then select only ‘Safari web pages’.
- Come back to the details screen then choose ‘Done’ and again confirm the shortcut by choosing ‘Done’ again.
- Now open YouTube on Safari web browser then pick your favorite video. Tap the share icon and here choose the created shortcut for the YouTube Picture in Picture mode on iPhone or iPad. For the first time, you need to allow the script to run on Safari.
- Finally, refresh or relaunch the browser then choose the YouTube video the tap on Action icon and here select the created shortcut.
That’s it. You can now move the YouTube PIP window anywhere on the screen and can do other things on the iPhone or iPad.