Our new developer documentation is now available. Please check it out!
OdinRoom
On this page
export class OdinRoom
Class describing an OdinRoom
.
Properties
Name | Type | Description |
---|---|---|
connectionState | OdinConnectionState | The current state of the room stream connection. |
customer | string | The customer identifier this room is assigned to. |
data | Uint8Array | The arbitrary user data of the room. |
id | string | The ID of the room. |
ownPeer | OdinPeer | An instance of your own OdinPeer in the room. |
position | any | The current three-dimensional position of our own OdinPeer in the room. |
remotePeers | Map<number><OdinPeer> | A map of all remote OdinPeer instances in the room using the peer ID as index. |
serverAddress | string | The address of the voice server this room is living on. |
Public Methods
Name | Type | Description |
---|---|---|
addEventListener | void | Register to peer events from IOdinRoomEvents . |
changeMediaStream | Promise<void> | Changes the active capture stream (e.g. when switching to another input device). |
changeVolume | void | Change the global master volume for the room (should be between 0 and 2). |
createMedia | Promise<OdinMedia> | Creates a new local media using the specified stream. |
disableVAD | void | Disables RNN-based voice activity detection. |
disableVolumeGate | void | Disables RNN-based voice activity detection. |
enableVAD | void | Enables RNN-based voice activity detection. |
enableVolumeGate | void | Enables RNN-based voice activity detection. |
flushOwnPeerDataUpdate | Promise<void> | Sends updated user data of your own peer to the server. |
getAudioSettings | undefined | IOdinAudioSettings | Returns the current voice processing config for VAD and volume gate. |
getMediaById | undefined | OdinMedia | Returns the OdinMedia instance matching the specified ID. |
getPeerById | undefined | OdinPeer | Returns the OdinPeer instance matching the specified ID. |
join | Promise<OdinPeer> | Joins the room and returns your own peer instance after the room was successfully joined. |
sendMessage | Promise<void> | Sends a message with arbitrary data to all peers in the room or optionally to a list of specified peers. |
setPosition | void | Updates the three-dimensional position of our own OdinPeer in the room to apply server-side culling. |
startVADMeter | void | Enables emitting of RNN-based voice activity detection statistics. |
stopVADMeter | void | Disables emitting of RNN-based voice activity detection statistics. |
updateVADThresholds | void | Updates thresholds for vice activity detection (between 0 and 1). |
updateVolumeGateThresholds | void | Updates thresholds for the input volume gate (between -90 and 0). |