Skip to content

Commit 213f75f

Browse files
committed
Add comment
1 parent 6844c5d commit 213f75f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/StreamVideo/Utils/AudioSession/CallAudioSession.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ final class CallAudioSession: @unchecked Sendable {
292292
)
293293

294294
actions.append(contentsOf: [
295+
// Setting only the audioEnabled doesn't stop the audio playout
296+
// as if a new track gets added later on WebRTC will try to restart
297+
// the playout. However, the combination of audioEnabled:false
298+
// and AVAudioSession.active:false seems to work.
295299
.normal(.webRTCAudioSession(.setAudioEnabled(configuration.isActive))),
296300
.normal(.setActive(configuration.isActive)),
297301
.normal(.avAudioSession(.setOverrideOutputAudioPort(configuration.overrideOutputAudioPort ?? .none)))

0 commit comments

Comments
 (0)