Want to Restore YouTube Picture-in-Picture in iOS 15 Safari? | Check Out This Clever Extension

YouTube PiP on iPhone in iOS 14 copy Credit: Jesse Hollington
Text Size
- +

Toggle Dark Mode

Unless you’re a Premium subscriber, getting the most out of YouTube on an iPhone or iPad has become a somewhat frustrating experience, but now an enterprising developer has come up with a solution, thanks to the advent of Safari extensions in iOS 15.

The problem is that YouTube plays some funny tricks in Safari on iOS (and iPadOS). While watching YouTube videos in Safari on your Mac, it uses a standard HTML5 Video tag. On the other hand, for the mobile version, Google has cooked up a proprietary video player to make sure that viewers have to follow its rules, rather than the rules of the open web. It’s like the bad old days of Flash all over again.

To be fair, proprietary players aren’t an uncommon thing for premium video services — it’s how they prevent piracy — but we wouldn’t consider YouTube to fall into the same category as Netflix or Disney+ when it comes to this sort of thing.

Well, neither does developer Zhenyi Tan, and he’s come up with a solution. Tan is among those of us who remember when YouTube was based entirely on Flash — it was so bad that Apple had to roll its own YouTube app for early iPhone models. In those days, there was a Safari extension called YouTube5 that fixed this for Mac users.

The YouTube5 extension basically replaced the Flash-based YouTube player with one that uses the standard HTML5 video tag, and now Tan says we’ve reached a point where the same sort of extension is needed again — but this time to “fix” Google’s proprietary YouTube player and return us to the open standard.

And now the YouTube player situation has gotten bad enough that we need another extension to fix it. That’s where Vinegar comes in. Vinegar also replaces the YouTube player (written in who-knows-what) with a minimal HTML <video> tag.

Zhenyi Tan

Tan’s solution is Vinegar, named for the solution “commonly used as a household Tube cleaner.” It’s a $1.99 universal app available for the iPhone, iPad, and Mac that restored the standard HTML playback, bringing several benefits along with it, including the removal of in-video ads and support for background playback and picture-in-picture:

  • The removal of in-video ads.
  • Prevent YouTube from tracking your play/pause/seek activities.
  • Restore picture-in-picture functionality.
  • The videos don’t stop playing if you switch to another browser tab.
  • You can choose the audio-only stream to keep the music playing when Safari is in the background.

While Vinegar is also available for the Mac, it’s fair to say it’s not nearly as necessary for Safari on macOS — at least for now. When viewing YouTube on your Mac, it already presents the video using a standard HTML5 player, so things like background playback and picture-in-picture work just fine.

The iPhone and iPad are an entirely different matter, however. While using Safari has been a long-time workaround for the lack of picture-in-picture support in the YouTube app for the iPhone and iPad, it appears that Google began cracking down on that last year. These days it works sporadically at best — unless, of course, you’re a YouTube Premium subscriber (in which case it’s also available in the official iOS YouTube app).

In fact, it’s clear that Google has taken steps to deliberately block picture-in-picture support in mobile Safari. For example, going into full-screen mode while watching a YouTube video will show the PiP button in the usual place. However, tapping it will briefly bring up the PiP windows before it auto-closes and returns to the normal in-browser playback.

This is a result of Google’s proprietary YouTube player used in mobile Safari. Naturally, open standard HTML5 video doesn’t have this problem, as that’s precisely what Apple’s picture-in-picture feature is designed for — and therefore, you can fix this by applying a little Vinegar.

How to Install and Use Vinegar

Once you’ve downloaded and installed Vinegar from the App Store, you’ll need to take a quick trip into your iPhone or iPad Settings app to enable it as a Safari extension:

  1. Open the Settings app on your iPhone or iPad.
  2. Scroll down and tap Safari.
  3. Tap Extensions.
  4. Tap Vinegar.
  5. Tap the switch at the top to enable the extension.

By default, Vinegar is set to ask for permission before it runs on a website. You can change this from the extension settings, but the fast way is just to head into Safari and enable it while browsing YouTube:

  1. Open Safari.
  2. Visit YouTube.com.
  3. In your address bar, tap the “AA” menu button to the left of the site name.
  4. Tap Vinegar to enable the extension for the current website.

You’ll also see a settings screen here that allows you to choose your playback quality, choose to autoplay videos, and choose a toolbar for a quick selection of different formats.

Once running, you’ll see the PiP button appear in the usual location when viewing YouTube videos, and the videos will continue playing even when you switch to another tab — just like they do in Safari on your Mac. By default, videos still won’t keep playing in the background if you leave Safari. However, Vinegar offers an “Audio” format in the toolbar to facilitate this.

It’s worth noting that Vinegar isn’t without a few limitations. Most significantly, you’ll be limited to 1080p/30fps playback. This could be due to the unique VP9 codec that YouTube uses for higher-quality videos. Although iOS 14 (finally) added support for 4K video on YouTube, it’s not clear if Safari added open VP9 codec support to Safari or did something special with YouTube’s proprietary player.

Unfortunately, we really don’t know how long Vinegar will continue to work before Google finds a way to block it or even tries to demand that Apple pull it from the App Store. The steps Google has taken to block background playback and picture-in-picture are clearly deliberate. Not to mention the fact that Vinegar also cuts out the interstitial ads that Google inserts into YouTube videos.

On the other hand, it’s unclear how much Google can do about this without resorting to more sophisticated technologies, like the digital rights management (DRM) used by premium streaming services. By its very nature, YouTube is a more open platform, and the videos are both available and delivered in unencrypted form.

This is also why open-source tools like youtube-dl can download videos directly from YouTube. So as long as that remains possible, it seems unlikely that a tool like Vinegar could be blocked at a technical level.

Last year, the Recording Industry Association of America (RIAA) failed in its attempt to take down youtube-dl through legal channels. However, Google itself has never publicly opposed such tools.

Social Sharing