Skip to main content

Methods

Methods available on the sdk default export to interact with app builder.


login( token: string ): void

Authentication method to log in the sdk instance with the generated token. See how to generate a login token


logout(): void

Invalidates the login token currently being used by the SDK instance.


customize( CustomizationApiInterface ): void

Applies your customization to the Embed-SDK.


createCustomization( CustomizationApiInterface ): CustomizationApiInterface

Creates a customization object to be applied via the customize method.


joinPrecall( roomDetails: string | RoomData, userName?: string ): Promise<[roomdata:RoomData, enterRoom:( userName?: string )=>{} ]>

Allows user to programatically join a room with given roomDetails which can either be the room passphrase generated by the app builder backend or room details recieved from the backend. Returns a promise that resolves to roomInfo which contains the room data and enterRoom function which starts the call from the precall screen programatically.


joinRoom( roomDetails: string | RoomData, userName?: string ): Promise<RoomData>

Allows user to programatically join a room with given roomDetails which can either be the room passphrase generated by the app builder backend or room details recieved from the backend.


muteAudio( mute: boolean | ((currentMute: boolean) => boolean) ): Promise<void>

Allows user to programatically mute/unmute the local user's audio.


muteVideo( mute: boolean | ((currentMute: boolean) => boolean) ): Promise<void>

Allows user to programatically mute/unmute the local user's video.


setMicrophone( deviceId: deviceId ): Promise<void>

Allows user to programatically set the audio input device.


setCamera( deviceId: deviceId ): Promise<void>

Allows user to programatically set the video input device.


setSpeaker( deviceId: deviceId ): Promise<void>

Allows user to programatically set the audio output device.

info

Only works on Google chrome and other chromium based browsers.


on( eventName: keyof sdkEventsMapInterface ,callback: sdkEventsMapInterface[eventName] ): unsubscribe

Allows attaching callbacks to events emitted by the Embed-SDK. A list of all events along with necessary callbacks can be found here.


Returns:

unsubscribe(): void

Unsubscribes from the method