Bug 1259788 - Add a new disabled mode for MSG tracks. r=jesup
MozReview-Commit-ID: 1dMTR4Wmcd8
This commit is contained in:
@@ -2425,7 +2425,8 @@ HTMLMediaElement::SetCapturedOutputStreamsEnabled(bool aEnabled) {
|
||||
}
|
||||
|
||||
TrackID id = pair.second()->GetDestinationTrackId();
|
||||
outputSource->SetTrackEnabled(id, aEnabled);
|
||||
outputSource->SetTrackEnabled(id, aEnabled ? DisabledTrackMode::ENABLED
|
||||
: DisabledTrackMode::SILENCE_FREEZE);
|
||||
|
||||
LOG(LogLevel::Debug,
|
||||
("%s track %d for captured MediaStream %p",
|
||||
@@ -2498,7 +2499,8 @@ HTMLMediaElement::AddCaptureMediaTrackToOutputStream(MediaTrack* aTrack,
|
||||
|
||||
// Track is muted initially, so we don't leak data if it's added while paused
|
||||
// and an MSG iteration passes before the mute comes into effect.
|
||||
processedOutputSource->SetTrackEnabled(destinationTrackID, false);
|
||||
processedOutputSource->SetTrackEnabled(destinationTrackID,
|
||||
DisabledTrackMode::SILENCE_FREEZE);
|
||||
RefPtr<MediaInputPort> port =
|
||||
inputTrack->ForwardTrackContentsTo(processedOutputSource,
|
||||
destinationTrackID);
|
||||
@@ -2507,7 +2509,8 @@ HTMLMediaElement::AddCaptureMediaTrackToOutputStream(MediaTrack* aTrack,
|
||||
aOutputStream.mTrackPorts.AppendElement(Move(p));
|
||||
|
||||
if (mSrcStreamIsPlaying) {
|
||||
processedOutputSource->SetTrackEnabled(destinationTrackID, true);
|
||||
processedOutputSource->SetTrackEnabled(destinationTrackID,
|
||||
DisabledTrackMode::ENABLED);
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug,
|
||||
|
||||
Reference in New Issue
Block a user