Bug 1302084 - the error checking should have highest priority. r=baku
MozReview-Commit-ID: 9QC5CG7p28M
This commit is contained in:
@@ -5730,6 +5730,11 @@ HTMLMediaElement::MaybeCreateAudioChannelAgent()
|
||||
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;
|
||||
@@ -5740,11 +5745,6 @@ HTMLMediaElement::IsPlayingThroughTheAudioChannel() const
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user