Class Room
Main Room
Properties
ConnectionState
ConnectionState of the Room that is set by ODIN
ConnectionRetry
The count of ConnectionState OdinNative.Core.Imports.NativeBindings.OdinRoomConnectionState.Connecting retry for reconnects. Reset on Connected
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
Fields
Config
Room configuration
Methods
GetRoomId()
Retrieves the room ID (e.g. the name of the room)
Returns
System.String: room name### GetRoomCustomer()
Retrieves the identifier of the customer the room
Returns
System.String: customer### GetRoomPeerId()
Retrieves your own peer ID
Returns
System.UInt64: peer id### GetRoomConnectionStats()
Retrieves statistics for the underlying connection of this room
Returns
Global.OdinConnectionStats: Statistics for the underlying connection of this room### SetApmConfig(OdinRoomConfig)
Set rooms new Apm config
Returns
System.Boolean: true on successful set or false
Parameters
| Type | Name | Description |
|---|---|---|
Global.OdinRoomConfig | config | new Apm configuration |
Join(string, string, IUserData)
Join the room via Odin gateway
Returns
System.Boolean: true on successful join or false
Parameters
| Type | Name | Description |
|---|---|---|
System.String | name | room name |
System.String | userId | user id |
| OdinNative.Odin.IUserData | userData | custom userdata |
Join(string)
Join the room via Odin gateway
Returns
System.Boolean: true on successful join or false
Parameters
| Type | Name | Description |
|---|---|---|
System.String | token | room token |
CreateMicrophoneMedia(OdinMediaConfig)
Try to add a OdinNative.Odin.Media.MicrophoneStream to the room and set it to OdinNative.Odin.Room.Room.MicrophoneMedia
Returns
System.Boolean: true if media was added to the room or false
Parameters
| Type | Name | Description |
|---|---|---|
Global.OdinMediaConfig | config | Microphone device configuration |
UpdatePeerUserData(IUserData)
Updates the user data for our own peer. The server will populate this data to all other visible peers in the same room.
Returns
System.Boolean: true if userdata was set for the peer or false
Parameters
| Type | Name | Description |
|---|---|---|
| OdinNative.Odin.IUserData | userData | Userdata to send |
UpdatePeerUserDataAsync(IUserData)
Updates the user data for our own peer. The server will populate this data to all other visible peers in the same room.
Returns
Global.Task<System.Boolean>: true if userdata was set for the peer or false
Parameters
| Type | Name | Description |
|---|---|---|
| OdinNative.Odin.IUserData | userData | Userdata to send |
SendMessage(ulong[], byte[])
Sends arbitrary data to a array of target peerIds.
Returns
System.Boolean: true if data was send or false
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt64[] | peerIdList | array of ids(OdinNative.Odin.Peer.Peer.Id) |
System.Byte[] | data | arbitrary byte array |
SendMessageAsync(ulong[], byte[])
Sends arbitrary data to a array of target peerIds.
Returns
Global.Task<System.Boolean>: true if data was send or false
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt64[] | peerIdList | array of ids(OdinNative.Odin.Peer.Peer.Id) |
System.Byte[] | data | arbitrary byte array |
BroadcastMessage(byte[], bool)
Sends arbitrary data to a all remote peers in this room.
Returns
System.Boolean: true if data was send or false
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte[] | data | arbitrary byte array |
System.Boolean | includeSelf | idicates whether this current peer id |
BroadcastMessageAsync(byte[], bool)
Sends arbitrary data to a all remote peers in this room.
Returns
Global.Task<System.Boolean>: true if data was send or false