This commit is contained in:
Timo
2024-07-18 18:12:14 +02:00
parent df0e138229
commit ddd936643e

View File

@@ -80,15 +80,13 @@ export const GroupCallView: FC<Props> = ({
const memberships = useMatrixRTCSessionMemberships(rtcSession);
const isJoined = useMatrixRTCSessionJoinState(rtcSession);
// this should be useEffectEvent (only available in experimental versions)
const participantMuteOnce = useCallback(() => {
// This should use `useEffectEvent` (only available in experimental versions)
useEffect(() => {
if (memberships.length >= MUTE_PARTICIPANT_COUNT)
muteStates.audio.setEnabled?.(false);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
useEffect(() => participantMuteOnce(), [participantMuteOnce]);
useEffect(() => {
window.rtcSession = rtcSession;
return (): void => {