mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
fix sync loop by adding a 20ms break for the next mute sync
Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
@@ -171,6 +171,7 @@ export function useLiveKit(
|
|||||||
// itself we need might need to update the mute state right away.
|
// itself we need might need to update the mute state right away.
|
||||||
// This async recursion makes sure that setCamera/MicrophoneEnabled is
|
// This async recursion makes sure that setCamera/MicrophoneEnabled is
|
||||||
// called as little times as possible.
|
// called as little times as possible.
|
||||||
|
await new Promise((r) => setTimeout(r, 20));
|
||||||
syncMuteStateAudio();
|
syncMuteStateAudio();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -187,6 +188,7 @@ export function useLiveKit(
|
|||||||
}
|
}
|
||||||
videoMuteUpdating.current = false;
|
videoMuteUpdating.current = false;
|
||||||
// see above
|
// see above
|
||||||
|
await new Promise((r) => setTimeout(r, 20));
|
||||||
syncMuteStateVideo();
|
syncMuteStateVideo();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user