Auto-unmute inbound audio when enabling two way audio (#14871)

* Automatically enable audio when initiating two way talk with mic

* remove check
This commit is contained in:
Josh Hawkins 2024-11-08 09:19:49 -06:00 committed by GitHub
parent 7bae9463b2
commit 3249ffb273
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -434,7 +434,13 @@ export default function LiveCameraView({
Icon={mic ? FaMicrophone : FaMicrophoneSlash} Icon={mic ? FaMicrophone : FaMicrophoneSlash}
isActive={mic} isActive={mic}
title={`${mic ? "Disable" : "Enable"} Two Way Talk`} title={`${mic ? "Disable" : "Enable"} Two Way Talk`}
onClick={() => setMic(!mic)} onClick={() => {
setMic(!mic);
// Turn on audio when enabling the mic if audio is currently off
if (!mic && !audio) {
setAudio(true);
}
}}
/> />
)} )}
{supportsAudioOutput && preferredLiveMode != "jsmpeg" && ( {supportsAudioOutput && preferredLiveMode != "jsmpeg" && (