Our new developer documentation is now available. Please check it out!
OdinClient
On this page
export class OdinClient
The Odin client is the main entry point for the Odin SDK. It is used to create rooms. Create an instance with your access key and use it to create rooms.
Constructor
Name | Type | Description |
---|---|---|
constructor | OdinClient | Creates a new instance of a client. Use this to create rooms. |
Public Methods
Name | Type | Description |
---|---|---|
createRoom | OdinRoom | Creates a new local room instance with the given ID and user ID. Use join to connect to that room. |
createRoomWithAccessToken | OdinRoom | Creates a new local room instance with the given access token. Use join on the returned OdinRoom instance to connect to that room. Use this method if you already have an access token, either created elsewhere or by calling generateToken . To be more consistent with other SDKs, this method is deprecated. Use createRoomWithToken instead. |
createRoomWithToken | OdinRoom | Creates a new local room instance with the given room token. Use join on the returned OdinRoom instance to connect to that room. Use this method if you already have an access token, either created elsewhere or by calling generateAccessToken . |
generateAccessToken | string | Generates a token for the given access key, room and user ID. This token can be used to join the room. To be more consistent with other SDKs, this method is deprecated. Use generateToken instead. |
generateToken | string | Generates a room token for the given access key, room and user ID. This token can be used to join the room. |