Calls / Unity
Calls Unity v1
Calls Unity
Calls
Unity
Home
/
Calls
/
Unity
/
Event listener

Receive events

When an event listener is added to a room, users will be notified on events that occur in the room they are in.


Receive events on enter and exit

When a user joins or leaves a room, other participants in the room receive the following events.

class MyRoomListener : SbRoomEventListener
{
   // Called when a remote participant has entered a room.
   public void OnRemoteParticipantEntered(SbRemoteParticipant remoteParticipant) { }

   // Called when a remote participant has exited a room.
   public void OnRemoteParticipantExited(SbRemoteParticipant remoteParticipant) { }
}

Receive events on microphone setting

When a user mutes their microphone using the MuteMicrophone() method, other participants receive the following event.

class MyRoomListener : SbRoomEventListener
{
   // Called when a remote participant's audio settings have changed.
   public void OnRemoteAudioSettingsChanged(SbRemoteParticipant remoteParticipant) { }
}

Receive events on deleted room

To delete a room using the Calls API, see the delete a room page in the Calls API documentation. When a room has been deleted, participants in the room receive the following event.

class MyRoomListener : SbRoomEventListener
{
   // Called when the room has been deleted.
   public void OnDeleted() { }
}