mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-06 02:47:24 +03:00
turn on switch by default if pan and/or tilt capability is available
This commit is contained in:
@@ -78,7 +78,7 @@ export default function Step3StreamConfig({
|
||||
|
||||
const onvif = wizardData.onvif;
|
||||
const ptzSupported = wizardData.probeResult?.ptz_supported === true;
|
||||
const hasPresets = (wizardData.probeResult?.presets_count ?? 0) > 0;
|
||||
const panTiltSupported = wizardData.probeResult?.pan_tilt_supported === true;
|
||||
const onvifInvalid = !!onvif?.enabled && (!onvif.host?.trim() || !onvif.port);
|
||||
|
||||
// Seed the PTZ pane once from the successful ONVIF probe
|
||||
@@ -87,7 +87,7 @@ export default function Step3StreamConfig({
|
||||
if (ptzSupported && wizardData.onvif === undefined) {
|
||||
onUpdate({
|
||||
onvif: {
|
||||
enabled: hasPresets,
|
||||
enabled: panTiltSupported,
|
||||
host: wizardData.host ?? "",
|
||||
port: wizardData.onvifPort ?? 8000,
|
||||
user: wizardData.username ?? "",
|
||||
@@ -97,7 +97,7 @@ export default function Step3StreamConfig({
|
||||
}
|
||||
}, [
|
||||
ptzSupported,
|
||||
hasPresets,
|
||||
panTiltSupported,
|
||||
wizardData.onvif,
|
||||
wizardData.host,
|
||||
wizardData.onvifPort,
|
||||
|
||||
@@ -212,6 +212,7 @@ export type OnvifProbeResponse = {
|
||||
firmware_version?: string;
|
||||
profiles_count?: number;
|
||||
ptz_supported?: boolean;
|
||||
pan_tilt_supported?: boolean;
|
||||
presets_count?: number;
|
||||
autotrack_supported?: boolean;
|
||||
move_status_supported?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user