How to Stop Autoplay Video in Safari for Mac

Jul 12, 2017 - 15 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: 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 in 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!

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

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

15 Comments

» Comments RSS Feed

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

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

  3. Bill G says:

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

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

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

  6. Tony says:

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

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

  8. nilesh says:

    great tip.

  9. Jon says:

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

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

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

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

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