fix(large-view) fix selection if local SS auto-select is true

This commit is contained in:
Duduman Bogdan Vlad 2022-10-07 16:06:25 +01:00 committed by Saúl Ibarra Corretgé
parent a31b2ea181
commit 6d4d92b01d
1 changed files with 13 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import { MEDIA_TYPE } from '../base/media';
import {
getDominantSpeakerParticipant,
getLocalParticipant,
getLocalScreenShareParticipant,
getPinnedParticipant,
getRemoteParticipants,
getVirtualScreenshareParticipantByOwnerId
@ -138,7 +139,18 @@ function _electParticipantInLargeVideo(state) {
return participant.id;
}
if (getAutoPinSetting()) {
const autoPinSetting = getAutoPinSetting();
if (autoPinSetting) {
// when the setting auto_pin_latest_screen_share is true as spot does, prioritize local screenshare
if (autoPinSetting === true) {
const localScreenShareParticipant = getLocalScreenShareParticipant(state);
if (localScreenShareParticipant) {
return localScreenShareParticipant.id;
}
}
// Pick the most recent remote screenshare that was added to the conference.
const remoteScreenShares = state['features/video-layout'].remoteScreenShares;