Bug 1224936 - AudioChannelAgent should be informed when HTMLMediaElement dispatches an error, r=roc
This commit is contained in:
@@ -786,6 +786,7 @@ void HTMLMediaElement::NoSupportedMediaSourceError()
|
||||
ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_NO_SOURCE);
|
||||
DispatchAsyncEvent(NS_LITERAL_STRING("error"));
|
||||
ChangeDelayLoadStatus(false);
|
||||
UpdateAudioChannelPlayingState();
|
||||
}
|
||||
|
||||
typedef void (HTMLMediaElement::*SyncSectionFn)();
|
||||
@@ -3530,6 +3531,7 @@ void HTMLMediaElement::Error(uint16_t aErrorCode)
|
||||
ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_IDLE);
|
||||
}
|
||||
ChangeDelayLoadStatus(false);
|
||||
UpdateAudioChannelPlayingState();
|
||||
}
|
||||
|
||||
void HTMLMediaElement::PlaybackEnded()
|
||||
@@ -4756,6 +4758,11 @@ HTMLMediaElement::IsPlayingThroughTheAudioChannel() const
|
||||
return false;
|
||||
}
|
||||
|
||||
// If we have an error, we are not playing.
|
||||
if (mError) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// The volume should not be ~0
|
||||
if (std::fabs(Volume()) <= 1e-7) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user