diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index ac7e0f2e4e84..6b3bc4853bb9 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -105,8 +105,6 @@ static PRLogModuleInfo* gMediaElementEventsLog; #include "nsIPermissionManager.h" #include "nsContentTypeParser.h" -#include "mozilla/EventStateManager.h" - using namespace mozilla::layers; using mozilla::net::nsMediaFragmentURIParser; @@ -2185,13 +2183,6 @@ HTMLMediaElement::ResetConnectionState() 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(PR_LOG_WARN, ("%p Blocked attempt to autoplay media.", this)); - return; - } - StopSuspendingAfterFirstFrame(); SetPlayedOrSeeked(true);