Bug 1182444: Show audio as enabled when an audio track is present in stream. r=jesup

This commit is contained in:
Jean-Yves Avenard
2015-07-16 19:15:06 +10:00
parent 310fa5311b
commit ba4778d5e4
2 changed files with 27 additions and 0 deletions

View File

@@ -3569,6 +3569,12 @@ HTMLMediaElement::UpdateReadyStateInternal()
// We are playing a stream that has video and a video frame is now set.
// This means we have all metadata needed to change ready state.
MediaInfo mediaInfo = mMediaInfo;
if (hasAudio) {
mediaInfo.EnableAudio();
}
if (hasVideo) {
mediaInfo.EnableVideo();
}
MetadataLoaded(&mediaInfo, nsAutoPtr<const MetadataTags>(nullptr));
}