Count people as speakers even if there is a presenter
This commit is contained in:
@@ -489,8 +489,6 @@ function useParticipantTiles(
|
|||||||
});
|
});
|
||||||
|
|
||||||
const items = useMemo(() => {
|
const items = useMemo(() => {
|
||||||
const hasPresenter =
|
|
||||||
sfuParticipants.find((p) => p.isScreenShareEnabled) !== undefined;
|
|
||||||
let allGhosts = true;
|
let allGhosts = true;
|
||||||
|
|
||||||
const speakActiveTime = new Date();
|
const speakActiveTime = new Date();
|
||||||
@@ -498,10 +496,9 @@ function useParticipantTiles(
|
|||||||
// Iterate over SFU participants (those who actually are present from the SFU perspective) and create tiles for them.
|
// Iterate over SFU participants (those who actually are present from the SFU perspective) and create tiles for them.
|
||||||
const tiles: TileDescriptor<ItemData>[] = sfuParticipants.flatMap(
|
const tiles: TileDescriptor<ItemData>[] = sfuParticipants.flatMap(
|
||||||
(sfuParticipant) => {
|
(sfuParticipant) => {
|
||||||
const hadSpokedInTime =
|
const spokeRecently =
|
||||||
!hasPresenter && sfuParticipant.lastSpokeAt
|
sfuParticipant.lastSpokeAt !== undefined &&
|
||||||
? sfuParticipant.lastSpokeAt > speakActiveTime
|
sfuParticipant.lastSpokeAt > speakActiveTime;
|
||||||
: false;
|
|
||||||
|
|
||||||
const id = sfuParticipant.identity;
|
const id = sfuParticipant.identity;
|
||||||
const member = findMatrixMember(matrixRoom, id);
|
const member = findMatrixMember(matrixRoom, id);
|
||||||
@@ -519,7 +516,7 @@ function useParticipantTiles(
|
|||||||
focused: false,
|
focused: false,
|
||||||
isPresenter: sfuParticipant.isScreenShareEnabled,
|
isPresenter: sfuParticipant.isScreenShareEnabled,
|
||||||
isSpeaker:
|
isSpeaker:
|
||||||
(sfuParticipant.isSpeaking || hadSpokedInTime) &&
|
(sfuParticipant.isSpeaking || spokeRecently) &&
|
||||||
!sfuParticipant.isLocal,
|
!sfuParticipant.isLocal,
|
||||||
hasVideo: sfuParticipant.isCameraEnabled,
|
hasVideo: sfuParticipant.isCameraEnabled,
|
||||||
local: sfuParticipant.isLocal,
|
local: sfuParticipant.isLocal,
|
||||||
|
|||||||
Reference in New Issue
Block a user