Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration ParticipantEvent

ParticipantEvents are how participants give you state updates. You can listen to these events and update your application state accordingly.

Here is how to listen for participant events:

participant.on(ParticipantEvent.TrackPublished, (track) => {})

Learn more about using events here

These are the events emitted by RemoteParticipant and LocalParticipant (with a couple noted exceptions):

Index

Enumeration Members

StartedSpeaking: "StartedSpeaking"

When a participant has become an active speaker.

args: ()

StoppedSpeaking: "StoppedSpeaking"

When a participant is no longer an active speaker.

args: ()

TrackMuted: "TrackMuted"

When the participant has muted a track

TrackPublished: "TrackPublished"

When the remote participant has published a track

Note: This does not mean you are recieving media yet see

args: (LocalTrack)

TrackSubscribed: "TrackSubscribed"

When the local participant has subscribed to a pubished track. This means the local participant is recieving media and the RemoteTrack will have a MediaStreamTrack that contains that media

Note: This is not emitted on LocalParticipant

args: (RemoteTrack)

TrackUnmuted: "TrackUnmuted"

When the participant has unmuted a track

TrackUnpublished: "TrackUnpublished"

When the remote participant has unpublished a track. This can occur when a participant either unpublishes a track or leaves the space.

Note: It is safe to assume that when this event is fired the track is also unsubscribed

args: (LocalTrack)

TrackUnsubscribed: "TrackUnsubscribed"

When the local participant has unsubcribed from a pubished track. This means the local participant will no longer recieve media for this track

Note: This is not emitted on LocalParticipant

args: (RemoteTrack)

Generated using TypeDoc