fix livekit
This commit is contained in:
@@ -11,7 +11,8 @@ const createToken = async () => {
|
||||
const roomName = "quickstart-room";
|
||||
// Identifier to be used for participant.
|
||||
// It's available as LocalParticipant.identity with livekit-client SDK
|
||||
const participantName = "quickstart-username";
|
||||
const participantName =
|
||||
"quickstart-username" + Math.random().toString(36).substring(7);
|
||||
|
||||
const at = new AccessToken(
|
||||
process.env.LIVEKIT_API_KEY,
|
||||
|
||||
@@ -35,16 +35,16 @@ export const Audio = () => {
|
||||
useEffect(() => {
|
||||
const joinRoom = async () => {
|
||||
if (!connection.isConnected) return;
|
||||
/* if (!token) return;
|
||||
if (!token) return;
|
||||
if (!process.env.NEXT_PUBLIC_LIVEKIT_URL)
|
||||
return console.error("NEXT_PUBLIC_LIVEKIT_URL not set");
|
||||
console.log("COnnecting to room", {
|
||||
console.log("Connecting to room", {
|
||||
token,
|
||||
url: process.env.NEXT_PUBLIC_LIVEKIT_URL,
|
||||
}); */
|
||||
});
|
||||
const url = "ws://localhost:7880";
|
||||
const token =
|
||||
"eyJhbGciOiJIUzI1NiJ9.eyJ2aWRlbyI6eyJyb29tSm9pbiI6dHJ1ZSwicm9vbSI6InF1aWNrc3RhcnQtcm9vbSJ9LCJpc3MiOiJBUElBbnNHZHRkWXAySG8iLCJleHAiOjE3NDIxNDk3MzAsIm5iZiI6MCwic3ViIjoicXVpY2tzdGFydC11c2VybmFtZSJ9.MVFDpwvjCF_AXjL9Mg40TFoKukZ4F3vOVB4DI_TZhHM";
|
||||
/* const token =
|
||||
"eyJhbGciOiJIUzI1NiJ9.eyJ2aWRlbyI6eyJyb29tSm9pbiI6dHJ1ZSwicm9vbSI6InF1aWNrc3RhcnQtcm9vbSJ9LCJpc3MiOiJBUElBbnNHZHRkWXAySG8iLCJleHAiOjE3NDIxNjAwOTIsIm5iZiI6MCwic3ViIjoicXVpY2tzdGFydC11c2VybmFtZSJ9.ih7my6oXby6yYBfzt5LXHKN5WZU9exIqS8CdpRJRLQI"; */
|
||||
console.log("Connecting to room", { token, url });
|
||||
const room = new Room({
|
||||
// automatically manage subscribed video quality
|
||||
|
||||
@@ -4,8 +4,8 @@ rtc:
|
||||
tcp_port: 7881
|
||||
use_external_ip: false
|
||||
enable_loopback_candidate: false
|
||||
ice_servers:
|
||||
- urls: ["stun:stun.l.google.com:19302"]
|
||||
# ice_servers:
|
||||
# - urls: ["stun:stun.l.google.com:19302"]
|
||||
keys:
|
||||
APIAnsGdtdYp2Ho: tdPjVsYUx8ddC7K9NvdmVAeLRF9GeADD6Fedm1x63fWC
|
||||
logging:
|
||||
|
||||
Reference in New Issue
Block a user