From 64a9d9ae61fd47fe7716a58914d6fa36a024a30a Mon Sep 17 00:00:00 2001 From: Sotaro Ikeda Date: Fri, 26 Sep 2014 06:14:32 -0700 Subject: [PATCH] Bug 1069109 - Do not occupy Audio channel if DOMMediaStream does not have audio r=cajbir --- content/html/content/src/HTMLMediaElement.cpp | 4 +++- content/media/DOMMediaStream.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/content/html/content/src/HTMLMediaElement.cpp b/content/html/content/src/HTMLMediaElement.cpp index 91f47a39d5eb..ed72a4045e0b 100755 --- a/content/html/content/src/HTMLMediaElement.cpp +++ b/content/html/content/src/HTMLMediaElement.cpp @@ -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; diff --git a/content/media/DOMMediaStream.h b/content/media/DOMMediaStream.h index c5a82d4b12be..e59c31b40164 100644 --- a/content/media/DOMMediaStream.h +++ b/content/media/DOMMediaStream.h @@ -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. */