mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-05 19:59:20 +00:00
review
This commit is contained in:
@@ -80,15 +80,13 @@ export const GroupCallView: FC<Props> = ({
|
|||||||
const memberships = useMatrixRTCSessionMemberships(rtcSession);
|
const memberships = useMatrixRTCSessionMemberships(rtcSession);
|
||||||
const isJoined = useMatrixRTCSessionJoinState(rtcSession);
|
const isJoined = useMatrixRTCSessionJoinState(rtcSession);
|
||||||
|
|
||||||
// this should be useEffectEvent (only available in experimental versions)
|
// This should use `useEffectEvent` (only available in experimental versions)
|
||||||
const participantMuteOnce = useCallback(() => {
|
useEffect(() => {
|
||||||
if (memberships.length >= MUTE_PARTICIPANT_COUNT)
|
if (memberships.length >= MUTE_PARTICIPANT_COUNT)
|
||||||
muteStates.audio.setEnabled?.(false);
|
muteStates.audio.setEnabled?.(false);
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => participantMuteOnce(), [participantMuteOnce]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.rtcSession = rtcSession;
|
window.rtcSession = rtcSession;
|
||||||
return (): void => {
|
return (): void => {
|
||||||
|
|||||||
Reference in New Issue
Block a user