Skip to content

Commit bda4a66

Browse files
authored
Disable opus red for e2ee enabled clients (#706)
1 parent 9fb6b4d commit bda4a66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

livekit/src/room/participant/local_participant.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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()

0 commit comments

Comments
 (0)