mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-05 19:59:20 +00:00
@@ -145,8 +145,11 @@ export function useLiveKit(
|
|||||||
.catch((e) =>
|
.catch((e) =>
|
||||||
logger.error("Failed to sync video mute state with LiveKit", e)
|
logger.error("Failed to sync video mute state with LiveKit", e)
|
||||||
)
|
)
|
||||||
// Run the check recursively. Because the user can update the state (presses mute button)
|
// Run the check again after the change is done. Because the user
|
||||||
// while the device is enabling itself we need to check after we are done if its still in sync.
|
// can update the state (presses mute button) while the device is enabling
|
||||||
|
// 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.
|
||||||
.then(() => syncMuteStateAudio());
|
.then(() => syncMuteStateAudio());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user