OdinRoom

export class OdinRoom

Class describing an OdinRoom.

Properties

NameTypeDescription
connectionStateOdinConnectionStateThe current state of the room stream connection.
customerstringThe customer identifier this room is assigned to.
dataUint8ArrayThe arbitrary user data of the room.
idstringThe ID of the room.
ownPeerOdinPeerAn instance of your own OdinPeer in the room.
remotePeersMap<number><OdinPeer>A map of all remote OdinPeer instances in the room using the peer ID as index.
serverAddressstringThe address of the voice server this room is living on.

Public Methods

NameTypeDescription
addEventListenervoidRegister to peer events from IOdinRoomEvents.
changeMediaStreamPromise<void>Changes the active capture stream.
changeVolumevoidChange the global master volume for the room (should be between 0 and 2).
createMediaPromise<OdinMedia>Creates a new local media using the specified stream.
disableVADvoidDisables RNN-based voice activity detection.
enableVADvoidEnables RNN-based voice activity detection.
flushDataUpdatePromise<void>Sends updated user data of the room to the server.
flushOwnPeerDataUpdatePromise<void>Sends updated user data of your own peer to the server.
getPositionanyGet the latest position
joinPromise<OdinPeer>Joins the room and returns your own peer instance after the room was successfully joined.
sendMessagePromise<void>Sends a message with arbitrary data to all peers in the room or optionally to a list of specified peers.
setPositionvoidUpdates the two-dimensional position of our own OdinPeer in the room to apply server-side culling.