File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Sources/LiveKit/Participant Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -135,12 +135,15 @@ public class LocalParticipant: Participant {
135
135
track. publishOptions = publishOptions
136
136
track. transceiver = transceiver
137
137
138
- // disable degradationPreference
139
- let params = transceiver. sender. parameters
140
- params. degradationPreference = NSNumber ( value: RTCDegradationPreference . disabled. rawValue)
141
- // changing params directly doesn't work so we need to update params
142
- // and set it back to sender.parameters
143
- transceiver. sender. parameters = params
138
+ // prefer to maintainResolution for screen share
139
+ if case . screenShareVideo = track. source {
140
+ self . log ( " [publish] set degradationPreference to .maintainResolution " )
141
+ let params = transceiver. sender. parameters
142
+ params. degradationPreference = NSNumber ( value: RTCDegradationPreference . maintainResolution. rawValue)
143
+ // changing params directly doesn't work so we need to update params
144
+ // and set it back to sender.parameters
145
+ transceiver. sender. parameters = params
146
+ }
144
147
145
148
self . room. engine. publisherShouldNegotiate ( )
146
149
You can’t perform that action at this time.
0 commit comments