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 GitHub
parent ebcd1d85f2
commit 2ba7b3acb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import { MEDIA_TYPE } from '../base/media';
import { import {
getDominantSpeakerParticipant, getDominantSpeakerParticipant,
getLocalParticipant, getLocalParticipant,
getLocalScreenShareParticipant,
getPinnedParticipant, getPinnedParticipant,
getRemoteParticipants, getRemoteParticipants,
getVirtualScreenshareParticipantByOwnerId getVirtualScreenshareParticipantByOwnerId
@ -138,7 +139,18 @@ function _electParticipantInLargeVideo(state) {
return participant.id; 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. // 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;