mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-11 17:47:37 +03:00
Cleanup
This commit is contained in:
parent
2f2b8e388e
commit
224bf16a4a
@ -81,11 +81,10 @@ export function CameraStreamingDialog({
|
|||||||
|
|
||||||
const cameraMetadata = streamName ? streamMetadata?.[streamName] : undefined;
|
const cameraMetadata = streamName ? streamMetadata?.[streamName] : undefined;
|
||||||
|
|
||||||
const audioFeatures = useMemo(() => {
|
const { audioOutput: supportsAudioOutput } = useMemo(
|
||||||
return detectCameraAudioFeatures(cameraMetadata);
|
() => detectCameraAudioFeatures(cameraMetadata),
|
||||||
}, [cameraMetadata]);
|
[cameraMetadata],
|
||||||
|
);
|
||||||
const supportsAudioOutput = audioFeatures.audioOutput;
|
|
||||||
|
|
||||||
// handlers
|
// handlers
|
||||||
|
|
||||||
|
|||||||
@ -139,7 +139,6 @@ export default function Step4Validation({
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Query the specific go2rtc stream we just created
|
|
||||||
const response = await axios.get<LiveStreamMetadata>(
|
const response = await axios.get<LiveStreamMetadata>(
|
||||||
`go2rtc/streams/${go2rtcStreamId}`,
|
`go2rtc/streams/${go2rtcStreamId}`,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -169,12 +169,8 @@ export default function LiveCameraView({
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const audioFeatures = useMemo(() => {
|
const { twoWayAudio: supports2WayTalk, audioOutput: supportsAudioOutput } =
|
||||||
return detectCameraAudioFeatures(cameraMetadata);
|
useMemo(() => detectCameraAudioFeatures(cameraMetadata), [cameraMetadata]);
|
||||||
}, [cameraMetadata]);
|
|
||||||
|
|
||||||
const supports2WayTalk = audioFeatures.twoWayAudio;
|
|
||||||
const supportsAudioOutput = audioFeatures.audioOutput;
|
|
||||||
|
|
||||||
// camera enabled state
|
// camera enabled state
|
||||||
const { payload: enabledState } = useEnabledState(camera.name);
|
const { payload: enabledState } = useEnabledState(camera.name);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user