Bug 1686696 - part2 : rework how does decoder handle owner's events when the logical position changes. r=bryce

Decoder needs to handle owner's events differently based on different situations, this patch makes the process clearer.

Differential Revision: https://phabricator.services.mozilla.com/D102674
This commit is contained in:
alwu
2021-02-11 03:45:29 +00:00
parent 2e20d3f5c4
commit 568391f075
3 changed files with 61 additions and 54 deletions

View File

@@ -5381,6 +5381,9 @@ void HTMLMediaElement::SeekCompleted() {
if (mTextTrackManager) {
mTextTrackManager->DidSeek();
}
// https://html.spec.whatwg.org/multipage/media.html#seeking:dom-media-seek
// (Step 16)
// TODO (bug 1688131): run these steps in a stable state.
FireTimeUpdate(TimeupdateType::eMandatory);
DispatchAsyncEvent(u"seeked"_ns);
// We changed whether we're seeking so we need to AddRemoveSelfReference