Bug 1298777 - don't need to capture audio for media element without audio track. r=jwwang
MozReview-Commit-ID: DKRGiuTGjtg
This commit is contained in:
@@ -6550,7 +6550,16 @@ HTMLMediaElement::SetMediaInfo(const MediaInfo aInfo)
|
||||
void
|
||||
HTMLMediaElement::AudioCaptureStreamChangeIfNeeded()
|
||||
{
|
||||
// TODO : only capture media element with audio track, see bug1298777.
|
||||
// Window audio capturing only happens after creating audio channel agent.
|
||||
if (!mAudioChannelAgent) {
|
||||
return;
|
||||
}
|
||||
|
||||
// No need to capture a silence media element.
|
||||
if (!HasAudio()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mAudioCapturedByWindow && !mCaptureStreamPort) {
|
||||
nsCOMPtr<nsPIDOMWindowInner> window = OwnerDoc()->GetInnerWindow();
|
||||
if (!OwnerDoc()->GetInnerWindow()) {
|
||||
|
||||
Reference in New Issue
Block a user