Bug 1302084 - the error checking should have highest priority.
MozReview-Commit-ID: 9QC5CG7p28M
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -5734,31 +5734,31 @@ HTMLMediaElement::MaybeCreateAudioChanne
this);
}
return true;
}
bool
HTMLMediaElement::IsPlayingThroughTheAudioChannel() const
{
+ // If we have an error, we are not playing.
+ if (mError) {
+ return false;
+ }
+
// It might be resumed from remote, we should keep the audio channel agent.
if (IsSuspendedByAudioChannel()) {
return true;
}
// Are we paused
if (mPaused) {
return false;
}
- // If we have an error, we are not playing.
- if (mError) {
- return false;
- }
-
// We should consider any bfcached page or inactive document as non-playing.
if (!IsActive()) {
return false;
}
// A loop always is playing
if (HasAttr(kNameSpaceID_None, nsGkAtoms::loop)) {
return true;