Tip of the Week: Disable Auto-play Videos in Your Browser

Do auto-playing videos on web pages cause you to constantly mute browser tabs? Are you forced to keep your Mac's volume muted because of them? Here's how to turn off auto-play videos in each of the three most popular Mac browsers.

How to Stop Auto-play web videos in Safari: 
  1. Quit Safari.
  2. Open Terminal (you can find it on your hard drive in Applications/Utilities).
  3. Enter the following commands. Each is a single line regardless of how they break on screen. If you aren't comfortable using Terminal, it's usually easier to copy and paste them:
defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2RequiresUserGestureForMediaPlayback" -bool true

defaults write com.apple.Safari WebKitVideoPlaybackRequiresUserGesture -bool true


Quit Terminal. Open Safari and test with a website that has auto-playing videos. You can still play videos by clicking on them. To reverse the changes, quit Safari, open Terminal, and enter this command (again, it's a single line which you can copy and paste):

defaults write com.apple.Safari WebKitVideoPlaybackRequiresUserGesture -bool false

Quit Terminal, open Safari and test with a website that has auto-playing videos.

How to Stop Auto-play web videos in Firefox:

  1. Launch Firefox and type “about:config” (no quotes) in the address bar.
  2. Confirm that you will be careful if the notification comes up.
  3. In the search at the top type: media.auto
  4. Double-click on the line that starts media.autoplay.enabled.

You’ll see it change to “user set boolean false.” Auto-playing of videos is now turned off.
You can still play embedded videos by clicking on them. To reverse the change, repeat the steps above. You’ll see it change to “default boolean true” Auto-playing of videos is now on again.

How to Stop Auto-play web videos in Chrome:

  1. Launch Chrome and go to this URL: https://chrome.google.com/webstore/detail/disable-html5-autoplay/efdhoaajjjgckpbkoglidkeendpkolai?hl=en
  2. Click the Add to Chrome button.
  3. Click the Add Extension button.

The extension will disable autoplaying videos. You can still click on them to play. You can also turn the extension off and on if you want videos to autoplay again by clicking the red button at the end of the address bar. You can remove the extension completely by right-clicking on the red button (or hold down the control key and click on the red button) then select "Remove from Chrome…" in the pop-up menu.

Comments

  1. The first Terminal command for Safari looks like a typo: 'com.apple.Safari' appears twice and the second part is in double-quotes. Can you confirm the correct syntax? Thanks.

    ReplyDelete
    Replies
    1. Steve,
      I believe the syntax is correct. Before I posted, I tested it on my iMac (running Sierra -10.12.4) and it worked as expected. Let me know if it gives you any problems.

      Delete
    2. I tried testing it, but now I'm having a hard time finding websites that start their videos automatically, either before or after setting/unsetting these commands. (That was not my experience before, which is why I was so interested in this post to begin with.) I'll let you know if I'm able to get consistent results.

      Delete
  2. Good post,

    This is one of those annoying things that happen when browsing the web and when it happens, Grrr!!

    ReplyDelete

Post a Comment

Popular posts from this blog

Tip of the Week: Dealing with Email Attachments

Tip of the Week: How to Keep Your Mac Safe from Hackers and Malware