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

MozReview-Commit-ID: 5kUJc24uEIH
This commit is contained in:
Alastor Wu
2016-10-05 10:07:54 +08:00
parent 386b38a04e
commit a840bd443c

View File

@@ -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