Skip to content

Commit

Permalink
Make sure no backup codecs are published when e2ee is enabled (#941)
Browse files Browse the repository at this point in the history
* Make sure no backup codecs are published when e2ee is enabled

* Create real-squids-enjoy.md
  • Loading branch information
lukasIO authored Nov 27, 2023
1 parent 15b9755 commit 7465bc1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/real-squids-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-client": patch
---

Make sure no backup codecs are published when e2ee is enabled
7 changes: 6 additions & 1 deletion src/room/participant/LocalParticipant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7465bc1

Please sign in to comment.