macOS: Disable Video Autoplay in Safari

Children cheering after disabling video autoplay

If you use Safari, you might be regularly annoyed by the tendency of certain sites to automatically play their videos when you vist the page. I know it bothers me, and yes, I’m looking at you, CNN. Thanks to the capable sleuthing of Mac Geek Gab listener Scott Barman, we can show you how to turn off video autoplay in Safari. This method works in macOS Sierra and OS X El Capitan, and probably other versions of OS X.

TMO reenactment of children cheering because they were able to disable video autoplay
You can also be this happy after you learn to disable video autoplay in Safari (Image Credit: StartupStockPhotos

Disable Video Autoplay in Safari

To disable video autoplay, you need to quit Safari completely. That means clicking Safari from the top left of the menu bar, and then Quit. Once that’s done, launch Terminal from Applications -> Utilities. In Terminal, type the following commands:

defaults write WebKitMediaPlaybackAllowsInline -bool false
defaults write -bool false

If you’re running the WebKit Technology Preview, you’ll also need to run these commands in Terminal:

defaults write WebKitMediaPlaybackAllowsInline -bool false
defaults write -bool false

That’s it. Start up Safari once again, and enjoy a life free of video autoplay.

16 thoughts on “macOS: Disable Video Autoplay in Safari

  • BUT! i now want to REVERT the terminal command because it’s kind of a pain in other places… so… PLEASE… what is the code to reverse the info above? thank you!

      1. Whoa, thank you for the instant response. I’ll try it. I’m the kind of user that has no business trying anything in Terminal, it’s a frightening space for the layperson.


  • Well, does not work for me, with the new benefit of not being able to even stop the video using its own controls. I assume to reverse this I change the “false” flags to “true” ?
    (Using 10.9.5)

  • Faxus, thanks for the Debug menu tip

    Seeing as this story has evolved into a Safari wish list, can we:

    1. Hide the fact that Safari is in Private mode? Some websites won’t let you in unless they can dump a ton of permanent cookies on you.

    2. Block popup nags to sign up for newsletters?

  • You can also use the Debug menu for those who have enabled it
    Defaults write IncludeInternalDebugMenu 1
    (Or SafariTechnologyPreview)
    Then Media Flags > Disallow Inline Video


  • vpndev: Not that I’m aware of LOL

    GraphicMac: As long as you keep reading TMO, go for it. I read Macworld on an almost daily basis, to be honest.

    1. I tested this…and it works!

      Well, at least today it works, until they find a way around it. I’m ok with advertisements as long as they don’t distract me from the content that I came for. If its inline with the content I’m reading ( i.e an ad inserted in-between paragraphs ) or animated or plays sounds that break my concentration from what I’m reading, then it’s a deal breaker. Silent, static ads that are outside of the “content zone” are ok with me.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.