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

Room

public class Room : IDisposable

Main Room

Constructors

NameDescription
Room(String, String, String, String, OdinMediaConfig, OdinRoomConfig, Boolean)Create a ODIN ffi room
Room(RoomConfig)Create a ODIN ffi room

Events

NameDescription
OnPeerJoinedPassthrough event that identified a new PeerJoined event by Event-Tag.
OnPeerLeftPassthrough event that identified a new PeerLeft event by Event-Tag.
OnPeerUserDataChangedPassthrough event that identified a new PeerUpdated event by Event-Tag.
OnMediaAddedPassthrough event that identified a new MediaAdded event by Event-Tag.
OnMediaRemovedPassthrough event that identified a new MediaRemoved event by Event-Tag.
OnMediaActiveStateChangedPassthrough event that identified a new MediaActiveStateChanged event by Event-Tag.
OnRoomUserDataChangedPassthrough event that identified a new RoomUserDataChanged event by Event-Tag. Changing a Room's UserData is only possible via request to Odin server API, but not supported inside the client SDK.
OnMessageReceivedPassthrough event that identified a new MessageReceived event by Event-Tag.
OnConnectionStateChangedPassthrough event that identified a new ConnectionStateChanged event by Event-Tag.

Properties

NameDescription
ConnectionRetryThe count of ConnectionState OdinRoomConnectionState retry for reconnects. Reset on Connected
ConfigRoom configuration
IsJoinedtrue on successful Join or false
SelfClient Peer
RoomUserDataOdin UserData helper for marshal byte arrays on Room level
RemotePeersConatiner of room peers
PlaybackMediasGet all medias of room peers
MicrophoneMediaCurrent room microphone data route

Static Properties

NameDescription
ConnectionStateConnectionState of the Room that is set by ODIN

Public Methods

NameDescription
GetRoomIdRetrieves the room ID (e.g. the name of the room)
GetRoomCustomerRetrieves the identifier of the customer the room
GetRoomPeerIdRetrieves your own peer ID
GetRoomConnectionStatsRetrieves statistics for the underlying connection of this room
SetApmConfigSet rooms new Apm config
JoinJoin the room via Odin gateway
CreateMicrophoneMediaTry to add a MicrophoneMedia
UpdatePeerUserDataUpdates the user data for our own peer. The server will populate this data to all other visible peers in the same room.
UpdatePeerUserDataAsyncUpdates the user data for our own peer. The server will populate this data to all other visible peers in the same room.
SendMessageSends arbitrary data to a array of target peerIds.
SendMessageAsyncSends arbitrary data to a array of target peerIds.
BroadcastMessageSends arbitrary data to a all remote peers in this room.
BroadcastMessageAsyncSends arbitrary data to a all remote peers in this room.
GetRemotePeersIdsGet a copy of all PeerIds in this room
GetRemotePeersMediaStreamIdsAll ids of Media from remote peers in this room
SetPositionScaleConfigures the allowed 'view' distance for proximity calculation of peers in the room
UpdatePositionUpdates the two-dimensional position of our own peer in the room
AudioProcessReverseProcesses the reverse audio stream, also known as the loopback data to be used in the ODIN echo canceller.This should only be done if you are NOT using AudioMixStreams(RoomHandle%2cStreamHandle%5b%5d%2cSystem.
ToStringDebug
LeaveLeave a room and free all remote peers and associated medias
DisposeOn dispose will free the room and token generator