Strip hash from passphrase on custom connection (#124)

This commit is contained in:
lukasIO 2023-09-21 15:54:40 +02:00 committed by GitHub
parent e8c46afceb
commit 5567fdd554
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,8 @@ export default function CustomRoomConnection() {
const router = useRouter();
const { liveKitUrl, token } = router.query;
const e2eePassphrase = typeof window !== 'undefined' && decodePassphrase(window.location.hash);
const e2eePassphrase =
typeof window !== 'undefined' && decodePassphrase(window.location.hash.substring(1));
const worker =
typeof window !== 'undefined' &&
new Worker(new URL('livekit-client/e2ee-worker', import.meta.url));