add onvif verify option + improve streaming logic + reconnect websocket

This commit is contained in:
Cedric Verstraeten
2023-06-12 20:33:41 +02:00
parent 9cf9babd73
commit 60e8edc876
26 changed files with 559 additions and 90 deletions

View File

@@ -244,6 +244,40 @@ const docTemplate = `{
}
}
},
"/api/onvif/verify": {
"post": {
"security": [
{
"Bearer": []
}
],
"description": "Will verify the ONVIF connectivity.",
"tags": [
"config"
],
"summary": "Will verify the ONVIF connectivity.",
"operationId": "verify-onvif",
"parameters": [
{
"description": "Camera Config",
"name": "cameraConfig",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.IPCamera"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.APIResponse"
}
}
}
}
},
"/api/persistence/verify": {
"post": {
"security": [
@@ -347,9 +381,15 @@ const docTemplate = `{
"ipcamera": {
"$ref": "#/definitions/models.IPCamera"
},
"liveview": {
"type": "string"
},
"maxlengthrecording": {
"type": "integer"
},
"motion": {
"type": "string"
},
"name": {
"type": "string"
},
@@ -365,6 +405,12 @@ const docTemplate = `{
"raspicamera": {
"$ref": "#/definitions/models.RaspiCamera"
},
"recording": {
"type": "string"
},
"snapshots": {
"type": "string"
},
"transcodingresolution": {
"type": "integer"
},
@@ -391,6 +437,12 @@ const docTemplate = `{
"condition_uri": {
"type": "string"
},
"dropbox": {
"$ref": "#/definitions/models.Dropbox"
},
"friendly_name": {
"type": "string"
},
"heartbeaturi": {
"description": "obsolete",
"type": "string"
@@ -434,6 +486,9 @@ const docTemplate = `{
"region": {
"$ref": "#/definitions/models.Region"
},
"remove_after_upload": {
"type": "string"
},
"s3": {
"$ref": "#/definitions/models.S3"
},
@@ -477,6 +532,17 @@ const docTemplate = `{
}
}
},
"models.Dropbox": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"directory": {
"type": "string"
}
}
},
"models.IPCamera": {
"type": "object",
"properties": {
@@ -484,7 +550,7 @@ const docTemplate = `{
"type": "string"
},
"onvif": {
"type": "boolean"
"type": "string"
},
"onvif_password": {
"type": "string"