Interface IRoom
Derived:
OdinNative.Unity.OdinRoom, OdinNative.Wrapper.Room.Room
Properties
Id
Room id
Handle
Parent
Default value null indicates root or not set
IsJoined
Indicates whether the room is currently joined
Self
The local peer for this client in this room. Null until the room is joined. Allows SDK components to reference the local peer through the same OdinNative.Wrapper.IPeer abstraction used for remote peers, enabling the native wrapper to be replaced by a web bridge without changing SDK code.
CryptoCipher
Encryption handle container
Samplerate
Default encoder/decoder samplerate for this room.
Stereo
Default encoder/decoder stereo flag for this room.
Name
Room name as reported by the server. Empty until joined.
Methods
Join(string, OdinCipherHandle)
Join a room with encryption
Returns
System.Boolean: true on success
Parameters
| Type | Name | Description |
|---|---|---|
System.String | token | jwt to send |
| OdinNative.Core.Imports.OdinCipherHandle | cipher | crypto cipher |
SendAudio(float[], MediaEncoder)
Push audio samples to the room via a specific encoder.
Returns
System.Boolean
Parameters
| Type | Name |
|---|---|
System.Single[] | samples |
| OdinNative.Wrapper.MediaEncoder | encoder |
GetOrCreateDecoder(uint, ulong, uint, bool, out MediaDecoder)
Get or create a decoder for the given peer and media, using the supplied samplerate and stereo flag.
On create calls through peer: OdinNative.Wrapper.PeerEntity.CreateDecoder(System.UInt32,System.Boolean)
Returns
System.Boolean
Parameters
| Type | Name |
|---|---|
System.UInt32 | peerId |
System.UInt64 | mediaId |
System.UInt32 | samplerate |
System.Boolean | stereo |
| OdinNative.Wrapper.MediaDecoder | decoder |
CreateMediaDecoder(uint)
Create a decoder for the given peer, using the room supplied samplerate and stereo.
Returns
OdinNative.Wrapper.MediaDecoder
Parameters
| Type | Name |
|---|---|
System.UInt32 | peerId |
RemoveMediaDecoder(uint, ulong)
Remove the decoder for the given peer and media and dispose media.
Parameters
| Type | Name |
|---|---|
System.UInt32 | peerId |
System.UInt64 | mediaId |
RemoveDecoder(uint, ulong, out MediaDecoder)
Remove the decoder for the given peer and media from room.
Returns
System.Boolean
Parameters
| Type | Name |
|---|---|
System.UInt32 | peerId |
System.UInt64 | mediaId |
| OdinNative.Wrapper.MediaDecoder | decoder |
Events
OnRoomStatusChanged
Odin connection status
Event Type
OdinNative.Wrapper.OnRoomStatusChangedDelegate
OnRoomJoined
Odin room joined
Event Type
OdinNative.Wrapper.OnRoomJoinedDelegate
OnRoomLeft
Odin room left
Event Type
OdinNative.Wrapper.OnRoomLeftDelegate
OnPeerJoined
Odin peer joined
Event Type
OdinNative.Wrapper.OnPeerJoinedDelegate
OnPeerLeft
A remote peer left, or was removed locally when this session ended.
Event Type
OdinNative.Wrapper.OnPeerLeftDelegate
OnPeerChanged
Odin peer changed userdata
Event Type
OdinNative.Wrapper.OnPeerChangedDelegate
OnMessageReceived
Odin room received message