(feat): improved microphone gate
(fix): weird behaviour related to users that are screensharing
This commit is contained in:
parent
e76c579bb4
commit
c795f691bf
5 changed files with 34 additions and 9 deletions
|
|
@ -16,6 +16,9 @@ export default function View() {
|
|||
const callIsFullscreen = useCall((state) => state.callIsFullscreen);
|
||||
|
||||
const focusedParticipantId = useCall((state) => state.focusedParticipantId);
|
||||
const focusedParticipantType = useCall(
|
||||
(state) => state.focusedParticipantType,
|
||||
);
|
||||
const activeScreenShareParticipantIds = useCall(
|
||||
(state) => state.activeScreenShareParticipantIds,
|
||||
);
|
||||
|
|
@ -157,6 +160,10 @@ export default function View() {
|
|||
const focusedParticipant = getParticipantById(focusedParticipantId);
|
||||
const focusedParticipantHasActiveScreenShare =
|
||||
activeScreenShareParticipantIdSet.has(focusedParticipantId);
|
||||
const focusedTileType: "user" | "stream" =
|
||||
focusedParticipantType === "stream" && focusedParticipantHasActiveScreenShare
|
||||
? "stream"
|
||||
: "user";
|
||||
const isImmersiveFocusedView = callIsFullscreen && usersInFocusedViewHidden;
|
||||
|
||||
return (
|
||||
|
|
@ -179,7 +186,7 @@ export default function View() {
|
|||
<Base
|
||||
fill={isImmersiveFocusedView}
|
||||
flush={isImmersiveFocusedView || isFocusedTileFlush}
|
||||
type={focusedParticipantHasActiveScreenShare ? "stream" : "user"}
|
||||
type={focusedTileType}
|
||||
participant={focusedParticipant}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue