Disable JavaScript to enable Picture-in-Picture on macOS Safari


Safari 10 on macOS Sierra has a useful Picture-in-Picture (PiP) feature to playback HTML5 videos in a small "always-on-top" window, just like on iPads with iOS 9+. To activate, just right-click a playing video and select Enter Picture-in-Picture. However, not all web videos seem to allow this, as they pop up their own menus without the PiP option. Here are two ways to try to enable PiP.

I've tested this on YouTube:

  1. First, start the video playing.
  2. Right-click on the video, and the standard YouTube menu appears.
  3. Just ignore that menu and right-click again, and the standard Safari video menu appears.
  4. Now, just select Enter Picture-in-Picture.

Safari Picture-in-Picture on YouTube

However, some sites still show their own menus on the second right-click. If so, then try this instead.

  1. Open SafariPreferences... > Advanced, and check Show Develop menu in menu bar.
  2. Now, just as previously, start the video playing.
  3. From the menu, Develop > Disable JavaScript.
  4. Try the right-click again, and hopefully, the Safari video menu appears.
  5. And once PiP is activated, remember to uncheck the Develop > Disable JavaScript option to re-enable JavaScript - this is important as all modern web pages rely heavily on JavaScript.

Safari Advanced Develop Menu to Disable JavaScript

Hope someone finds this useful!