In-channel events (onNotifyChannelEvent)
Register a callback withsrtc.onNotifyChannelEvent; we recommend setting it before join:
ChannelEvent and ImEvent are both discriminated unions at the type level: when you branch with switch (evt.type), evt.data is automatically narrowed to the data structure for that event type. If you only use them for type annotations in TypeScript, we recommend importing them with import type.
Channel and connection
Remote users and tracks
When a remote user leaves, the SDK automatically unsubscribes from all of that user’s tracks; on USER_TRACK_REMOVE, it automatically unsubscribes from the corresponding track.
Tracks and devices
Network quality and active speakers
data.speakers of ACTIVE_SPEAKERS_CHANGED is a full snapshot of the users currently speaking, sorted by level from high to low; when nobody is speaking it’s an empty array. Your app can overwrite the UI state directly, without merging increments yourself.
Out-of-channel message events (onNotifyImEvent)
Register a callback withsrtc.onNotifyImEvent; call srtc.enableIm(token) first: