feat: implement WebRTC signaling and UDP-based video streaming and control service

This commit is contained in:
2026-07-16 14:55:14 +04:00
parent 53288ea670
commit 41eaf49bb2
11 changed files with 614 additions and 108 deletions
+15 -5
View File
@@ -2003,7 +2003,7 @@ const docTemplate = `{
},
"/api/video/control": {
"post": {
"description": "Sends a text command (e.g. start, stop, left, right) to the ESP32 command port (UDP 8888).",
"description": "Sends a text command or a JSON control packet to the ESP32 command port (UDP 8888).",
"produces": [
"application/json"
],
@@ -2020,10 +2020,20 @@ const docTemplate = `{
},
{
"type": "string",
"description": "Command text",
"description": "Command text (legacy)",
"name": "cmd",
"in": "query",
"required": true
"in": "query"
},
{
"description": "Control packet JSON (steer, throttle, brake, gear, flags)",
"name": "body",
"in": "body",
"schema": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
}
}
],
"responses": {
@@ -2035,7 +2045,7 @@ const docTemplate = `{
}
},
"400": {
"description": "Missing cmd parameter",
"description": "Missing parameter or invalid body",
"schema": {
"type": "string"
}
+15 -5
View File
@@ -2001,7 +2001,7 @@
},
"/api/video/control": {
"post": {
"description": "Sends a text command (e.g. start, stop, left, right) to the ESP32 command port (UDP 8888).",
"description": "Sends a text command or a JSON control packet to the ESP32 command port (UDP 8888).",
"produces": [
"application/json"
],
@@ -2018,10 +2018,20 @@
},
{
"type": "string",
"description": "Command text",
"description": "Command text (legacy)",
"name": "cmd",
"in": "query",
"required": true
"in": "query"
},
{
"description": "Control packet JSON (steer, throttle, brake, gear, flags)",
"name": "body",
"in": "body",
"schema": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
}
}
],
"responses": {
@@ -2033,7 +2043,7 @@
}
},
"400": {
"description": "Missing cmd parameter",
"description": "Missing parameter or invalid body",
"schema": {
"type": "string"
}
+11 -5
View File
@@ -2219,18 +2219,24 @@ paths:
- system
/api/video/control:
post:
description: Sends a text command (e.g. start, stop, left, right) to the ESP32
command port (UDP 8888).
description: Sends a text command or a JSON control packet to the ESP32 command
port (UDP 8888).
parameters:
- description: Device ID (0..127)
in: query
name: id
type: integer
- description: Command text
- description: Command text (legacy)
in: query
name: cmd
required: true
type: string
- description: Control packet JSON (steer, throttle, brake, gear, flags)
in: body
name: body
schema:
additionalProperties:
type: integer
type: object
produces:
- application/json
responses:
@@ -2240,7 +2246,7 @@ paths:
additionalProperties: true
type: object
"400":
description: Missing cmd parameter
description: Missing parameter or invalid body
schema:
type: string
"500":