Skip to main content
The package exports SimliClient, generateSimliSessionToken, generateIceServers and LogLevel, plus the types SimliSessionRequest, SimliSessionToken and CameraSetting. For a walkthrough, see the guide.

Functions

generateSimliSessionToken

Creates a session token with POST /compose/token. It takes your API key, so call it on your server. It throws the response body text when the API answers with an error status.

generateIceServers

Fetches ICE servers for peer-to-peer mode. It takes your API key, so call it on your server. It never throws: if the request fails, it returns Google’s public STUN server.

SimliClient

Constructor

The constructor opens the connection, so create the client just before you call start(). It throws on an invalid audioBufferSize or SimliWSURL, and in "p2p" mode when iceServers is null or empty.

Methods

Events

Types

SimliSessionRequest

The config of a session token request, sent as the body of POST /compose/token.

SimliSessionToken

CameraSetting

Offsets on top of the avatar’s own framing. Every field you leave out is neutral. Values outside the supported range are still applied, with a warning.

LogLevel