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 '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':
case 'participant:setRoom':

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

Response

This is what's available from participant_create

interface InfinityParticipant {
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;
}

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

disconnect function documentation

Example

recorder = await plugin.conference.dialOut({
destination: recordingAddress,
streaming: 'yes',
role: 'GUEST',
});
recorder.onDisconnect.add(() => {//do stuff});

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

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

SetParticipantRoom

Transfers a participant to a given roomId.

roomId should be a number between 1 and 5

Arguments

{
roomId: number;
participantUuid: string;
}

Response

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