agsh / onvif

ONVIF node.js implementation
http://agsh.github.io/onvif/
MIT License
686 stars 232 forks source link

Issue in GetReplayUri() method #193

Open peppo65 opened 3 years ago

peppo65 commented 3 years ago

The response from GetReplayUri() method does not contain the uri field as expected. Can't be sure, but probably it should be fixed by just substituting line 41 in replay.js with:

callback.call(this, err, err ? null : linerase(data).getReplayUriResponse, xml);

RogerHardiman commented 3 years ago

Hi. Thanks for the report. It is quite possible there is a bug. When I added GetReplayURI I only had one things to test it with (a video recorder made by a UK manufacturer) and I've never tested it with any IP Cameras.

I do have some IP cameras that support recording now so will add an SD Card and test the fix. Roger

RogerHardiman commented 2 years ago

I've tested with a Bosch camera and also looked at the ONVIF Specification. The spec says GetReplayUriResponse will contain

GetReplayUriResponse:  Contains the Uri to be used for requesting the media stream.    xs:anyURI Uri [1][1]

So the Uri field must be present (it is not an optional field)

But what it has flagged up is a bug in Example2 where it was using the library so I can fix example2.

So, what camera do you have that returns a GetReplayUriResponse with no Uri field? I'd like to take a look at the XML reply from that camera