Review fixes: use existing method
This commit is contained in:
parent
19f8c252b5
commit
6b67924dbd
|
@ -267,29 +267,6 @@ export function getVirtualScreenshareParticipantOwnerId(id: string) {
|
||||||
return id.split('-')[0];
|
return id.split('-')[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns owner participant IDs of the virtual screenshares participant.
|
|
||||||
*
|
|
||||||
* @param {(Function|Object)} stateful - The (whole) redux state, or redux's.
|
|
||||||
* @returns {(string[])}
|
|
||||||
*/
|
|
||||||
export function getVirtualScreenshareParticipantOwnerIds(stateful: IStateful) {
|
|
||||||
const virtualScreenshareParticipants = toState(stateful)['features/base/participants']
|
|
||||||
.sortedRemoteVirtualScreenshareParticipants ?? new Map();
|
|
||||||
|
|
||||||
const virtualScreenshareParticipantIds = Array.from(virtualScreenshareParticipants.keys())
|
|
||||||
.map(id => getVirtualScreenshareParticipantOwnerId(id));
|
|
||||||
const localScreenShareParticipantId = getLocalScreenShareParticipant(stateful)?.id;
|
|
||||||
|
|
||||||
if (localScreenShareParticipantId) {
|
|
||||||
return [
|
|
||||||
...virtualScreenshareParticipantIds,
|
|
||||||
getVirtualScreenshareParticipantOwnerId(localScreenShareParticipantId) ];
|
|
||||||
}
|
|
||||||
|
|
||||||
return virtualScreenshareParticipantIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Map with fake participants.
|
* Returns the Map with fake participants.
|
||||||
*
|
*
|
||||||
|
|
|
@ -20,7 +20,7 @@ import { pinParticipant } from '../../../base/participants/actions';
|
||||||
import {
|
import {
|
||||||
getLocalParticipant,
|
getLocalParticipant,
|
||||||
getParticipantByIdOrUndefined,
|
getParticipantByIdOrUndefined,
|
||||||
getVirtualScreenshareParticipantOwnerIds,
|
getScreenshareParticipantIds,
|
||||||
hasRaisedHand,
|
hasRaisedHand,
|
||||||
isLocalScreenshareParticipant,
|
isLocalScreenshareParticipant,
|
||||||
isScreenShareParticipant,
|
isScreenShareParticipant,
|
||||||
|
@ -1288,13 +1288,14 @@ function _mapStateToProps(state: IReduxState, ownProps: any): Object {
|
||||||
const participantId = isLocal ? getLocalParticipant(state)?.id : participantID;
|
const participantId = isLocal ? getLocalParticipant(state)?.id : participantID;
|
||||||
const isActiveParticipant = activeParticipants.find((pId: string) => pId === participantId);
|
const isActiveParticipant = activeParticipants.find((pId: string) => pId === participantId);
|
||||||
const participantCurrentlyOnLargeVideo = state['features/large-video']?.participantId === id;
|
const participantCurrentlyOnLargeVideo = state['features/large-video']?.participantId === id;
|
||||||
const virtualScreenshareParticipantOwnerIds = getVirtualScreenshareParticipantOwnerIds(state);
|
const screenshareParticipantIds = getScreenshareParticipantIds(state);
|
||||||
|
|
||||||
const shouldDisplayTintBackground
|
const shouldDisplayTintBackground
|
||||||
= _currentLayout !== LAYOUTS.TILE_VIEW && filmstripType === FILMSTRIP_TYPE.MAIN
|
= _currentLayout !== LAYOUTS.TILE_VIEW && filmstripType === FILMSTRIP_TYPE.MAIN
|
||||||
&& (isActiveParticipant || participantCurrentlyOnLargeVideo)
|
&& (isActiveParticipant || participantCurrentlyOnLargeVideo)
|
||||||
|
|
||||||
// skip showing tint for owner participants that are screensharing.
|
// skip showing tint for owner participants that are screensharing.
|
||||||
&& !virtualScreenshareParticipantOwnerIds.includes(id);
|
&& !screenshareParticipantIds.includes(id);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_audioTrack,
|
_audioTrack,
|
||||||
|
|
Loading…
Reference in New Issue