--- /dev/null
+From: Randall Barker <rbarker@mozilla.com>
+Bug 659285 - Extend media.autoplay.enabled to provide a way to disable
+ untrusted play() invocations
+
+ (prevent HTML5 videos from starting automatically when
+ media.autoplay.enabled is set to false)
+
+diff -Naur mozilla-release/content/html/content/src/HTMLMediaElement.cpp mozilla-release.patched/content/html/content/src/HTMLMediaElement.cpp
+--- mozilla-release/content/html/content/src/HTMLMediaElement.cpp 2014-11-26 07:29:56.000000000 -0500
++++ mozilla-release.patched/content/html/content/src/HTMLMediaElement.cpp 2015-08-13 22:01:23.224642252 -0400
+@@ -15,6 +15,8 @@
+ #include "mozilla/dom/MediaEncryptedEvent.h"
+ #endif
+
++#include "mozilla/EventStateManager.h"
++
+ #include "base/basictypes.h"
+ #include "nsIDOMHTMLMediaElement.h"
+ #include "nsIDOMHTMLSourceElement.h"
+@@ -2157,6 +2159,13 @@
+ void
+ HTMLMediaElement::Play(ErrorResult& aRv)
+ {
++ // Prevent media element from being auto-started by a script when
++ // media.autoplay.enabled=false
++ if (!IsAutoplayEnabled() && !EventStateManager::IsHandlingUserInput() && !nsContentUtils::IsCallerChrome()) {
++ LOG(LogLevel::Debug, ("%p Blocked attempt to autoplay media.", this));
++ return;
++ }
++
+ StopSuspendingAfterFirstFrame();
+ SetPlayedOrSeeked(true);
+