Get Picture-in-Picture Mode Working in YouTube Safari on iOS 14

So, what are the requirements to force YouTube PiP mode to work in Apple Safari? Well, you have to create a custom shortcut using the Shortcuts app. Once you have created and customized the YouTube PiP mode shortcut on your iOS device, it’s business as usual. Now that, you have got the sneak peek into how this hack works, it’s time to get going with quick steps!

Create YouTube PiP Mode Shortcut Using Shortcuts App  Play YouTube Video in Picture-in-Picture Mode Using Safari 

Create YouTube PiP Mode Shortcut Using Shortcuts App

  1. First off, open Shortcuts app on your iPhone or iPad and tap on the “+” button at the top right corner of the screen.

  2. Now, tap on the Add Action button.

  3. Next, choose Web.

  4. Next, select “Run JavaScript on Web Page” under Safari section.

  5. Tap on Web Page option which is right next to Run JavaScript and choose Shortcut Input in the menu.

  6. Up next, remove the JavaScript that shows up in the shortcut window. Then, paste the one given below. After that, tap on the three dots at the top right corner of the screen. let v = document.querySelector(‘video’); v.addEventListener(‘webkitpresentationmodechanged’, (e)=>e.stopPropagation(), true); setTimeout(()=>v.webkitSetPresentationMode(‘picture-in-picture’), 3000); completion()

  7. Give a suitable name to your shortcut.

  8. Next, turn on the switch for “Show in Share Sheet” and then tap on “Share Sheet Types”.

  9. Next up, tap on Deselect All at the top right corner of the screen and choose Safari web pages.

  10. Tap on the back button at the top left corner of the screen and then hit the Done button. You will need to tap on Done again to finish.

Play YouTube Video in Picture-in-Picture Mode Using Safari

After you have created the YouTube PiP mode shortcut, playing videos in the PiP mode via Safari is quite simple.

  1. Now, choose YouTube PiP shortcut which you have just created in the action sheet.

Note:

A popup may appear asking you to give YouTube PiP access to youtube.com. Tap on Allow to proceed. 

That’s pretty much it! Now, it’s time to relish the video while still carrying out other tasks like messaging or taking note.

Enjoy Playing YouTube Videos in PiP Mode Via Safari on Your iPhone or iPad

So, that’s how you can force YouTube PiP mode to work in iOS 14 Safari. Though I am still hoping for an official way to arrive sooner than later, I am glad to have such a handy workaround as long as it works. What’s your take on this tip? Has it worked on your device? Feel free to share your thoughts in the comments below. By the way, how smooth has been your run with iOS 14? If you are yet to get the most out of it, then check out our guides for customizing iOS 14 widgets, creating unique app icons, and making custom home screen widgets.

YouTube Picture in Picture Mode Not Working in iOS 14   Fix  - 50YouTube Picture in Picture Mode Not Working in iOS 14   Fix  - 66