Skip to content

Comments

get extensions from ptz configurations#382

Open
momoAmch wants to merge 8 commits intoagsh:masterfrom
momoAmch:feature/add_get_extensions_from_ptzConfig
Open

get extensions from ptz configurations#382
momoAmch wants to merge 8 commits intoagsh:masterfrom
momoAmch:feature/add_get_extensions_from_ptzConfig

Conversation

@momoAmch
Copy link
Contributor

According to the ONVIF specifications (https://www.onvif.org/onvif/ver20/ptz/wsdl/ptz.wsdl
)
The GetConfiguration response may include an optional Extensions element. This element can contain PTZ control direction options, such as Reverse and EFlip modes.

To do: add a getConfiguration(token) function to retrieve a specific PTZ configuration using its token.

RogerHardiman and others added 8 commits November 13, 2025 23:57
Missing 'return' so the code continued on and tried to parse garbage.
Note, SHA256 is not available on older NodeJS versions so we need to import a JS SHA256 library in a future commit

Also this fails with mixed-mode ONVIF NVTs where the Authorizaition Header has multiple options eg

'Digest realm="PROXY", nonce="638987102484070019", algorithm=MD5, qop="auth", Digest realm="PROXY", nonce="638987102484070019", algorithm=SHA-256, qop="auth"'

The Regex breaks with "cannot read properties of null (reading 'slice')
This is described in the ONVIF Spec and tested with a HikVision camera in MD5+AND_SHA256 mode
The try/catch for crypto.createHash would have had the sme result, but this makes the code clearer
@momoAmch
Copy link
Contributor Author

Hello, there are some linting issues in the cam.js file. @

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants