Skip to main content

Actions Library

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

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


useCreateMeeting(): createMeeting

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

import { useCreateMeeting } from "customization-api";

...

const createMeeting = useCreateMeeting();

...

await createMeeting(/*roomTitle:*/ 'My Meeting', /*enablePSTN?:*/ false, /*isSeperateHostLink?:*/ false );

Returns:

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


useJoinMeeting(): joinMeeting

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

import { useJoinMeeting } from "customization-api";

...

const joinMeeting = useJoinMeeting();

...

await joinMeeting(/*roomId:*/ 12342139812);


Returns:

joinMeeting(roomId: string): Promise<void>


useMuteToggleLocal(): muteToggleLocal

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

import { useMuteToggleLocal, MUTE_LOCAL_TYPE } from "customization-api";

...

const muteToggleLocal = useMuteToggleLocal();

...

muteToggleLocal( MUTE_LOCAL_TYPE.audio ); // toggle local user's audio mute state

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.

import { useRemoteMute, MUTE_REMOTE_TYPE } from "customization-api";

...

const muteToggleRemote = useRemoteMute();

...

muteToggleRemote( MUTE_REMOTE_TYPE.audio, 123457 ); // toggle uid:123457 user's audio mute state

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

import { useRemoteEndCall } from "customization-api";

...

const remoteEndCall = useRemoteEndCall();

...

remoteEndCall( 123457 ); // end uid:123457 user's call

Returns:

remoteEndCall(uid: UidType): void


TYPES:


MUTE_LOCAL_TYPE

NameValue
audio0
video1
import { MUTE_LOCAL_TYPE } from "customization-api";

MUTE_REMOTE_TYPE

NameValue
audio0
video1
import { MUTE_REMOTE_TYPE } from "customization-api";