YouTube Picture in Picture Mode Not Working in iOS 14 Safari? Fix!

Sep. 24, 2020



Playing YouTube videos inpicture-in-picture mode on iPhoneis something that I have always wanted. That’s why I was so ecstatic, when withiOS 14, Safari could play YouTube videos in the PiP mode. However, just a few days back the YouTube removed this functionality as it wants the PiP mode to remain an attractive feature of the premium plan. But don’t be disheartened as there is a hack to get the YouTube picture-in-picture mode working in iOS 14 Safari on iPhone and iPad.

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

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 theShortcuts 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!

  1. First off, openShortcuts appon your iPhone or iPad and tap on the“+” buttonat the top right corner of the screen.

  2. Now, tap on theAdd Actionbutton.

  3. Next, chooseWeb.

  4. Next, select“Run JavaScript on Web Page”underSafarisection.

  5. Tap onWeb Pageoption which is right next toRun JavaScriptand chooseShortcut Inputin the menu.

  6. Up next,remove the JavaScriptthat shows up in the shortcut window. Then, paste the one given below. After that, tap on thethree dotsat 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()

  1. Givea suitable nameto your shortcut.

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

  3. Next up, tap onDeselect Allat the top right corner of the screen and chooseSafari web pages.

  4. Tap on theback button at the top left corner of the screenand then hit theDonebutton. You will need to tap onDoneagain to finish.

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

  1. Now, chooseYouTube PiPshortcut which you have just created in the action sheet.

Note:

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

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 forcustomizing iOS 14 widgets,creating unique app icons, andmaking custom home screen widgets.

An old school bibliophile who turned a tech nerd out of obsession. When he is not digging into hacks and tracking down stories that are breaking the internet, you may find him reciting poems.