fix(external-api) Fix pin function (#12236)

Make pin function work with stage filmstrip
This commit is contained in:
Robert Pintilii 2022-09-26 12:13:32 +03:00 committed by GitHub
parent 1b4bbcba3d
commit 077afecdba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -68,7 +68,8 @@ import {
import { appendSuffix } from '../../react/features/display-name'; import { appendSuffix } from '../../react/features/display-name';
import { isEnabled as isDropboxEnabled } from '../../react/features/dropbox'; import { isEnabled as isDropboxEnabled } from '../../react/features/dropbox';
import { setMediaEncryptionKey, toggleE2EE } from '../../react/features/e2ee/actions'; import { setMediaEncryptionKey, toggleE2EE } from '../../react/features/e2ee/actions';
import { resizeFilmStrip, setVolume } from '../../react/features/filmstrip/actions.web'; import { addStageParticipant, resizeFilmStrip, setVolume } from '../../react/features/filmstrip/actions.web';
import { isStageFilmstripAvailable } from '../../react/features/filmstrip/functions.web';
import { invite } from '../../react/features/invite'; import { invite } from '../../react/features/invite';
import { import {
selectParticipantInLargeVideo selectParticipantInLargeVideo
@ -236,7 +237,11 @@ function initCommands() {
'pin-participant': id => { 'pin-participant': id => {
logger.debug('Pin participant command received'); logger.debug('Pin participant command received');
sendAnalytics(createApiEvent('participant.pinned')); sendAnalytics(createApiEvent('participant.pinned'));
APP.store.dispatch(pinParticipant(id)); if (isStageFilmstripAvailable(APP.store.getState())) {
APP.store.dispatch(addStageParticipant(id, true));
} else {
APP.store.dispatch(pinParticipant(id));
}
}, },
'proxy-connection-event': event => { 'proxy-connection-event': event => {
APP.conference.onProxyConnectionEvent(event); APP.conference.onProxyConnectionEvent(event);

View File

@ -67,7 +67,9 @@ const PinnedIndicator = ({
} }
return ( return (
<div className = { styles.pinnedIndicator }> <div
className = { styles.pinnedIndicator }
id = { `pin-indicator-${participantId}` }>
<BaseIndicator <BaseIndicator
icon = { IconPinParticipant } icon = { IconPinParticipant }
iconSize = { `${iconSize}px` } iconSize = { `${iconSize}px` }