Skip to main content

Client controls

Overview

These are the Infinity ClientV2 endpoints that are available to the plugin. Where no caveats are provided, the requests are simply forwarded.

All endpoints are available to be called via plugin.conference.endpoint

All endpoints are targetting https://<node_address>/api/client/v2/conferences/<conference_alias>/ where the node_address and conference_alias are static based on the current call.

All endpoints that are targetting a particular participant and have participantUuid as an optional parameter, have the self participant as default target.

For more information the documentation for the API can be found here: https://docs.pexip.com/api_client/api_rest.htm****

List of supported endpoints

Summary

case 'conference:dialOut':
case 'conference:sendMessage':
case 'conference:sendApplicationMessage':
case 'conference:lock':
case 'conference:muteAllGuests':
case 'conference:setBandwidth':
case 'conference:setLayout':
case 'conference:disconnectAll':
case 'conference:requestParticipants':
case 'conference:breakout':
case 'conference:joinBreakoutRoom':
case 'conference:closeBreakouts':
case 'conference:closeBreakoutRoom':
case 'conference:emptyBreakouts':
case 'conference:breakoutMoveParticipants':
case 'conference:currentRoomId':
case 'participant:transfer':
case 'participant:mute':
case 'participant:muteVideo':
case 'participant:disconnect':
case 'participant:spotlight':
case 'participant:admit':
case 'participant:setRole':
case 'participant:raiseHand':
case 'participant:setTextOverlay':
case 'participant:dtmf':

Common API Responses

Targetting Conference

type Response = {
status: 200;
data: {
/**
* Status of the response, eg. success.
*/
status: 'success';
/**
* The result is true if successful, false otherwise.
*/
result: boolean;
};
};

Targetting Participant

| {
status: 200;
data: {
/**
* Status of the response, eg. success.
*/
status: 'success';
/**
* The result is true if successful, false otherwise.
*/
result: boolean;
}
}
| {
status: 403;
data: {
/**
* Status of the response, eg. success.
*/
status: 'success' | 'failed';
/**
* Error strings
*/
result: string // failure reason
}
};

Dial

Instead of resolving with a list of participant ids, the API works with the assumption that only a single id will be returned. It then awaits on the apprpriate participant_create event in order to create a more complete view of the participant's capabilities. Addditional helper functions are then added to the participant's propts

disconnect function documentation

Arguments

{
/**
* The level of privileges the participant has in the conference.
*/
role: 'HOST' | 'GUEST';
/**
* The target address to call.
*/
destination: string;
/**
* The protocol to use to place the outgoing call
*/
protocol: 'sip' | 'h323' | 'rtmp' | 'mssip' | 'auto';
/**
* This additional parameter can be specified for RTMP calls to send the presentation stream to a separate RTMP destination.
*/
presentation_url?: string;
/**
* Identifies the dialed participant as a streaming or recording device.
*/
streaming?: 'yes' | 'no';
/**
* An optional DTMF sequence to transmit after the call to the dialed participant starts.
*/
dtmf_sequence?: string;
/**
* Optional field that specifies what the calling display name should be.
*/
source_display_name?: string;
/**
* Optional field that specifies the source URI (must be a valid URI for the conference).
*/
source?: string;
/**
* Optional field that limits the media content of the call.
*/
call_type?: 'video' | 'video-only' | 'audio';
/**
* Determines whether the conference continues when all other non-ADP participants have disconnected. Default: `keep_conference_alive` for non-streaming participants, and `keep_conference_alive_never` for streaming participants.
*/
keep_conference_alive?:
| 'keep_conference_alive'
| 'keep_conference_alive_if_multiple'
| 'keep_conference_alive_never';
/**
* An optional friendly name for this participant. This may be used instead of the participant's alias in participant lists and as a text overlay in some layout configurations.
*/
remote_display_name?: string;
/**
* Optional text to use instead of remote_display_name as the participant name overlay text.
*/
text?: string;
}

Example

