fix(stage-filmstrip): Pinning
Pinning participant was not working for stage filmstrip and screen sharing filmstirp layouts
This commit is contained in:
parent
104bfe7339
commit
cc3a8b7b8d
|
@ -46,12 +46,12 @@ import {
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import {
|
import {
|
||||||
isFilmstripResizable,
|
isFilmstripResizable,
|
||||||
isTopPanelEnabled,
|
|
||||||
isStageFilmstripAvailable,
|
isStageFilmstripAvailable,
|
||||||
updateRemoteParticipants,
|
updateRemoteParticipants,
|
||||||
updateRemoteParticipantsOnLeave,
|
updateRemoteParticipantsOnLeave,
|
||||||
getActiveParticipantsIds,
|
getActiveParticipantsIds,
|
||||||
getPinnedActiveParticipants
|
getPinnedActiveParticipants,
|
||||||
|
isStageFilmstripTopPanel
|
||||||
} from './functions.web';
|
} from './functions.web';
|
||||||
import './subscriber';
|
import './subscriber';
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
const pinnedParticipants = getPinnedActiveParticipants(state);
|
const pinnedParticipants = getPinnedActiveParticipants(state);
|
||||||
const dominant = getDominantSpeakerParticipant(state);
|
const dominant = getDominantSpeakerParticipant(state);
|
||||||
|
|
||||||
if (isTopPanelEnabled(state)) {
|
if (isStageFilmstripTopPanel(state, 2)) {
|
||||||
const screenshares = state['features/video-layout'].remoteScreenShares;
|
const screenshares = state['features/video-layout'].remoteScreenShares;
|
||||||
|
|
||||||
if (screenshares.find(sId => sId === participantId)) {
|
if (screenshares.find(sId => sId === participantId)) {
|
||||||
|
|
|
@ -107,18 +107,13 @@ function _electLastVisibleRemoteVideo(tracks) {
|
||||||
* @returns {(string|undefined)}
|
* @returns {(string|undefined)}
|
||||||
*/
|
*/
|
||||||
function _electParticipantInLargeVideo(state) {
|
function _electParticipantInLargeVideo(state) {
|
||||||
const stageFilmstrip = isStageFilmstripAvailable(state);
|
|
||||||
let participant;
|
|
||||||
|
|
||||||
if (!stageFilmstrip) {
|
|
||||||
// If a participant is pinned, they will be shown in the LargeVideo (regardless of whether they are local or
|
// 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.
|
// remote) when the filmstrip on stage is disabled.
|
||||||
participant = getPinnedParticipant(state);
|
let participant = getPinnedParticipant(state);
|
||||||
|
|
||||||
if (participant) {
|
if (participant) {
|
||||||
return participant.id;
|
return participant.id;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Pick the most recent remote screenshare that was added to the conference.
|
// Pick the most recent remote screenshare that was added to the conference.
|
||||||
const remoteScreenShares = state['features/video-layout'].remoteScreenShares;
|
const remoteScreenShares = state['features/video-layout'].remoteScreenShares;
|
||||||
|
@ -127,15 +122,6 @@ function _electParticipantInLargeVideo(state) {
|
||||||
return remoteScreenShares[remoteScreenShares.length - 1];
|
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).
|
// Next, pick the dominant speaker (other than self).
|
||||||
participant = getDominantSpeakerParticipant(state);
|
participant = getDominantSpeakerParticipant(state);
|
||||||
if (participant && !participant.local) {
|
if (participant && !participant.local) {
|
||||||
|
|
Loading…
Reference in New Issue