Developer Documentation

OdinClient.initRoom

initRoom(token: string, gateway?: string, audioContext?: AudioContext): Promise<OdinRoom>

Authenticates against the ODIN server and returns an OdinRoom instance for the first room set in the specified token.

This function accepts an optional AudioContext parameter for audio capture. The AudioContext interface is a part of the Web Audio API that represents an audio-processing graph, which can be used to control and manipulate audio signals in web applications. If the AudioContext is not provided or explicitly set to undefined, we will try to create one internally.

Parameters

NameTypeDescription
tokenstringThe room token for authentication
gatewaystringThe gateway to authenticate against
audioContextAudioContextAn optional audio context to use for capture

Returns

TypeDescription
Promise<OdinRoom>