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
+13 -1
View File
@@ -239,6 +239,19 @@ type VersionResponse struct {
Version string `json:"version" example:"0.1.0-poc"`
}
// WebRTCConnectRequest is the body of the WebRTC connection API.
type WebRTCConnectRequest struct {
SDP string `json:"sdp"`
Type string `json:"type" example:"offer"`
DriverID string `json:"driver_id" example:"driver-alice"`
}
// WebRTCConnectResponse is the response to WebRTCConnectRequest.
type WebRTCConnectResponse struct {
SDP string `json:"sdp"`
Type string `json:"type" example:"answer"`
}
// LobbyDriver is the wire form of lobby.DriverMeta.
type LobbyDriver struct {
ID string `json:"id"`
@@ -249,7 +262,6 @@ type LobbyDriver struct {
LastSeenMs int64 `json:"last_seen_ms"`
Country string `json:"country,omitempty"`
AvatarHue int `json:"avatar_hue,omitempty"`
DeviceID *int `json:"device_id,omitempty"`
}
// LobbySnapshot is the full lobby state, broadcast on change.