fix(stage-filmstrip): Pinning

Pinning participant was not working for stage filmstrip and
screen sharing filmstirp layouts
This commit is contained in:
Hristo Terezov 2022-08-25 18:47:36 -05:00
parent 104bfe7339
commit cc3a8b7b8d
2 changed files with 8 additions and 22 deletions

View File

@ -46,12 +46,12 @@ import {
} from './constants';
import {
isFilmstripResizable,
isTopPanelEnabled,
isStageFilmstripAvailable,
updateRemoteParticipants,
updateRemoteParticipantsOnLeave,
getActiveParticipantsIds,
getPinnedActiveParticipants
getPinnedActiveParticipants,
isStageFilmstripTopPanel
} from './functions.web';
import './subscriber';
@ -278,7 +278,7 @@ MiddlewareRegistry.register(store => next => action => {
const pinnedParticipants = getPinnedActiveParticipants(state);
const dominant = getDominantSpeakerParticipant(state);
if (isTopPanelEnabled(state)) {
if (isStageFilmstripTopPanel(state, 2)) {
const screenshares = state['features/video-layout'].remoteScreenShares;
if (screenshares.find(sId => sId === participantId)) {

View File

@ -107,17 +107,12 @@ function _electLastVisibleRemoteVideo(tracks) {
* @returns {(string|undefined)}
*/
function _electParticipantInLargeVideo(state) {
const stageFilmstrip = isStageFilmstripAvailable(state);
let participant;
// If a participant is pinned, they will be shown in the LargeVideo (regardless of whether they are local or
// remote) when the filmstrip on stage is disabled.
let participant = getPinnedParticipant(state);
if (!stageFilmstrip) {
// If a participant is pinned, they will be shown in the LargeVideo (regardless of whether they are local or
// remote) when the filmstrip on stage is disabled.
participant = getPinnedParticipant(state);
if (participant) {
return participant.id;
}
if (participant) {
return participant.id;
}
// Pick the most recent remote screenshare that was added to the conference.
@ -127,15 +122,6 @@ function _electParticipantInLargeVideo(state) {
return remoteScreenShares[remoteScreenShares.length - 1];
}
// Next, pick the pinned participant when filmstrip on stage is enabled.
if (stageFilmstrip) {
participant = getPinnedParticipant(state);
if (participant) {
return participant.id;
}
}
// Next, pick the dominant speaker (other than self).
participant = getDominantSpeakerParticipant(state);
if (participant && !participant.local) {