We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9730e5 commit f05f282Copy full SHA for f05f282
pc/audio_rtp_receiver.cc
@@ -93,11 +93,14 @@ void AudioRtpReceiver::OnSetVolume(double volume) {
93
RTC_DCHECK_RUN_ON(&signaling_thread_checker_);
94
RTC_DCHECK_GE(volume, 0);
95
RTC_DCHECK_LE(volume, 10);
96
- if (stopped_)
97
- return;
98
+ // Update the cached_volume_ even when stopped_, to allow clients to set the
+ // volume before starting/restarting, eg see crbug.com/1272566.
99
cached_volume_ = volume;
100
101
+ if (stopped_)
102
+ return;
103
+
104
// When the track is disabled, the volume of the source, which is the
105
// corresponding WebRtc Voice Engine channel will be 0. So we do not allow
106
// setting the volume to the source when the track is disabled.
0 commit comments