Skip to main content

Events

Events emitted by the App Builder Embed SDK.

sdkEventsMapInterface

KeyTypeDescription
create( hostPhrase: string, attendeePhrase?: string, pstnNumber?: { number: string, pin: string } ): voidTriggered when a room is created
ready-to-join( meetingTitle: string, devices: MediaDeviceInfo[] ) => voidTriggered when user on the precall screen
join( meetingTitle: string, devices: MediaDeviceInfo[], isHost: boolean ) => voidTriggered when user joins a room
leave() => voidTriggered when user leaves a room
rtc-user-joined(uid: UidType) => voidTriggered when remote user joins the room
rtc-user-left(uid: UidType) => voidTriggered when remote user leaves the room
rtc-user-published(uid: UidType, trackType: 'audio' | 'video') => voidTriggered when remote user publishes a media track
rtc-user-unpublished(uid: UidType, trackType: 'audio' | 'video') => voidTriggered when remote user unpublishes a media track
devices-selected-microphone-changed( deviceId: deviceId ) => voidTriggered when the selected audio input device is changed
devices-selected-camera-changed( deviceId: deviceId ) => voidTriggered when the selected video input device is changed
devices-selected-speaker-changed( deviceId: deviceId ) => voidTriggered when the selected audio output device is changed
token-not-found() => voidTriggered when no token is provided in the login method, and not found in the local storage
will-token-expire() => voidTriggered when provided token 59 seconds before token expires
did-token-expire() => voidTriggered when provided token has expired
token-refreshed() => voidTriggered when token is refreshed

create( hostPhrase: string, attendeePhrase?: string, pstnNumber?: { number: string, pin: string } ): void

Parameters

ParameterTypeDescription
hostPhrasestringRoom pass phrase to join as host
attendeePhrase?stringRoom pass phrase to join as attendee
pstnNumber?{ number: string, pin: string }Room PSTN Dial-in info

ready-to-join( meetingTitle: string, devices: MediaDeviceInfo[] ): void

Parameters

ParameterTypeDescription
meetingTitlestringName of the room being joined
devicesMediaDeviceInfo[]Array media devices detected by the Agora SDK

join( meetingTitle: string, devices: MediaDeviceInfo[], isHost: boolean ): void

Parameters

ParameterTypeDescription
meetingTitlestringName of the room being joined
devicesMediaDeviceInfo[]Array of media devices detected by the Agora SDK
isHostbooleanIndicates if user is joining room as a host

leave(): void


rtc-user-joined(uid: UidType ): void

Parameters

ParameterTypeDescription
uidUidTypeUid of the remote user

rtc-user-left(uid: UidType ): void

Parameters

ParameterTypeDescription
uidUidTypeUid of the remote user

rtc-user-published(uid: UidType, trackType: 'audio'|'video' ): void

Parameters

ParameterTypeDescription
uidUidTypeUid of the remote user
trackType'audio' | 'video'Media type of the published track

rtc-user-unpublished(uid: UidType, trackType: 'audio'|'video' ): void

Parameters

ParameterTypeDescription
uidUidTypeUid of the remote user
trackType'audio' | 'video'Media type of the unpublished track

devices-selected-microphone-changed( deviceId: deviceId ): void

Parameters

ParameterTypeDescription
deviceIddeviceIdId of the selected device

devices-selected-camera-changed( deviceId: deviceId ): void

Parameters

ParameterTypeDescription
deviceIddeviceIdId of the selected device

devices-selected-speaker-changed( deviceId: deviceId ): void

Parameters

ParameterTypeDescription
deviceIddeviceIdId of the selected device

token-not-found(): void


will-token-expire(): void


did-token-expire(): void


token-refreshed(): void