Events
Overview
These are the Infinity ClientV2 server-sent events that are available to the plugin. As they are simply forwarded, documentation is available here: https://docs.pexip.com/api_client/api_rest.htm#server_sent
How you listen to events
plugin.events.myEvent.add(newMyEvent => {
// read and act on the new event message
});
Available Events
Conference Status
Provides updates on conference status changes
Syntax
plugin.events.conferenceStatus.add(conferenceStatus => {})
ConferenceStatus:
export interface ConferenceStatus {
locked: boolean;
guestsMuted: boolean;
allMuted: boolean;
started: boolean;
liveCaptionsAvailable: boolean;
breakoutRooms: boolean;
directMedia: boolean;
presentationAllowed: boolean;
classification?: {
current: number;
levels: Record<number, string>;
};
}
Connected
Signals that the call has been connected, more precisely, that packets are flowing to and from the remote end.
Syntax
plugin.events.connected.add(() => {})
Disconnected
Signals disconnect from the current call & conference.
Syntax
plugin.events.disconnected.add(reason => {})
Reason
{ error: string; errorCode: pexCode; }
List of pexCode: https://docs.pexip.com/clients/error_messages.htm
Me
Signals updates for the self participant
Syntax
plugin.events.me.add(participant => {})
Participant:
Participant { callType: CallType; canControl: boolean; canDisconnect: boolean; canMute: boolean; canTransfer: boolean; canFecc: boolean; canRaiseHand: boolean; canSpotlight: boolean; displayName: string; handRaisedTime: number; identity: string; isCameraMuted: boolean; isEndpoint?: boolean; isExternal: boolean; isGateway: boolean; isHost: boolean; isMainVideoDroppedOut: boolean; isMuted: boolean; isPresenting: boolean; isSpotlight: boolean; isStreaming: boolean; isVideoSilent: boolean; isWaiting: boolean; needsPresentationInMix: boolean; protocol: RTCParticipantEvent['protocol']; raisedHand: boolean; role: RTCParticipantEvent['role']; rxPresentation: boolean; serviceType: RTCParticipantEvent['service_type']; spotlightOrder: number; startAt: Date; startTime: number; uri: string; uuid: string; };
Participants
Provides the current list of the participants, sent every time a participant state changes.
Syntax
plugin.events.participants.add(participants => {})
Participants
Array of participant.
Message
Text messages sent to the whole conference
Syntax
plugin.events.message.add(message => {})
Message:
export interface Message {
at: Date;
id: string;
message: string;
displayName: string;
userId: string;
direct: boolean;
}
Direct Message
Text messages sent to the self participant only
Syntax
plugin.events.directMessage.add(message => {})
Message:
See message
Application Message
Object messages which can be directed either to the whole conference or to the
self participant only. This is indicated by the direct
boolean property.
Syntax
plugin.events.applicationMessage.add(message => {})
ApplicationMessage:
ApplicationMessage { message: Record<string, unknown>; // arbitrary object }
Participant Joined
Signals a new participant has joined.
Syntax
plugin.events.participantJoined.add(participant => {})
Participant
Participant Left
Signals a participant has left
Syntax
plugin.events.participantLeft.add(participant => {})
Participant
Raise Hand
Signals a participant has raised its hand
Syntax
plugin.events.raiseHand.add(participant => {})
Participant
Transfer
Signals the self participant was referred to another conference.
Syntax
plugin.events.transfer.add(transferDetails => {})
TransferDetails:
TransferDetails { alias: string; }
Stage
Signals stage updates.
Syntax
plugin.events.stage.add(stageParticipants => {})
Stage:
Stage { userId: string; stageIndex: number; vad: number; }[]
PresentationConnectionStateChange
Provides updates about the state of the presentation
Syntax
plugin.events.presentationConnectionStateChange.add(state => {})
PresentationConnectionState
PresentationConnectionState { send: RTCPeerConnectionState recv: RTCPeerConnectionState }[]
RTCPeerConnectionState
type RTCPeerConnectionState = "closed" | "connected" | "connecting" | "disconnected" | "failed" | "new"
More information about RTCPeerConnectionState can be found here
LayoutUpdate
Signals layout updates
Syntax
plugin.events.layoutUpdate.add(layoutEvent => {})
LayoutEvent
interface LayoutEvent {
requested_layout: {
primary_screen: {
chair_layout: Layout;
guest_layout: Layout;
};
};
view: Layout;
participants: string[];
}
type Layout =
| '1:0'
| '1:7'
| '1:21'
| '2:21'
| '1:33'
| '4:0'
| '9:0'
| '16:0'
| '25:0'
| '5:7'
| 'ac_presentation_in_mix'
| 'ac_presentation_in_mix_group'
| undefined;
AuthenticatedWithConference
Emitted with successfully obtaining a token (internally via request_token
)
plugin.events.authenticatedWithConference.add(conferenceContext => {})
ConferenceContext
{
conferenceAlias: string;
}