recorder = await plugin.conference.dialOut(args);
recorder.onDisconnect.add(() => {//do stuff});

Response

This is what's available from participant_create

interface InfinityParticipant {
callType: CallType;
canControl: boolean;
canChangeLayout: 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;
isIdpAuthenticated?: boolean;
isGateway: boolean;
isHost: boolean;
isMainVideoDroppedOut: boolean;
isMuted: boolean;
isPresenting: boolean;
isSpotlight: boolean;
isStreaming: boolean;
isVideoSilent: boolean;
isWaiting: boolean;
needsPresentationInMix: boolean;
protocol: '' | 'sip' | 'h323' | 'rtmp' | 'mssip' | 'api' | 'webrtc';
raisedHand: boolean;
role: 'chair' | 'guest';
rxPresentation: boolean;
serviceType:
| 'connecting'
| 'waiting_room'
| 'ivr'
| 'conference'
| 'lecture'
| 'gateway'
| 'test_call'
| undefined;
spotlightOrder: number;
startAt: Date;
startTime: number;
uri: string;
uuid: string;
vendor: string | undefined;
}

which is then enriched to arrive to the actual return type:

export interface Participant extends InfinityParticipant {
disconnect: () => Promise<RPCCalls['participant:disconnect']['reply']>;
onDisconnect: Signal<void>;
}

SendMessage

Sends a message to the conference.

Arguments

if participantUuid is specified, the message is sent only to the specified participant. Otherwise, it is broadcast to the whole conference

{
payload :string;
participantUuid?: string;
}

Response

See here

SendApplicationMessage

Sends arbitrary JSON to the conference. The usage protocol is all up to the application to decide.

Arguments

if participantUuid is specified, the message is sent only to the specified participant. Otherwise, it is broadcast to the whole conference

{
payload: Record<string, unknown>; // arbitrary object
participantUuid?: string;
}

Response

See here

Lock

Lock or unlock the conference. When a conference is locked, participants waiting to join are held at a "Waiting for Host" screen. These settings are only available to conference Hosts.

Arguments

{
lock: boolean;
}

Response

See here

MuteAllGuests

Mute or unmute all Guests on a conference. When muted, no Guest participants can speak unless they are explicitly unmuted. When unmuted, all Guests on a conference can speak. These settings are only available to conference Hosts.

Arguments

{
mute: boolean;
}

Response

See here

SetBandwidth

Sets the RTCPeerConnection's bandwidth.

Arguments

bandwidth: number

Response

void

SetLayout

Sets the VMR layout for both hosts and guests.

Arguments

{
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';
}

Response

See here

DisconnectAll

Disconnects all conference participants, including the participant calling the function

Arguments

{}

Response

See here

Breakout

Creates a breakout session.

Arguments

    /**
* Unused for now
*/
name: string;
/**
* Unused for now
*/
description?: string;
/**
* Optional timer for how long the breakout is open (not present or 0 = indefinitely)
*/
duration?: number;
/**
* When timer expires, or the breakout is closed, what do we do with participants: Disconnect them all, or transfer them back to the main room (default transfer)
*/
end_action?: 'disconnect' | 'transfer';
/**
* Optional list of participants to transfer to the breakout on creation. Record<FromBreakoutRoomUuid, ParticipantUuid[]>
*/
participants?: {
[k: string]: string[];
};

Response

{
breakout_uuid: string;
}

JoinBreakoutRoom

Host only. Joins a breakout room.

Arguments

{breakoutUuid?: string}

Response

void

CloseBreakouts

Closes all breakout rooms and performs the end action

Arguments

None

Response

{
status: 200;
data: {
status: 'success';
result: boolean;
}
}

CloseBreakoutRoom

Closes a breakout room. Depending on the end action specified on creation, participants will be transferred back to the main room or be disconnected

Arguments

{
breakoutUuid: string;
}

Response

See here

EmptyBreakouts

Moves all participants in all rooms back to the main room and leaves the rooms open

Arguments

None

Response

See here

BreakoutMoveParticipants

If fromBreakoutUuid is specified: moves one or more participants from one breakout room to another breakout room

If not, moves one or more participants from main room to a breakout room.

Arguments

{
fromBreakoutUuid?: string;
toRoomUuid: string;
participants: string[];
}

Response

void

GetCurrentRoomId

Gets the current room id. This is always main for guests.

Arguments

None

Result

string

Transfer

Transfers a participant to another conference.

The target conference is identified by the alias in destination , and they will have the specified role . If the target is PIN-protected, the PIN for the target role must be specified in the pin field.

Arguments

{
destination: string;
pin: string;
role: 'host' | 'guest';
participantUuid: string;
}

Response

See here

Mute

Mute or unmute a participant's audio.

Arguments

{
mute: boolean;
participantUuid?: string
}

Response

See here

MuteVideo

Mute or unmute a participant's video.

Arguments

{
muteVideo: boolean;
participantUuid?: string
}

Response

See here

Disconnect

Disconnects a participant

Arguments

{
participantUuid: string;
}

Response

| {
status: 200;
data: {
/**
* Status of the response, eg. success.
*/
status: 'success';
result: null | boolean;
}
}
| {
status: 403;
data: {
/**
* Status of the response, eg. success.
*/
status: 'success' | 'failed';
/**
* Error strings
*/
result: string // failure reason
}
};

Spotlight

Enable or disable the "spotlight" on a participant.

The spotlight feature locks any spotlighted participants in the primary positions in the stage layout, ahead of any current speakers. When any participants have been spotlighted, the first one to be spotlighted has the main speaker position, the second one has the second position (leftmost small video, for example), and so on. All remaining participants are arranged by most recent voice activity, as is default. For more information: see Spotlighting a participant (classic layouts only)

Arguments

{
enable: boolean;
participantUuid: string;
}

Response

See here

Admit

Lets a specified participant into the conference from the waiting room of a locked conference

Arguments

{
participantUuid: string;
}

Response

See here

SetRole

Changes the role of the participant.

Arguments

{
role: 'chair' | 'guest';
participantUuid: string;
}

Response

void

RaiseHand

Raise a participant's hand.

Argument

{
raise: boolean;
}

Response

See here

SetTextOverlay

Changes the participant name overlay text. The text is only applied if overlay text is enabled on a VMR. It can also change the text of an audio-only participant.

Arguments

{
text: string;
}

Response

See here

SendDTMF

Sends DTMF digits to the remote participant.

If callUuid is specified dtmf is sent to /participants/${participantUuid}/calls/${callUuid}/dtmf. (For a gateway call only)

If callUuid is not specified, dtmf is sent to /participants/${participantUuid}/dtmf

Arguments

{
digits: string;
participantUuid: string;
callUuid?: string
}

Response

See here