Use this file to discover all available pages before exploring further.
The SDK includes a voice and text chat system built on LiveKit, separate from the video stream. This enables real-time communication between users viewing the same stream or application.
const voiceChat = new StreamPixelVoiceChat( 'my-room', // Room name — users in the same room can communicate 'John', // Display name for this user true, // Enable voice chat (true) or text-only (false) 'https://example.com/avatar.png', // Avatar URL true // Start with microphone enabled);
// Mute all remote participants (local only — does not affect their actual mic)await voiceChat.muteAllRemote();// Unmute all remote participantsawait voiceChat.unmuteAllRemote();// Mute a specific participant by their identityawait voiceChat.muteSelected('user123');// Unmute a specific participantawait voiceChat.unmuteSelected('user123');
Muting is local only — it controls whether you hear the participant, not whether they are actually transmitting. The muted participant’s microphone remains active for other users in the room.
The speaking boolean updates in real-time and can be used to drive speaking indicators in your UI, such as highlighting the active speaker or showing a microphone animation.