mirror of
https://github.com/IS1DI/x0gp.git
synced 2026-07-16 20:47:55 +00:00
Add WebRTC support and remove deviceId from apis
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user