Developer Documentation
Our new developer documentation is now available. Please check it out!

OdinHandler.OnRoomLeft

public RoomLeftProxy OnRoomLeft

Called after a room is destroyed

Value Type

TypeDescription
RoomLeftProxy

Discussion

Whenever a “user (in ODIN language it’s a peer) leaves a room, this event is triggered on the local client. You need to listen to this event and doing some cleanup work as some PlaybackComponent elements created in the OnMediaAdded event might be linked to this room and will stop working once the user left the room.

You can use the DestroyPlaybackComponents convenience function to remove all PlaybackComponent linked to this room.

Example

OnRoomLeft Example
public void OnRoomLeft(RoomLeftEventArgs eventArgs)
{
    // Remove all Playback Components linked to this room
    OdinHandler.Instance.DestroyPlaybackComponents(eventArgs.RoomName);
}