Our new developer documentation is now available. Please check it out!
OdinClient.initRoom
On this page
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
Name | Type | Description |
---|---|---|
token | string | The room token for authentication |
gateway | string | The gateway to authenticate against |
audioContext | AudioContext | An optional audio context to use for capture |
Returns
Type | Description |
---|---|
Promise<OdinRoom> |