Bug 1306945 - remove the check of mPlayState in the MDSM::VisibilityChanged(); r?jwwang, kamidphish
MozReview-Commit-ID: JBJJ7dPt64i
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1806,21 +1806,16 @@ void MediaDecoderStateMachine::Visibilit
DECODER_LOG("VisibilityChanged: mIsVisible=%d, "
"mVideoDecodeSuspended=%c, mIsReaderSuspended=%d",
mIsVisible.Ref(), mVideoDecodeSuspended ? 'T' : 'F', mIsReaderSuspended.Ref());
if (!HasVideo()) {
return;
}
- // If not playing then there's nothing to do.
- if (mPlayState != MediaDecoder::PLAY_STATE_PLAYING) {
- return;
- }
-
// Start timer to trigger suspended decoding state when going invisible.
if (!mIsVisible) {
TimeStamp target = TimeStamp::Now() + SuspendBackgroundVideoDelay();
RefPtr<MediaDecoderStateMachine> self = this;
mVideoDecodeSuspendTimer.Ensure(target,
[=]() { self->OnSuspendTimerResolved(); },
[=]() { self->OnSuspendTimerRejected(); });