Bug 1244768 part 5 - reject pending play promises while the playback reaching the end; r=jwwang
4.8.12.8 https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-ended MozReview-Commit-ID: H7Tw0XGzpW0
This commit is contained in:
@@ -5146,7 +5146,12 @@ void HTMLMediaElement::PlaybackEnded()
|
||||
return;
|
||||
}
|
||||
|
||||
Pause();
|
||||
FireTimeUpdate(false);
|
||||
|
||||
if (!mPaused) {
|
||||
Pause();
|
||||
AsyncRejectPendingPlayPromises(NS_ERROR_DOM_MEDIA_ABORT_ERR);
|
||||
}
|
||||
|
||||
if (mSrcStream) {
|
||||
// A MediaStream that goes from inactive to active shall be eligible for
|
||||
@@ -5154,7 +5159,6 @@ void HTMLMediaElement::PlaybackEnded()
|
||||
mAutoplaying = true;
|
||||
}
|
||||
|
||||
FireTimeUpdate(false);
|
||||
DispatchAsyncEvent(NS_LITERAL_STRING("ended"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user