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.
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 com.apple.Safari WebKitMediaPlaybackAllowsInline -bool false
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false
If you’re running the WebKit Technology Preview, you’ll also need to run these commands in Terminal:
defaults write com.apple.SafariTechnologyPreview WebKitMediaPlaybackAllowsInline -bool false
defaults write com.apple.SafariTechnologyPreview com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false
That’s it. Start up Safari once again, and enjoy a life free of video autoplay.