mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-03 07:10:26 +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.
|
||||
// This async recursion makes sure that setCamera/MicrophoneEnabled is
|
||||
// called as little times as possible.
|
||||
await new Promise((r) => setTimeout(r, 20));
|
||||
syncMuteStateAudio();
|
||||
}
|
||||
};
|
||||
@@ -187,6 +188,7 @@ export function useLiveKit(
|
||||
}
|
||||
videoMuteUpdating.current = false;
|
||||
// see above
|
||||
await new Promise((r) => setTimeout(r, 20));
|
||||
syncMuteStateVideo();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user