mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-19 06:20:25 +00:00
Automatically update intent on mute change
This commit is contained in:
@@ -128,6 +128,16 @@ export const GroupCallView: FC<Props> = ({
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
// Update our member event when our mute state changes.
|
||||
useEffect(() => {
|
||||
if (!isJoined) {
|
||||
return;
|
||||
}
|
||||
void rtcSession.updateCallIntent(
|
||||
muteStates.video.enabled ? "video" : "audio",
|
||||
);
|
||||
}, [isJoined, muteStates.video.enabled]);
|
||||
|
||||
useEffect(() => {
|
||||
logger.info("[Lifecycle] GroupCallView Component mounted");
|
||||
return (): void => {
|
||||
|
||||
Reference in New Issue
Block a user