зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1548923 - part1 : abort 'TimeMarchesOn' algorithm during seeking. r=jya
In the spec [1], it doesn't mention that we should only run `TimeMarchesOn` after media has started. Therefore, we should remove this return condition in order to update cue's state correctly no matter the media starts or not. In addition, according to the spec [2], `TimeMarchesOn` should be executed after seeking completed, we shouldn't not run it during seeking. [1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on [2] https://html.spec.whatwg.org/multipage/media.html#seeking:time-marches-on Differential Revision: https://phabricator.services.mozilla.com/D29882 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
6430d23336
Коммит
70e585dd96
|
@ -620,7 +620,8 @@ void TextTrackManager::TimeMarchesOn() {
|
|||
WEBVTT_LOG("TimeMarchesOn");
|
||||
|
||||
// Early return if we don't have any TextTracks or shutting down.
|
||||
if (!mTextTracks || mTextTracks->Length() == 0 || IsShutdown()) {
|
||||
if (!mTextTracks || mTextTracks->Length() == 0 || IsShutdown() ||
|
||||
!mMediaElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -630,9 +631,8 @@ void TextTrackManager::TimeMarchesOn() {
|
|||
}
|
||||
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(parentObject);
|
||||
|
||||
if (mMediaElement &&
|
||||
(!(mMediaElement->GetPlayedOrSeeked()) || mMediaElement->Seeking())) {
|
||||
WEBVTT_LOG("TimeMarchesOn seeking or post return");
|
||||
if (mMediaElement->Seeking()) {
|
||||
WEBVTT_LOG("TimeMarchesOn return during seeking");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче