title: Python selenium don't autoplay videos
body: <p>I am using the Selenium webdriver in Python and I'd like the browser to not load images or autoplay videos to save time and resources. The problem is that videos do still get played without clicking on them.</p>
  
  <p>Here are my settings for the webbrowser:</p>
  
  <pre><code>from selenium import webdriver
  
  firefox_profile = webdriver.FirefoxProfile()
  
  # don't load images
  firefox_profile.set_preference('permissions.default.image', 2)
  firefox_profile.set_preference('extensions.contentblocker.enabled', True)
  firefox_profile.set_preference('dom.ipc.plugins.enabled.libflashplayer.so', False)
  
  # no video autoplay
  firefox_profile.set_preference('media.autoplay.default', 1)
  firefox_profile.set_preference('media.autoplay.allow-muted', False)
  driver = webdriver.Firefox(firefox_profile=firefox_profile)
  </code></pre>
  
  <p>How can I stop the browser from autoplaying videos?</p>