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 =
|
const hasPresenter =
|
||||||
sfuParticipants.find((p) => p.isScreenShareEnabled) !== undefined;
|
sfuParticipants.find((p) => p.isScreenShareEnabled) !== undefined;
|
||||||
|
let allGhosts = true;
|
||||||
|
|
||||||
const speakActiveTime = new Date();
|
const speakActiveTime = new Date();
|
||||||
speakActiveTime.setSeconds(speakActiveTime.getSeconds() - 10);
|
speakActiveTime.setSeconds(speakActiveTime.getSeconds() - 10);
|
||||||
|
|
@ -455,6 +456,8 @@ function useParticipantTiles(
|
||||||
|
|
||||||
const id = sfuParticipant.identity;
|
const id = sfuParticipant.identity;
|
||||||
const member = matrixParticipants.get(id);
|
const member = matrixParticipants.get(id);
|
||||||
|
allGhosts &&= member === undefined;
|
||||||
|
|
||||||
const userMediaTile = {
|
const userMediaTile = {
|
||||||
id,
|
id,
|
||||||
focused: false,
|
focused: false,
|
||||||
|
|
@ -498,7 +501,9 @@ function useParticipantTiles(
|
||||||
tiles.length
|
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]);
|
}, [participants, sfuParticipants]);
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue