Our new developer documentation is now available. Please check it out!
OdinRoom
public class OdinRoom : MonoBehaviour, IRoom
Wrapper class of Room for Unity.
This convenient class provides dispatching of events to Unity with passthrough
- ConnectionStatusState(SystemDestroy this components GameObject if the connection is closed i.e cleanup
Properties
Name | Description |
---|---|
Gateway | Odin endpoint server |
Token | Odin room token |
AudioMixerGroup | Unity mixer |
Samplerate | Unity samplerate |
IsStereo | Unity channel flag |
Id | Odin room id |
Parent | Default value gameObject parent or Unity root |
OnRoomJoined | |
OnMediaAdded | Event OnMediaStarted redirected as Unity event |
OnMediaRemoved | Event OnMediaStopped redirected as Unity event |
OnPeerJoined | Event OnPeerJoined redirected as Unity event |
OnPeerLeft | Event OnPeerLeft redirected as Unity event |
OnMessageReceived | Event OnMessageReceived redirected as Unity event |
OnConnectionStateChanged | Event OnConnectionStatusChanged redirected as Unity event |
Public Methods
Name | Description |
---|---|
GetBaseRoom | Odin base room |
PeerLeftRemoveComponent | Removes all child components with the same peer id |
RemovePeerComponent | Remove a Unity from a gameobject |
PeerJoinedCreateComponent | Add a new GameObject with a new Unity component |
AddPeerComponent | Add Unity to a gameobject |
ConnectionStatusState | Check status if the room should destroy the gameobject |
ProxyAudio | Redirects audio to all media encoders in the corresponding room. |
LinkInputMedia | Add a input media encoder to the corresponding room. |
UnlinkInputMedia | Remove a input media encoder from the corresponding room. |
ResumeOutputMedia | Start a stopped remote output decoder |
PauseOutputMedia | Stop a started remote output decoder |
WebRequestToken | Uses UnityWebRequest with POST data as json to get a response from a token-server |