Skip to content

Commit

Permalink
Prevent backup codec publishing when e2ee is enabled (#943)
Browse files Browse the repository at this point in the history
* Prevent backup codec publishing when e2ee is enabled

* Create hot-kangaroos-teach.md
  • Loading branch information
lukasIO authored Nov 27, 2023
1 parent 5937f1d commit 00824de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/hot-kangaroos-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-client": patch
---

Prevent backup codec publishing when e2ee is enabled
5 changes: 5 additions & 0 deletions src/room/participant/LocalParticipant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,11 @@ export default class LocalParticipant extends Participant {
videoCodec: BackupVideoCodec,
options?: TrackPublishOptions,
) {
// TODO remove once e2ee is supported for backup tracks
if (this.encryptionType !== Encryption_Type.NONE) {
return;
}

// is it not published? if so skip
let existingPublication: LocalTrackPublication | undefined;
this.tracks.forEach((publication) => {
Expand Down

0 comments on commit 00824de

Please sign in to comment.