Bug 1069109 - Do not occupy Audio channel if DOMMediaStream does not have audio r=cajbir

This commit is contained in:
Sotaro Ikeda 2014-09-26 06:14:32 -07:00
parent fdedfa5efd
commit 64a9d9ae61
2 changed files with 5 additions and 1 deletions

View File

@ -3942,7 +3942,9 @@ void HTMLMediaElement::UpdateAudioChannelPlayingState()
(!mPaused &&
(HasAttr(kNameSpaceID_None, nsGkAtoms::loop) ||
(mReadyState >= nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA &&
!IsPlaybackEnded()) ||
!IsPlaybackEnded() &&
!(mSrcStream && !(mSrcStream->GetTrackTypesAvailable() &
DOMMediaStream::HINT_CONTENTS_AUDIO))) ||
mPlayingThroughTheAudioChannelBeforeSeek));
if (playingThroughTheAudioChannel != mPlayingThroughTheAudioChannel) {
mPlayingThroughTheAudioChannel = playingThroughTheAudioChannel;

View File

@ -171,6 +171,8 @@ public:
TrackTypeHints GetHintContents() const { return mHintContents; }
void SetHintContents(TrackTypeHints aHintContents) { mHintContents = aHintContents; }
TrackTypeHints GetTrackTypesAvailable() const { return mTrackTypesAvailable; }
/**
* Create an nsDOMMediaStream whose underlying stream is a SourceMediaStream.
*/