is it possible to connect 2 participant in a room ...
# ask-ai
b
is it possible to connect 2 participant in a room without agents, and have a bidirectional audio, at the same time
t
Thanks for reaching out, timothe. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Yes, it is possible to connect two participants in a LiveKit room with bidirectional audio without using agents. Here's how you can achieve this: 1. Install the LiveKit SDK for your platform:
npm install livekit-client @livekit/components-react @livekit/components-styles --save
2. Create and connect to a room: `const room = new Room(); await room.connect(wsUrl, token);`Where: 3. Once connected, each participant can publish their audio tracks and subscribe to other participants' tracks. The Room object will contain: ◦
localParticipant
- representing the current user ◦
remoteParticipants
- an array of other participants in the room 1. When participants join the same room with proper permissions, they can automatically exchange audio tracks, creating bidirectional audio communication. 2. To disconnect, call
Room.disconnect()
to leave the room. If you need further assistance, feel free to ask! Sources: Connecting to LiveKit | LiveKit Docs