mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-17 08:35:21 +03:00
Automatically enable audio when initiating two way talk with mic
This commit is contained in:
parent
7bae9463b2
commit
f66fdbb0cc
@ -434,7 +434,18 @@ 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 &&
|
||||
supportsAudioOutput &&
|
||||
preferredLiveMode !== "jsmpeg"
|
||||
) {
|
||||
setAudio(true);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{supportsAudioOutput && preferredLiveMode != "jsmpeg" && (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user