Bug 1190040 - Do not dispatch media-playback notifications for media elements that do not have an audio track; r=baku

This commit is contained in:
Ehsan Akhgari
2015-08-01 10:17:56 -04:00
parent a0f7c73250
commit 17d7254ac3
4 changed files with 88 additions and 0 deletions

View File

@@ -4504,6 +4504,11 @@ void HTMLMediaElement::UpdateAudioChannelPlayingState()
void
HTMLMediaElement::NotifyAudioChannelAgent(bool aPlaying)
{
// Don't do anything if this element doesn't have any audio tracks.
if (!HasAudio()) {
return;
}
// Immediately check if this should go to the MSG instead of the normal
// media playback route.
WindowAudioCaptureChanged();