Audio toggle fixes

This commit is contained in:
Nick Mowen 2024-01-26 15:23:31 -07:00
parent cc3f028923
commit a7adb674e4
2 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ export default function DynamicCameraImage({
activeObjects.length > 0 ? "text-object" : "text-gray-600" activeObjects.length > 0 ? "text-object" : "text-gray-600"
}`} }`}
/> />
{camera.audio.enabled && ( {camera.audio.enabled_in_config && (
<LuEar <LuEar
className={`${ className={`${
parseInt(audioRms) >= camera.audio.min_volume parseInt(audioRms) >= camera.audio.min_volume

View File

@ -159,7 +159,7 @@ function Camera({ camera }: { camera: CameraConfig }) {
onClick={(e) => { onClick={(e) => {
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();
sendAudio(detectValue == "ON" ? "OFF" : "ON"); sendAudio(audioValue == "ON" ? "OFF" : "ON");
}} }}
> >
<LuEar /> <LuEar />