From 4d1dba937f7ea8510c1bd5f052f5d0bfa969b75b Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty Date: Mon, 14 Sep 2020 17:26:32 -0400 Subject: [PATCH] feat(external_api): Add method for displaying participant on large video --- modules/API/API.js | 2 +- modules/API/external/external_api.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/API/API.js b/modules/API/API.js index 1f94e8853..df1b1facb 100644 --- a/modules/API/API.js +++ b/modules/API/API.js @@ -126,7 +126,7 @@ function initCommands() { }, 'set-large-video-participant': participantId => { logger.debug('Set large video participant command received'); - sendAnalytics(createApiEvent('largevideo.participant.changed')); + sendAnalytics(createApiEvent('largevideo.participant.set')); APP.store.dispatch(selectParticipantInLargeVideo(participantId)); }, 'subject': subject => { diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js index 763b01424..b7ebebd24 100644 --- a/modules/API/external/external_api.js +++ b/modules/API/external/external_api.js @@ -948,6 +948,18 @@ export default class JitsiMeetExternalAPI extends EventEmitter { return setAudioOutputDevice(this._transport, label, deviceId); } + /** + * Displays the given participant on the large video. If no participant id is specified, + * dominant and pinned speakers will be taken into consideration while selecting the + * the large video participant. + * + * @param {string} participantId - Jid of the participant to be displayed on the large video. + * @returns {void} + */ + setLargeVideoParticipant(participantId) { + this.executeCommand('setLargeVideoParticipant', participantId); + } + /** * Sets the video input device to the one with the label or id that is * passed.