From eedf1ceec518464d9d66860c79cdd5ec9cfb914c Mon Sep 17 00:00:00 2001 From: Andreas Pehrson Date: Fri, 3 Oct 2014 21:38:03 +0200 Subject: [PATCH] Bug 879717 - Part 2. Avoid autoplaying stream-backed HTMLMediaElements blocking indefinitely. r=roc --- content/html/content/src/HTMLMediaElement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/html/content/src/HTMLMediaElement.cpp b/content/html/content/src/HTMLMediaElement.cpp index 64446faf3e6f..2fca5e87b064 100755 --- a/content/html/content/src/HTMLMediaElement.cpp +++ b/content/html/content/src/HTMLMediaElement.cpp @@ -3286,14 +3286,14 @@ void HTMLMediaElement::ChangeNetworkState(nsMediaNetworkState aState) bool HTMLMediaElement::CanActivateAutoplay() { - // For stream inputs, we activate autoplay on HAVE_CURRENT_DATA because + // For stream inputs, we activate autoplay on HAVE_METADATA because // this element itself might be blocking the stream from making progress by // being paused. return !mPausedForInactiveDocumentOrChannel && mAutoplaying && mPaused && ((mDecoder && mReadyState >= nsIDOMHTMLMediaElement::HAVE_ENOUGH_DATA) || - (mSrcStream && mReadyState >= nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA)) && + (mSrcStream && mReadyState >= nsIDOMHTMLMediaElement::HAVE_METADATA)) && HasAttr(kNameSpaceID_None, nsGkAtoms::autoplay) && mAutoplayEnabled && !IsEditable();