This message was deleted.
# helpdesk
s
This message was deleted.
f
Please take a look at LiveKit Egress - https://docs.livekit.io/egress-ingress/egress/overview/
f
i have read through livekit egress and i am still confused, Pls is there any code i can use for reference that has implemented the audio record function or pls can you help me out
f
cc: @able-gigabyte-21598
a
You can use audio-only room composite egress
f
Thank you, i was able to successfully make it work but another issue i'm facing is that apparently vercel doesnt allow web socket, and so the code works perfectly on my local host but when i deploy it to vercel it still fetches the LIVEKIT_API_KEY & LIVEKIT_API_SECRET keys but fails with LIVEKIT_URL. Pls any advice
d
I don't think that would be an issue. Websocket runs from the browser to our servers. Vercel is not involved here, even if your template is hosted by them. Where is
LIVEKIT_URL
used? I think this is Next.js's env variable segmentation, where the client-side app only sees
PUBLIC_
env vars
try renaming it to
PUBLIC_LIVEKIT_URL
instead
f
sorry for the late replay, thank you for taking your time to answer me. i have also done what you said, i even directly inserted the key directly into the code. but i still get the same error. 144d3bae-f0569b3a35673afa.js:1 WebSocket connection to 'wss://rios-http//0xg0ecv2.livekit.cloud/rtc?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2aWRlbyI6eyJyb..... failed:
d
your URL is incorrect..
<wss://rios-http//0xg0ecv2.livekit.cloud/rtc>
f
Hello... im currently not using my .env file i hardcoded them but im still getting the same issue it works fine locally but on production it adds this wss://rios-http//0xg0ecv2.livekit.cloud/rtc const apiKey = "apikey"; const apiSecret = "apisecret" const wsUrl = "wss://rios-0xg0ecv2.livekit.cloud" if (!apiKey || !apiSecret || !wsUrl) { return NextResponse.json( { error: "Server misconfigured" }, { status: 500 } ); } const at = new AccessToken(apiKey, apiSecret, { identity: username });
d
what does the client show now with the URL corrected?
f
Still the same thing
d
that URL is still wrong. not sure if you see it too
why does ur app insert http// between the url? 🧐
f
That's the problem... I don't know