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

This commit is contained in:
Jaya Allamsetty 2020-09-22 12:25:13 -04:00 committed by Jaya Allamsetty
parent ddbd3f292a
commit 0f9e01a7cf
2 changed files with 18 additions and 0 deletions

View File

@ -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);
},

View File

@ -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.
*