macReports

Apple iOS Mac OS X Reports , Help and News

  • How to
  • News
  • Not working?
  • Tips and Tricks
  • Guides
You are here: Home / How to / How To Disable Auto-Play Videos in Safari – macOS

How To Disable Auto-Play Videos in Safari – macOS

Last updated on December 25, 2016 By Serhat Kurt 34 Comments

You open Safari to browse the Internet. You visit a web site and want to read an interesting article, you are very happy but while the website is loading, you hear something, someone is talking, because a video has automatically started playing without your permission.

Some websites (e.g., CNET) do this so a video or audio automatically plays when the webpage is loaded. These are usually some sort of video based advertisings.

This in-fact is very annoying. I think it is safe to say that automatically starting a video can annoy a lot of visitors. For instance, suppose you are in a quiet library and studying. Autoplay can be intrusive for someone who is in a quiet area.

Yesterday morning I visited CNET. Then I heard someone talking. I had no idea what was going on and who was talking. Then I realized the sound was coming from my MacBook. It took me a few seconds to realize what was going on. I think many users are like me. Some users may even have troubles finding the mechanism to stop it.

Furthermore, sometimes when people are reading their social media feeds (e.g., Facebook, Twitter etc), disturbing, often graphic, videos automatically start playing. For instance, the killing of Russian ambassador was recorded on video and it was watched by many people on social media unwittingly.

Cnet autoplay example

CNET Auto play

Turn off autoplay

So you want to stop videos (HTML5 videos) from autoplaying when you visit a website that has autoplaying contents, because autoplay is (1) annoying (2) time consuming (3) causing people to use more cellular data. Here is how:

First thing we need to do is to enable Safari’s debug menu in macOS. The debug menu offers additional features for the purpose of debugging.

  • Quit Safari (Safari > Quit Safari)
  • Open the Terminal app (/Applications/Utilities)
  • Enter this command. This command will unhide the debug menu:
  • defaults write com.apple.Safari IncludeInternalDebugMenu 1terminal app
  • Press Return
  • Close the Terminal app
  • Now reopen Safari

Now you have enabled the debug mode and you will see the debug menu in Safari’s menubar.

Safari debug menu

Now go to Safari > Debug > Media Flags and select Disallow Inline Video. Selecting this will stop videos from automatically playing when you visit a webpage. This will stop all soft of autoplaying, including social media videos. So you do not see unwanted contents.

disallow inline videos to sop autoplay

Now you can hide Debug Menu again. If you want to turn off Debug Menu, follow these steps:

  • Open the Terminal app
  • And enter the following command:
  • defaults write com.apple.Safari IncludeInternalDebugMenu 0
  • Close the Terminal app
  • And restart Safari

And one note to the web developers: 

Auto play is an accessibility and usability issue. Word Wide Web Consortium (W3C) does not recommend it by saying “we discourage the practice of automatically starting sounds (especially if they last more than 3 seconds), and encourage that the sound be started by an action initiated by the user after they reach the page…”

See also:

  • How To Change Default Search Engine in Safari
  • Change Mac Screenshot Locations

Filed Under: How to Tagged With: macOS, Safari

Comments

  1. Lee says

    January 30, 2019 at 10:57 pm

    I’ve enabled the debug drop down but the “Media Flags” option is missing from my list? I am using OS 10.11.6 I have very limited bandwidth due to remote location and the automatic video loading is incredibly annoying.

    Reply
  2. Barbara Michel says

    September 10, 2017 at 10:25 am

    It works for me but now my games won’t start. FB was easy to fix in settings, videos, change default to no. But my games! I have to go to debug to allow them to work. Is there another option?

    Reply
  3. Jose says

    July 23, 2017 at 4:44 pm

    the problem I have is that it seems that the command is not being saved, did all the steps and no debug, when I go into the terminal is not showing the command, how can I make sure the command is being saved?

    Reply
  4. Shawn says

    June 25, 2017 at 3:09 pm

    Thanks! Easy! If I had to listen to that IBM Watson ad on CNN ONE MORE TIME I wouldn’t be responsible for my actions :\

    Reply
  5. steve says

    June 14, 2017 at 12:46 am

    I did both those things but the video stills plays automatically after deleting spam in the yahoo mail folder

    Reply
« Older Comments

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow us

  • Facebook
  • RSS
  • Twitter

Got a tip for us? Email us.

Latest Posts

How to Boot in Single-user Mode or Verbose Mode in macOS

Unable to Load: An Error Occurred While Loading a Higher Quality Version of this Photo or Video, Fix

How to Use Apple Watch to Track your Sleep

How to get AirPods Pro with Static, Crackling Replaced for Free

How to Fix Keyboard Lag on Mac

Pages

  • About macReports
  • Contact Us
  • Privacy Statement
  • Terms of Use

Tags

AirPods Apple Car Apple Company Apple ID Apple Music Apple Pay Apple TV Apple Watch Apps App Store Backup Black Screen Bluetooth Catalina FaceTime iCloud iMessage iMessages iMovie iOS iOS 14 iPad iPhone iTunes Keyboard Mac Mac Battery MacBook macOS macOS Big Sur Mail Mail App Messages Music Notifications PDF Photos Safari screenshot Siri Spotlight Search Update Wi-Fi Windows YouTube

Search macReports

Categories:

  • Guides
  • How to
  • News
  • Not working?
  • Tips and Tricks

About macReports:

This website is founded by Serhat Kurt. He worked as a Senior Technology Director. He holds a doctoral degree (or doctorate) from the University of Illinois at Urbana / Champaign and a master’s degree from Purdue University.

Stacey Butler

Stacey Butler is a tech writer at macReports covering news, how-tos, and user guides. She is a longtime Mac and iPhone user and holds a Ph.D. from the University of Illinois at Champaign-Urbana.

 

This website is not affiliated with Apple.

Copyright © 2021 / macReports

This website uses cookies. By navigating around this site you consent to cookies being stored on your machine.Accept