diff --git a/main.go b/main.go index e7988d8..e38353b 100644 --- a/main.go +++ b/main.go @@ -79,7 +79,7 @@ func deleteConnection(c *gin.Context) { func eventsSubscribe(c *gin.Context) { xaddr := c.Param("xaddr") - result, err := connections[xaddr].SubscribeEvents("http://172.16.19.230:8080/events/callback") + result, err := connections[xaddr].SubscribeEvents("http://172.16.19.230:8080/events/callback", "PT60S") if err != nil { c.JSON(http.StatusServiceUnavailable, gin.H{ "message": err.Error(), diff --git a/onvif.go b/onvif.go index eace733..f305332 100644 --- a/onvif.go +++ b/onvif.go @@ -86,9 +86,8 @@ func (c *Connection) GetDeviceInformation() (*device.GetDeviceInformationRespons func (c *Connection) SubscribeEvents( consumerAddress event.AttributedURIType, - terminationTime xsd.String, + terminationTime xsd.String, // PT60S ) (*event.SubscribeResponse, error) { - //terminationTime := xsd.String("PT60S") resp, err := c.Device.CallMethod(event.Subscribe{ ConsumerReference: &event.EndpointReferenceType{ Address: consumerAddress,