Bug 1303554 - part2 : remove the b2g specific checking in IsCurrentlyPlaying(). r=baku

MozReview-Commit-ID: 5kUJc24uEIH

--HG--
extra : rebase_source : b1b059a0b3d579f301d3aa9bde336ecf86fadd02
This commit is contained in:
Alastor Wu 2016-10-05 10:07:54 +08:00
Родитель 94f2fcca3d
Коммит 0331c39ab1
1 изменённых файлов: 2 добавлений и 14 удалений

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

@ -6386,20 +6386,8 @@ HTMLMediaElement::IsCurrentlyPlaying() const
{
// We have playable data, but we still need to check whether data is "real"
// current data.
if (mReadyState >= nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA &&
!IsPlaybackEnded()) {
// Restart the video after ended, it needs to seek to the new position.
// In b2g, the cache is not large enough to store whole video data, so we
// need to download data again. In this case, although the ready state is
// "HAVE_CURRENT_DATA", it is the previous old data. Actually we are not
// yet have enough currently data.
if (mDecoder && mDecoder->IsSeeking() && !mPlayingBeforeSeek) {
return false;
}
return true;
}
return false;
return mReadyState >= nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA &&
!IsPlaybackEnded();
}
void