mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-06 07:20:25 +00:00
review
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user