File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Sources/StreamVideo/WebRTC/v2 Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -88,13 +88,17 @@ struct WebRTCAuthenticator: WebRTCAuthenticating {
88
88
/// - Finally, applies the determined call settings to the state adapter.
89
89
let initialCallSettings = await coordinator. stateAdapter. initialCallSettings
90
90
let remoteCallSettings = CallSettings ( response. call. settings)
91
- var callSettings = initialCallSettings ?? remoteCallSettings
92
- if
93
- coordinator. stateAdapter. audioSession. currentRoute. isExternal,
94
- callSettings. speakerOn
95
- {
96
- callSettings = callSettings. withUpdatedSpeakerState ( false )
97
- }
91
+ let callSettings = {
92
+ var result = initialCallSettings ?? remoteCallSettings
93
+ if
94
+ coordinator. stateAdapter. audioSession. currentRoute. isExternal,
95
+ result. speakerOn
96
+ {
97
+ result = result. withUpdatedSpeakerState ( false )
98
+ }
99
+ return result
100
+ } ( )
101
+
98
102
await coordinator
99
103
. stateAdapter
100
104
. enqueueCallSettings { _ in callSettings }
You can’t perform that action at this time.
0 commit comments