feat(large-video) Show SS on large-video instead of camera tile.
This is helpful in live streaming scenarios when AUTO_PIN_LATEST_SCREEN_SHARE is disabled and multi-stream is enabled. Dominant speaker's SS tile (if available) will be on stage instead of their camera tile. Fixes https://github.com/jitsi/jitsi-meet/issues/10869.
This commit is contained in:
parent
c3ebde18df
commit
54346c065d
|
@ -2,14 +2,17 @@
|
||||||
|
|
||||||
import type { Dispatch } from 'redux';
|
import type { Dispatch } from 'redux';
|
||||||
|
|
||||||
|
import { getMultipleVideoSupportFeatureFlag } from '../base/config';
|
||||||
import { MEDIA_TYPE } from '../base/media';
|
import { MEDIA_TYPE } from '../base/media';
|
||||||
import {
|
import {
|
||||||
getDominantSpeakerParticipant,
|
getDominantSpeakerParticipant,
|
||||||
getLocalParticipant,
|
getLocalParticipant,
|
||||||
getPinnedParticipant,
|
getPinnedParticipant,
|
||||||
getRemoteParticipants
|
getRemoteParticipants,
|
||||||
|
getVirtualScreenshareParticipantByOwnerId
|
||||||
} from '../base/participants';
|
} from '../base/participants';
|
||||||
import { isStageFilmstripAvailable } from '../filmstrip/functions';
|
import { isStageFilmstripAvailable } from '../filmstrip/functions';
|
||||||
|
import { getAutoPinSetting } from '../video-layout';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
SELECT_LARGE_VIDEO_PARTICIPANT,
|
SELECT_LARGE_VIDEO_PARTICIPANT,
|
||||||
|
@ -135,16 +138,26 @@ function _electParticipantInLargeVideo(state) {
|
||||||
return participant.id;
|
return participant.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getAutoPinSetting()) {
|
||||||
// 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;
|
||||||
|
|
||||||
if (remoteScreenShares?.length) {
|
if (remoteScreenShares?.length) {
|
||||||
return remoteScreenShares[remoteScreenShares.length - 1];
|
return remoteScreenShares[remoteScreenShares.length - 1];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 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) {
|
||||||
|
// Return the screensharing participant id associated with this endpoint if multi-stream is enabled and
|
||||||
|
// auto pin latest screenshare is disabled.
|
||||||
|
if (getMultipleVideoSupportFeatureFlag(state)) {
|
||||||
|
const screenshareParticipant = getVirtualScreenshareParticipantByOwnerId(state, participant.id);
|
||||||
|
|
||||||
|
return screenshareParticipant?.id ?? participant.id;
|
||||||
|
}
|
||||||
|
|
||||||
return participant.id;
|
return participant.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue