Repository navigation
Conversation
Pan/tilt-only cameras (fixed lens) still showed zoom in/out next to the PTZ pad in the web UI and the app; the buttons did nothing. The ONVIF probe now also asks the PTZ service for GetNodes and records whether the node lists a zoom movement space (Absolute/Relative/ ContinuousZoom...). ZoomSpeedSpace alone does not count. The result is stored as caps.ptzZoom and returned as capabilities.ptzZoom. The web UI and the app hide the zoom buttons only when ptzZoom is explicitly false. If GetNodes fails or carries no SupportedPTZSpaces, the value stays undefined and the buttons are shown as before, so cameras that do zoom keep working.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Pan/tilt-only PTZ cameras (fixed lens) still show the zoom in/out buttons next to the PTZ pad, in both the web live viewer and the app. Pressing them does nothing.
Change
GetNodesto the PTZ service.zoomFromNodes()returnstruewhenSupportedPTZSpaceslists a zoom movement space (Absolute/Relative/ContinuousZoom…Space),falsewhen the spaces list has none, andundefinedwhen the node has noSupportedPTZSpacesat all.ZoomSpeedSpaceon its own does not count, because it only sets the speed for other moves.caps.ptzZoomand exposed ascapabilities.ptzZoom.checkPtzupdates it like the presets.ptzZoom === false. IfGetNodesfails, or the camera does not describe its spaces, nothing changes and the buttons stay. Cameras that can zoom are not affected.Testing
bun testinserver/passes 77 of 77, including 4 new cases forzoomFromNodes.tsc --noEmitis clean for the server and the app, andbun test srcpasses inapp/.RelativePanTiltTranslationSpaceandContinuousPanTiltVelocitySpace. The camera reportsptzZoom: false, and the web live viewer shows the PTZ pad without zoom buttons.