unmute camera audio when starting two-way talk from the shortcut

This commit is contained in:
Josh Hawkins
2026-11-01 08:30:33 -06:00
parent 72c97f2b7d
commit b92ad23116
+9 -7
View File
@@ -511,6 +511,13 @@ export default function LiveCameraView({
}
}, [webRTCVerdictPending]);
const toggleMic = () => {
setMic(!mic);
if (!mic && !audio) {
setAudio(true);
}
};
useKeyboardListener(["m", "t", "Escape"], (key, modifiers) => {
if (!modifiers.down) {
return true;
@@ -525,7 +532,7 @@ export default function LiveCameraView({
break;
case "t":
if (supports2WayTalk && talkAvailable) {
setMic(!mic);
toggleMic();
return true;
}
break;
@@ -792,12 +799,7 @@ export default function LiveCameraView({
? t("twoWayTalk.disable", { ns: "views/live" })
: t("twoWayTalk.enable", { ns: "views/live" })
}
onClick={() => {
setMic(!mic);
if (!mic && !audio) {
setAudio(true);
}
}}
onClick={toggleMic}
disabled={!cameraEnabled || debug || !talkAvailable}
/>
)}