Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(iFrame): Add method for pinning a participant on stage view

Jaya Allamsetty0f9e01a7cf89
diff --git a/modules/API/API.js b/modules/API/API.js
index bd70017ae9..6756d43c46 100644
--- a/modules/API/API.js
+++ b/modules/API/API.js
@@ -15,6 +15,7 @@ import {
} from '../../react/features/base/conference';
import { parseJWTFromURLParams } from '../../react/features/base/jwt';
import { JitsiRecordingConstants } from '../../react/features/base/lib-jitsi-meet';
+import { pinParticipant } from '../../react/features/base/participants';
import {
processExternalDeviceRequest
} from '../../react/features/device-selection/functions';
@@ -120,6 +121,11 @@ function initCommands() {
));
}
},
+ 'pin-participant': id => {
+ logger.debug('Pin participant command received');
+ sendAnalytics(createApiEvent('participant.pinned'));
+ APP.store.dispatch(pinParticipant(id));
+ },
'proxy-connection-event': event => {
APP.conference.onProxyConnectionEvent(event);
},
diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js
index a26e708fb7..78533ace0a 100644
--- a/modules/API/external/external_api.js
+++ b/modules/API/external/external_api.js
@@ -35,6 +35,7 @@ const commands = {
hangup: 'video-hangup',
muteEveryone: 'mute-everyone',
password: 'password',
+ pinParticipant: 'pin-participant',
resizeLargeVideo: 'resize-large-video',
sendEndpointTextMessage: 'send-endpoint-text-message',
sendTones: 'send-tones',
@@ -919,6 +920,17 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
});
}
+ /**
+ * Pins a participant's video on to the stage view.
+ *
+ * @param {string} participantId - Participant id (JID) of the participant
+ * that needs to be pinned on the stage view.
+ * @returns {void}
+ */
+ pinParticipant(participantId) {
+ this.executeCommand('pinParticipant', participantId);
+ }
+
/**
* Removes event listener.
*