Skip to main content

Actions Library

Provides methods to execute specific actions like Muting / Unmuting a user and Joining / Creating a Room.

You can access them under the customization-api module as a named export.


useCreateRoom(): createMeeting

Returns an asynchronous function to create a room with the given options.


Returns:

createMeeting(roomTitle: string, enablePSTN?: boolean, isSeperateHostLink?: boolean): Promise<void>


useJoinRoom(): joinRoom

Returns an asynchronous function to join a room with the given phrase.


Returns:

joinRoom(roomId: string): Promise<void>


useMuteToggleLocal(): muteToggleLocal

Returns an asynchronous function to toggle muted state of the given track type for the local user.


Returns:

muteToggleLocal(type: MUTE_LOCAL_TYPE): Promise<void>


useRemoteMute(): muteToggleRemote

Returns an asynchronous function to toggle muted state of the given track type for a remote user with the given uid or if no uid provided, mutes everyone else in the room.


Returns:

muteToggleLocal(type: MUTE_REMOTE_TYPE, uid?: UidType ): Promise<void>


useRemoteEndCall(): remoteEndCall

Returns a function to end the call for a remote user with the given uid.


Returns:

remoteEndCall(uid: UidType): void


useEndCall(): endCall

Returns a function to end the call for a local user.


Returns:

endCall(): void


useLocalAudio(): localAudio

Returns a object that contains enableAudioButton / disableAudioButton / getLocalAudioStream /getRemoteAudioStream / getLocalScreenshareAudioStream functions to access local/remote/screenshare audio stream and control UI button state


Returns:

enableAudioButton(): void

disableAudioButton(): void

getLocalAudioStream(): ILocalAudioTrack

getRemoteAudioStream(uid: number): IRemoteAudioTrack

getLocalScreenshareAudioStream(): ILocalAudioTrack



useLocalVideo(): localVideo

Returns a object that contains enableVideoButton / disableVideoButton / getLocalVideoStream /getRemoteVideoStream / getLocalScreenshareVideoStream functions to access local/remote/screenshare video streams and control UI button state


Returns:

enableVideoButton(): void

disableVideoButton(): void

getLocalVideoStream(): ICameraVideoTrack

getRemoteVideoStream(uid: number): IRemoteVideoTrack

getLocalScreenshareVideoStream(): ILocalVideoTrack



useSpeechToText(): useSpeechToText

Returns a object that contains function and state data to manage the speech to text operation like start/stop/change language/get speaker name/download transcript etc


Returns:

isSpeechToTextOn: boolean

startSpeechToText(): void

stopSpeechToText(): void

changeSpeakingLanguage(language: LanguageType[]): void

downloadTranscript(): void

getActiveSpeakerName(): string

getPrevSpeakerName(): string

showTranscriptPanel(): void

showCaptionPanel(): void

transcriptData: object

captionData: object


TYPES:


MUTE_LOCAL_TYPE

NameValue
audio0
video1

MUTE_REMOTE_TYPE

NameValue
audio0
video1

LanguageType

"" | "en-US" | "hi-IN" | "zh-CN" | "zh-HK" | "fr-FR" | "de-DE" | "ko-KR" | "en-IN" | "ar" | "ja-JP" | "pt-PT" | "es-ES" | "it-IT" | "id-ID"