Add WebRTC support and remove deviceId from apis

This commit is contained in:
x0gp
2026-07-15 00:57:36 +04:00
parent 7a7913d2ee
commit c25e0bc581
11 changed files with 1428 additions and 17 deletions
+42
View File
@@ -691,6 +691,25 @@ definitions:
example: 0.1.0-poc
type: string
type: object
transport.WebRTCConnectRequest:
properties:
driver_id:
example: driver-alice
type: string
sdp:
type: string
type:
example: offer
type: string
type: object
transport.WebRTCConnectResponse:
properties:
sdp:
type: string
type:
example: answer
type: string
type: object
host: localhost:8080
info:
contact:
@@ -1973,6 +1992,29 @@ paths:
summary: Get MJPEG video stream from ESP32
tags:
- video
/api/webrtc/connect:
post:
consumes:
- application/json
description: Accepts SDP Offer, negotiates peer connection, and returns SDP
Answer. Routes video and control data via DataChannels.
parameters:
- description: SDP Offer details
in: body
name: body
required: true
schema:
$ref: '#/definitions/transport.WebRTCConnectRequest'
produces:
- application/json
responses:
"200":
description: SDP Answer negotiation success
schema:
$ref: '#/definitions/transport.WebRTCConnectResponse'
summary: Establish WebRTC connection for driver-car 1-to-1 proxying
tags:
- webrtc
/health:
get:
description: Returns 200 OK with current engine phase, WS connection count and