mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +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
|
// 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(() => {
|
useEffect(() => {
|
||||||
logger.info("[Lifecycle] GroupCallView Component mounted");
|
logger.info("[Lifecycle] GroupCallView Component mounted");
|
||||||
return (): void => {
|
return (): void => {
|
||||||
|
|||||||
Reference in New Issue
Block a user