Bug 1334112 - part2: When changing the readyState to HAVE_FUTURE_DATA and HAVE_ENOUGH_DATA, the texttracks must be loaded. r=jwwang

MozReview-Commit-ID: I7oA3TleAFo

--HG--
extra : rebase_source : 4a77aa7d6e8cfd366327dd10a03ad5c228c925c0
This commit is contained in:
bechen 2017-02-21 15:44:00 +08:00
Родитель 5bd89ec1d3
Коммит 2f4c6ee015
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -5611,6 +5611,14 @@ HTMLMediaElement::UpdateReadyStateInternal()
return;
}
// TextTracks must be loaded for the HAVE_ENOUGH_DATA and
// HAVE_FUTURE_DATA.
// So force HAVE_CURRENT_DATA if text tracks not loaded.
if (mTextTrackManager && !mTextTrackManager->IsLoaded()) {
ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA);
return;
}
if (mDownloadSuspendedByCache && mDecoder && !mDecoder->IsEnded()) {
// The decoder has signaled that the download has been suspended by the
// media cache. So move readyState into HAVE_ENOUGH_DATA, in case there's