How to Stop Autoplay Video in Safari for Mac

Jul 12, 2017 - 23 Comments

Stop autoplaying video in Safari on Mac

Auto-play video is encountered frequently when browsing the web, and many websites will start blasting you with video and sound as soon you load a webpage. This can be nice for some websites and videos, but it can also be frustrating or unwanted. A hidden setting in Safari makes disabling autoplay video to be pretty simple on the Mac, so if you would like to stop the autoplaying videos there is an option to do just that.


A quick important note: modern versions of Safari include a disable autoplay feature discussed here that is separate from what is detailed below. Additionally, in current versions of Safari (anything before High Sierra) if you choose to stop autoplay video then every video in Safari will require user interaction before it can be played. Typically this means you must click the video and then click the play button to start the video. All autoplaying videos will be stopped, but so is the ability to just easily press the play button to start any video – instead it will be a two-step play process required to play video. You can try out the setting below and see if it works for you, if not then it’s just as easy to disable and go back to the default options of allowing autoplay and inline video again.

How to Stop All Autoplaying Videos in Safari on Mac

By changing this setting which will stop autoplaying videos, all other videos in Safari will require user action before they can be played.

  1. Quit out of Safari on the Mac
  2. Open the Terminal app in MacOS as found in /Applications/Utilities/
  3. Enter the following syntax exactly, this enables the Debug menu in Safari:
  4. defaults write com.apple.Safari IncludeInternalDebugMenu 1

  5. Hit the return key to execute the defaults command
  6. Open Safari on the Mac and pull down the newly enabled “Debug” menu and go to the “Media Flags” submenu, then choose “Disallow inline video”
  7. Stop allowing autoplay video by disabling inline video in Safari on Mac

  8. Reload / refresh any existing webpages to have the setting take effect

You can try it yourself, load any webpage where a video would automatically play and it will no longer do so. For example, any random YouTube video or this page on Bloomberg.com would auto-play a video when they load, but with this setting enabled the video autoplay will stop in Safari without user action to allow that video to load and play.

Remember that when you disable “inline video” (and thus, auto-play video) you are actually stopping the ability for Safari to play any web video by default without user interaction. This means even YouTube videos and Vimeo videos will not load automatically until you click on them to play them. Some users may find this to too cumbersome to deal with and thus will want to re-enable inline video and auto-play video.

Re-Enable and Allow Inline Video & Video Autoplay in Safari on Mac

If you enabled the prior setting and find it to be too cumbersome to play other videos on the web, simply reverse the change by toggling the menu option again:

  1. In Safari, pull down the “Debug” menu and go back to the “Media Flags” submenu
  2. Choose “Disallow inline video” again so that it no longer has a checkbox next to it

    Allow inline video and video autoplay on Mac Safari

  3. Refresh any existing open webpages for the change to carry over

Toggling the setting again will allow all web videos to play as usual without an additional step of user interaction, but will also re-allow auto-playing videos on webpages too.

* Safari 11 in macOS Sierra and MacOS High Sierra 10.13 onward includes an easier to access auto-play video disabling ability. Thus, this tip is most relevant to earlier versions of MacOS and earlier releases of Safari.

While hidden by default, the Safari debug menu has many useful options for web developers in particular, so if you’re a web worker in any variety, be it a front end designer, web developer, or even just a programmer or tinkerer, you may find it useful and fun to play around with. Many of the optional settings in the Debug menu are very advanced and it’s certainly not intended for casual use, and be aware that if you enable the menu and start toggling various switches you may prevent Safari from working as intended. Thus you’ll want to stick to options in the Debug menu that are explained or that are relevant to you, don’t start randomly trying things out (well, at least without tracking what they are so you can reverse the setting if need be).

Do you have any additional tips or tricks on auto-playing videos in Safari on the Mac? Let us know in the comments!

.

Related articles:

Posted by: Paul Horowitz in Mac OS, Tips & Tricks

23 Comments

» Comments RSS Feed

  1. Alex says:

    “Remember that when you disable “inline video” (and thus, auto-play video) you are actually stopping the ability for Safari to play any web video by default without user interaction. This means even YouTube videos and Vimeo videos will not load automatically until you click on them to play them. Some users may find this to too cumbersome to deal with and thus will want to re-enable inline video and auto-play video.”

    I’d say, time goes by and technology goes as well.

    [omitted]

    How to stop them to autoload?

    Thank you.

  2. Ed Sagan says:

    I thought there was a preference setting within Safari to turn on the debug menu. No terminal needed at all!

    At least, as far as I recall, that’s how I got the debug menu…

    Whoops! Mine is the developer menu; which I suppose is different!

    I’ll have to explore this. Those auto playing videos are the pits! Don’t their promoters realize how irritating they are. MacWorld is one of the worst and they, of all people, should know better!

  3. Karen says:

    The update has caused a website that I visit (with ads) to stop functioning. Sierra 10.12.6. I don’t see a debug menu in Terminal. How do I reverse/undo the stop auto-play?

  4. Geno says:

    Great news! The brand-new latest version of Safari — 11.0 (12604.1.38.1.7) — which I just downloaded on Wednesday, Septemober 20th — finally fixes the problem. No more autoplay!

  5. Harry says:

    I do not see this sub menu at all. What version of Safari is this?

  6. Yodrak says:

    My Debug menu does not have a Media Tags item. :-(

    OSx El Capitan, 10.11.6
    Safari Version 9.1.2 (11601.7.7)

  7. Eric says:

    Thank you, thank you, thank you for this greatly appreciated tip since we can no longer get away from the constant streaming of marketing crappola.

  8. Aeve says:

    Hello Paul, I have the same issue as R. Taylor with video opening in full screen.

    I found this after searching for a fix for graphics card issues with 2010 MBP and large videos on some websites and 360 photos on Facebook crash my machine. gfxCardStatus mostly stops the switching of cards but the occasional videos still cause problems.

  9. Bob Hogan says:

    I believe that I read somewhere that High Sierra can or will turn off auto-play videos on websites. Very happy to hear that. I find it very difficult to read an article with a video playing right along side it. In the meantime, many thanks for the info about how to disable auto-play in previous versions of the os.

  10. R. Taylor says:

    Thanks Paul – works great but now when I do play a video, regardless of site, it opens in full screen. Can’t figure out how to play the video inline at it’s normal inline size.

  11. Jon says:

    How do I then make the debug menu disappear from Safari?

  12. nilesh says:

    great tip.

  13. Michael says:

    Question: Stops video from autoplaying, but will it still download the entire video in the background / cache ??
    (example a large multi Mb promotional video will not autoplay, but will it still download many Mb every time you visit the site??)

  14. Tony says:

    Worked for me. Looks like those annoying advert vids have disappeared.
    Nice one!

  15. Marinecorpsvet says:

    I like to use Safari Technology Preview. I’ve tried substituting that title in these Terminal commands but no workee. Any suggestions?

    • Torben says:

      With Safari Technology Preview, the defaults command you have to write in Terminal is:

      defaults write com.apple.SafariTechnologyPreview WebKitMediaPlaybackAllowsInline -bool false

  16. Ann Z says:

    Well this didn’t work. I followed the directions then I clicked on the sample website in the article which has an auto play video on it … and … it auto played just fine. Any clues as to what I might have done wrong?

    Ann Z
    Washington DC

    • Squigglesworth says:

      I was able to stop all autoplay video with inline video but I ended up choosing “Video Requires User Action” instead, which simply puts a play button on all videos rather than disabling them.

      Try that Ann. Both work for me, make sure you’re doing it properly.

  17. Bill G says:

    Setting the “Video Needs User Action” flag from the same menu works for me.

  18. Chuk Brokenheimer says:

    You can also disable inline video and autoplay by using defaults commands

    defaults write com.apple.Safari WebKitMediaPlaybackAllowsInline -bool false

    defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false

    Changing ‘false’ to ‘true’ would reverse thereby enabling inline video again.

  19. Carmen says:

    I’m having an issue with cpu activity spiking like mad when I go to some sites that seem to have a lot of auto loading things, mostly news sites. Will this take care of that problem?

    • Paul says:

      It might, usually CPU spikes on web page load are due to things like video, flash, java, embedded widgets for polls and chat, full page takeover ads, animation, interactive features, etc. Try it out, it could make a difference.

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site