Include local screen share participant and null checks
This commit is contained in:
parent
bbbe5587f6
commit
19f8c252b5
|
@ -275,10 +275,17 @@ export function getVirtualScreenshareParticipantOwnerId(id: string) {
|
|||
*/
|
||||
export function getVirtualScreenshareParticipantOwnerIds(stateful: IStateful) {
|
||||
const virtualScreenshareParticipants = toState(stateful)['features/base/participants']
|
||||
.sortedRemoteVirtualScreenshareParticipants;
|
||||
.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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue