Don't show ghost tiles while connecting
This commit is contained in:
parent
65f390e2e5
commit
fc307d0aba
1 changed files with 6 additions and 1 deletions
|
|
@ -442,6 +442,7 @@ function useParticipantTiles(
|
|||
|
||||
const hasPresenter =
|
||||
sfuParticipants.find((p) => p.isScreenShareEnabled) !== undefined;
|
||||
let allGhosts = true;
|
||||
|
||||
const speakActiveTime = new Date();
|
||||
speakActiveTime.setSeconds(speakActiveTime.getSeconds() - 10);
|
||||
|
|
@ -455,6 +456,8 @@ function useParticipantTiles(
|
|||
|
||||
const id = sfuParticipant.identity;
|
||||
const member = matrixParticipants.get(id);
|
||||
allGhosts &&= member === undefined;
|
||||
|
||||
const userMediaTile = {
|
||||
id,
|
||||
focused: false,
|
||||
|
|
@ -498,7 +501,9 @@ function useParticipantTiles(
|
|||
tiles.length
|
||||
);
|
||||
|
||||
return tiles;
|
||||
// If every item is a ghost, that probably means we're still connecting and
|
||||
// shouldn't bother showing anything yet
|
||||
return allGhosts ? [] : tiles;
|
||||
}, [participants, sfuParticipants]);
|
||||
|
||||
return items;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue