mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 883731 - Per spec. autoplay activation should be handled by readyState transition. r=cpearce
This commit is contained in:
parent
e25d70a688
commit
4e9f76649f
@ -3070,9 +3070,6 @@ void HTMLMediaElement::SeekCompleted()
|
||||
void HTMLMediaElement::NotifySuspendedByCache(bool aIsSuspended)
|
||||
{
|
||||
mDownloadSuspendedByCache = aIsSuspended;
|
||||
// If this is an autoplay element, we may need to kick off its autoplaying
|
||||
// now so we consume data and hopefully free up cache space.
|
||||
CheckAutoplayDataReady();
|
||||
}
|
||||
|
||||
void HTMLMediaElement::DownloadSuspended()
|
||||
@ -3293,8 +3290,7 @@ bool HTMLMediaElement::CanActivateAutoplay()
|
||||
return !mPausedForInactiveDocumentOrChannel &&
|
||||
mAutoplaying &&
|
||||
mPaused &&
|
||||
(mDownloadSuspendedByCache ||
|
||||
(mDecoder && mReadyState >= nsIDOMHTMLMediaElement::HAVE_ENOUGH_DATA) ||
|
||||
((mDecoder && mReadyState >= nsIDOMHTMLMediaElement::HAVE_ENOUGH_DATA) ||
|
||||
(mSrcStream && mReadyState >= nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA)) &&
|
||||
HasAttr(kNameSpaceID_None, nsGkAtoms::autoplay) &&
|
||||
mAutoplayEnabled &&
|
||||
|
Loading…
Reference in New Issue
Block a user