mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
Activate autoplay when playing a media source
Bug 1189204
This commit is contained in:
@@ -3686,12 +3686,14 @@ bool HTMLMediaElement::CanActivateAutoplay()
|
||||
{
|
||||
// For stream inputs, we activate autoplay on HAVE_NOTHING because
|
||||
// this element itself might be blocking the stream from making progress by
|
||||
// being paused.
|
||||
// being paused. We also activate autoplay when playing a media source since
|
||||
// the data download is controlled by the script and there is no way to
|
||||
// evaluate MediaDecoder::CanPlayThrough().
|
||||
return !mPausedForInactiveDocumentOrChannel &&
|
||||
mAutoplaying &&
|
||||
mPaused &&
|
||||
((mDecoder && mReadyState >= nsIDOMHTMLMediaElement::HAVE_ENOUGH_DATA) ||
|
||||
mSrcStream) &&
|
||||
mSrcStream || mMediaSource) &&
|
||||
HasAttr(kNameSpaceID_None, nsGkAtoms::autoplay) &&
|
||||
mAutoplayEnabled &&
|
||||
!IsEditable();
|
||||
|
||||
Reference in New Issue
Block a user