diff --git a/.changeset/real-squids-enjoy.md b/.changeset/real-squids-enjoy.md new file mode 100644 index 0000000000..131d296156 --- /dev/null +++ b/.changeset/real-squids-enjoy.md @@ -0,0 +1,5 @@ +--- +"livekit-client": patch +--- + +Make sure no backup codecs are published when e2ee is enabled diff --git a/src/room/participant/LocalParticipant.ts b/src/room/participant/LocalParticipant.ts index 3ede1a594e..a8c7dedc16 100644 --- a/src/room/participant/LocalParticipant.ts +++ b/src/room/participant/LocalParticipant.ts @@ -693,7 +693,12 @@ export default class LocalParticipant extends Participant { if (opts.backupCodec === true) { opts.backupCodec = { codec: defaultVideoCodec }; } - if (opts.backupCodec && videoCodec !== opts.backupCodec.codec) { + if ( + opts.backupCodec && + videoCodec !== opts.backupCodec.codec && + // TODO remove this once e2ee is supported for backup codecs + req.encryption === Encryption_Type.NONE + ) { // multi-codec simulcast requires dynacast if (!this.roomOptions.dynacast) { this.roomOptions.dynacast = true;