Skip to main content
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.

Video tutorial

Import

Creating a chat instance

Constructor parameters

Joining and leaving

join() automatically:
  • Fetches an access token from the Streampixel API
  • Connects to the LiveKit server
  • Subscribes to other participants’ audio tracks
  • Enables the microphone if micStart is true

Voice controls

Muting other participants

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.

Text chat

Receiving messages

Participant updates

Track who’s in the room and who’s speaking:

Participant data shape

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.

Full example

Next steps

StreamPixelVoiceChat API

Full reference for every method and callback.

SFU streaming

Combine voice chat with one-to-many SFU sessions.