Our new developer documentation is now available. Please check it out!
Room
public class Room : IDisposable
Main Room
Constructors
Name | Description |
---|---|
Room(String, String, String, String, OdinMediaConfig, OdinRoomConfig, Boolean) | Create a ODIN ffi room |
Room(RoomConfig) | Create a ODIN ffi room |
Events
Name | Description |
---|---|
OnPeerJoined | Passthrough event that identified a new PeerJoined event by Event-Tag. |
OnPeerLeft | Passthrough event that identified a new PeerLeft event by Event-Tag. |
OnPeerUserDataChanged | Passthrough event that identified a new PeerUpdated event by Event-Tag. |
OnMediaAdded | Passthrough event that identified a new MediaAdded event by Event-Tag. |
OnMediaRemoved | Passthrough event that identified a new MediaRemoved event by Event-Tag. |
OnMediaActiveStateChanged | Passthrough event that identified a new MediaActiveStateChanged event by Event-Tag. |
OnRoomUserDataChanged | Passthrough 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. |
OnMessageReceived | Passthrough event that identified a new MessageReceived event by Event-Tag. |
OnConnectionStateChanged | Passthrough event that identified a new ConnectionStateChanged event by Event-Tag. |
Properties
Name | Description |
---|---|
ConnectionRetry | The count of ConnectionState OdinRoomConnectionState retry for reconnects. Reset on Connected |
Config | Room configuration |
IsJoined | true on successful Join or false |
Self | Client Peer |
RoomUserData | Odin UserData helper for marshal byte arrays on Room level |
RemotePeers | Conatiner of room peers |
PlaybackMedias | Get all medias of room peers |
MicrophoneMedia | Current room microphone data route |
Static Properties
Name | Description |
---|---|
ConnectionState | ConnectionState of the Room that is set by ODIN |
Public Methods
Name | Description |
---|---|
GetRoomId | Retrieves the room ID (e.g. the name of the room) |
GetRoomCustomer | Retrieves the identifier of the customer the room |
GetRoomPeerId | Retrieves your own peer ID |
GetRoomConnectionStats | Retrieves statistics for the underlying connection of this room |
SetApmConfig | Set rooms new Apm config |
Join | Join the room via Odin gateway |
CreateMicrophoneMedia | Try to add a MicrophoneMedia |
UpdatePeerUserData | Updates the user data for our own peer. The server will populate this data to all other visible peers in the same room. |
UpdatePeerUserDataAsync | Updates the user data for our own peer. The server will populate this data to all other visible peers in the same room. |
SendMessage | Sends arbitrary data to a array of target peerIds. |
SendMessageAsync | Sends arbitrary data to a array of target peerIds. |
BroadcastMessage | Sends arbitrary data to a all remote peers in this room. |
BroadcastMessageAsync | Sends arbitrary data to a all remote peers in this room. |
GetRemotePeersIds | Get a copy of all PeerIds in this room |
GetRemotePeersMediaStreamIds | All ids of Media from remote peers in this room |
SetPositionScale | Configures the allowed 'view' distance for proximity calculation of peers in the room |
UpdatePosition | Updates the two-dimensional position of our own peer in the room |
AudioProcessReverse | Processes 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. |
ToString | Debug |
Leave | Leave a room and free all remote peers and associated medias |
Dispose | On dispose will free the room and token generator |