From 00824de1146ed14c3ec44193197b46ab24c21e2c Mon Sep 17 00:00:00 2001 From: lukasIO Date: Mon, 27 Nov 2023 15:52:13 +0200 Subject: [PATCH] Prevent backup codec publishing when e2ee is enabled (#943) * Prevent backup codec publishing when e2ee is enabled * Create hot-kangaroos-teach.md --- .changeset/hot-kangaroos-teach.md | 5 +++++ src/room/participant/LocalParticipant.ts | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/hot-kangaroos-teach.md diff --git a/.changeset/hot-kangaroos-teach.md b/.changeset/hot-kangaroos-teach.md new file mode 100644 index 0000000000..13765d8951 --- /dev/null +++ b/.changeset/hot-kangaroos-teach.md @@ -0,0 +1,5 @@ +--- +"livekit-client": patch +--- + +Prevent backup codec publishing when e2ee is enabled diff --git a/src/room/participant/LocalParticipant.ts b/src/room/participant/LocalParticipant.ts index a8c7dedc16..c889189207 100644 --- a/src/room/participant/LocalParticipant.ts +++ b/src/room/participant/LocalParticipant.ts @@ -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) => {