Bug 1224936 - AudioChannelAgent should be informed when HTMLMediaElement dispatches an error, r=roc
This commit is contained in:
@@ -790,6 +790,7 @@ void HTMLMediaElement::NoSupportedMediaSourceError()
|
||||
ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_NO_SOURCE);
|
||||
DispatchAsyncEvent(NS_LITERAL_STRING("error"));
|
||||
ChangeDelayLoadStatus(false);
|
||||
UpdateAudioChannelPlayingState();
|
||||
}
|
||||
|
||||
typedef void (HTMLMediaElement::*SyncSectionFn)();
|
||||
@@ -3516,6 +3517,7 @@ void HTMLMediaElement::Error(uint16_t aErrorCode)
|
||||
ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_IDLE);
|
||||
}
|
||||
ChangeDelayLoadStatus(false);
|
||||
UpdateAudioChannelPlayingState();
|
||||
}
|
||||
|
||||
void HTMLMediaElement::PlaybackEnded()
|
||||
@@ -4730,6 +4732,11 @@ HTMLMediaElement::IsPlayingThroughTheAudioChannel() const
|
||||
return false;
|
||||
}
|
||||
|
||||
// If we have an error, we are not playing.
|
||||
if (mError) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If this element doesn't have any audio tracks.
|
||||
if (!HasAudio()) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user