macOS: Disable Video Autoplay in Safari

1 minute read
| Quick Tip

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 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.

16
Leave a Reply

Please Login to comment
13 Comment threads
3 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
11 Comment authors
davidqmoserJeff Buttsikomradmcapurroseanconnery Recent comment authors

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

  Subscribe  
newest oldest most voted
Notify of
davidqmoser
Member
davidqmoser

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!

ikomrad
Member
ikomrad

This is a great article. I wish that there was a way to vote this article “up” to make it easier for others to find.

mcapurro
Member
mcapurro

Thank you so much. This is ridiculous CNN. It’s been a pain to shut off. This worked great!

seanconnery
Member
seanconnery

How do I reset it now to original setting?
(Causing problems)
thanks

Brutno
Member
Brutno

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)

Lee Dronick
Member
Lee Dronick

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?

faxus
Member
faxus

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

[img]http://i.imgur.com/uBURTrx.png[/img]

GraphicMac
Member
GraphicMac

Wow. This might actually make me reading Macworld.com again. Haven’t been there in over a year because of their stupid auto-play videos.

ikomrad
Member
ikomrad

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.

vpndev
Member
vpndev

Is there a way to kill GIF animation?

Please? PLEASE ??

Lee Dronick
Member
Lee Dronick

It works! At least on a favorite website, and I am sure that it is universal.

This should be a Safari Extension

Member
John Kelley

Yes! And thank you!!

Looking at you CNN!

Lee Dronick
Member
Lee Dronick

Thank you!