Your iPad supports Picture in Picture (PiP) videos in apps and webpages, but this handy mode isn’t universally supported across all video-streaming websites. Crucially, PiP is unsupported by YouTube.com’s iPad interface on Safari. But there’s a shortcut for that, too—thanks to the power of iOS automation, you can enforce Picture in Picture on YouTube and other websites.

Welcome to iDB’s column dedicated to iOS automation scripts for Apple’s Shortcuts app. We try to find inspiring community shortcuts, created by users from all around the world, that will save your time and boost your productivity. Some of the scripts we’ve covered let you bypass article paywalls, get Dark Mode on any website in Safari, turn on your Apple TV, text multiple recipients in separate messages, add Apple Music albums to the Home screen and more.

About Picture in Picture

Picture in Picture is available on Mac computers using macOS Sierra and on iPad with iOS 11 and newer. Picture in Picture doesn’t work on iPhone unless you’re jailbroken. PiP is available on websites and in streaming apps like Netflix. Safari for iPad and Mac supports PiP on websites that use HTML5 for video playback, such as YouTube and Vimeo.

TUTORIAL: How to use Picture in Picture for YouTube videos on Mac

Websites not using the default HTML5 video player may and probably will refuse to let you detach a video into a floating overlay. YouTube has been particularly notorious in its (mis)handling of the PiP mode on iOS and, to a lesser extend, macOS as well.

That’s because it’s up to website developers to add a few lines of JavaScript code that enables support for PiP. Apple provides its registered developers with the necessary resources for enabling Picture in Picture mode in custom video players.

For reasons only known to Google itself, YouTube.com on macOS intentionally hides a PiP button from view, likely to ensure streamed videos can be monetized with ads. You can easily reveal the hidden PiP option by right-clicking the currently played YouTube video twice.

Right-clicking the YouTube player shows a second menu with the PiP option.

On iPad, neither the YouTube app nor the web interface supports PiP because YouTube on iOS uses Google’s proprietary player rather than the standard HTML5 video player. As it turns out, there’s a shortcut for that! Called PiP Video, it makes any HTML5 video playable in the PiP overlay by choosing a simple menu command.

Using Picture in Picture on Mac computers requires macOS Sierra or later.

Follow along with iDB as we show you how to install and use this shortcut to enforce Picture in Picture on YouTube and other unsupported video sites.

How to enforce Picture in Picture on YouTube

Download Apple’s free Shortcuts app if you haven’t already because you’ll need it to use our custom shortcut. Using Safari for iPad, navigate to the download page for the PiP Video shortcut and hit the blue button labeled Get Shortcut.

Confirm that you’d like to open the file using the Shortcuts app, if asked.

When the script’s explainer screen pops up in the Shortcuts app, tap the blue button labelled with the text Get Shortcut. This will import the script to the Shortcut app and sync it across all your other devices through iCloud.

You can find your newly imported script under the Library tab.

Tapping the three dots in a shortcut’s upper-right corner reveals its actions

As you can see for yourself, this is a very simple shortcut that simply injects some JavaScript into HTML code to enable the standard HTML video player with a Picture in Picture button.

It’s preconfigured to show up as an option in Safari’s Share sheet menu. For even faster access, tap the Share menu and choose Other from the rightmost side of the top row of icons. Now drag the option Shortcuts to the top of the list and hit Done to save the changes.

PiP Video is one of the simples shortcuts we’ve encountered.

To use the shortcut, start playing a video on youtube.com with Safari on your iPad, then choose Shortcuts from the Share menu and tap the option PiP Video.

Choose Shortcut from Safari’s Share menu to access PiP Video

And just like that, the video disengages from the main video player and enters PiP mode. Nows you can multitask while keeping one eye on your favorite YouTube videos, TV shows etc. While you cannot enter PiP mode for the video currently playing in the YouTube app, you can always send it to Safari with a simple tap and then repeat the aforementioned steps.

And there you have it, boys and girls!

Picture in picture on youtube.com in Safari for iPad

The next time you’d like to keep an eye on the latest viral videos while doing more pressing work on your iPad, remember to use this shortcut and you’ll be fine.

I learned about this awesome gem of a shortcut from the iOS 12 review by MacStories. The site even shared a must-have collection of 150+ scripts for the Shortcuts app that boost your productivity and take your iOS automations to the next level.

The MacStories Shortcuts Archive is a product of love dedicated to the Shortcuts community

This shortcut only works on iPad because PiP is currently unsupported on iPhone. Speaking of iOS automation, don’t forget to check out iDownloadBlog’s Shortcuts Focus archive!

Apple itself recently highlighted cool voice-activated Siri Shortcuts available in popular third-party health and fitness apps, including Snoww, Qardio, Dexcom and HomeCourt.

Need help? Ask iDB!

If you like this how-to, pass it along to your support folks and leave a comment below.

Got stuck? Not sure how to do certain things on your Apple? Let us know via [email protected] and a future tutorial might provide a solution.

Submit your own how-to suggestions via [email protected].