Skip to content

Commit

Permalink
Auto-unmute inbound audio when enabling two way audio (blakeblackshea…
Browse files Browse the repository at this point in the history
…r#14871)

* Automatically enable audio when initiating two way talk with mic

* remove check
  • Loading branch information
hawkeye217 authored Nov 8, 2024
1 parent 7bae946 commit 3249ffb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion web/src/views/live/LiveCameraView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,13 @@ export default function LiveCameraView({
Icon={mic ? FaMicrophone : FaMicrophoneSlash}
isActive={mic}
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" && (
Expand Down

0 comments on commit 3249ffb

Please sign in to comment.