diff --git a/.changeset/wide-moments-wear.md b/.changeset/wide-moments-wear.md new file mode 100644 index 000000000..3aeece31d --- /dev/null +++ b/.changeset/wide-moments-wear.md @@ -0,0 +1,5 @@ +--- +'@livekit/components-react': patch +--- + +Handle renamed e2ee -> encryption key in room options serializer diff --git a/packages/react/src/utils.ts b/packages/react/src/utils.ts index ccf3c648a..9ce47c2f6 100644 --- a/packages/react/src/utils.ts +++ b/packages/react/src/utils.ts @@ -65,13 +65,13 @@ export function warnAboutMissingStyles(el?: HTMLElement) { * * @internal * used to stringify room options to detect dependency changes for react hooks. - * Replaces processors and e2ee options with strings. + * Replaces processors and e2ee/encryption options with strings. */ export function roomOptionsStringifyReplacer(key: string, val: unknown) { if (key === 'processor' && val && typeof val === 'object' && 'name' in val) { return val.name; } - if (key === 'e2ee' && val) { + if ((key === 'e2ee' || key === 'encryption') && val) { return 'e2ee-enabled'; } return val;