File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
livekit/src/room/participant Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -232,14 +232,16 @@ impl LocalParticipant {
232232 track : LocalTrack ,
233233 options : TrackPublishOptions ,
234234 ) -> RoomResult < LocalTrackPublication > {
235+ let disable_red = self . local . encryption_type != EncryptionType :: None || !options. red ;
236+
235237 let mut req = proto:: AddTrackRequest {
236238 cid : track. rtc_track ( ) . id ( ) ,
237239 name : track. name ( ) ,
238240 r#type : proto:: TrackType :: from ( track. kind ( ) ) as i32 ,
239241 muted : track. is_muted ( ) ,
240242 source : proto:: TrackSource :: from ( options. source ) as i32 ,
241243 disable_dtx : !options. dtx ,
242- disable_red : !options . red ,
244+ disable_red,
243245 encryption : proto:: encryption:: Type :: from ( self . local . encryption_type ) as i32 ,
244246 stream : options. stream . clone ( ) ,
245247 ..Default :: default ( )
You can’t perform that action at this time.
0 commit comments