Skip to main content

Join Room

Join Room

Joins an ODIN room with the room token provided. Every peer connected to the same room will be able to talk to each other and exchange data.

Inputs

NameTypeDescription
Execexec
RoomobjectConnect the Room instance created by the Construct local room handle node. This room handle will later be used to handle events.
UrlstringThe url to the ODIN gateway. Typically this is https://gateway.odin.4players.io.
TokenstringThe token you created with the Generate Room Token node.
Initial Peer User DataarrayUser data can be anything and will be associated with the user (peer) on ODIN servers. User Data is automatically synchronized with other users in the same ODIN room. This enables you to easily exchange data like names or IDs.
Initial Peer PositionvectorThe initial peer position in Odin's space. This value is used to optimize audio streams by not streaming audio data to peer's that are outside of hearing range. Please refer to the Update Peer Position node for more information and to update the position later on.
On ErrordelegateDelegate to handle errors while joining a room. Most of the time, an error will occur when the room token is invalid or the room is full.
On SuccessdelegateCalled when the room has been successfully joined.

Outputs

NameTypeDescription
Execexec
On ResponseexecCalled when the gateway has returned its response. The success output indicates whether the room was successfully joined.
Successbooleantrue if the room has been successfully joined.