From f394c9f8a859d28e7320b7c159aebe2465595ab2 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Wed, 21 Dec 2022 12:50:02 +0100 Subject: [PATCH] api: add ID to WebRTC readers (#1318) --- apidocs/openapi.yaml | 4 +++- internal/core/webrtc_conn.go | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apidocs/openapi.yaml b/apidocs/openapi.yaml index 8049027c..3081e64a 100644 --- a/apidocs/openapi.yaml +++ b/apidocs/openapi.yaml @@ -415,7 +415,9 @@ components: properties: type: type: string - enum: [webRTConn] + enum: [webRTCConn] + id: + type: string RTSPConn: type: object diff --git a/internal/core/webrtc_conn.go b/internal/core/webrtc_conn.go index 96cc1f6b..7f0b2843 100644 --- a/internal/core/webrtc_conn.go +++ b/internal/core/webrtc_conn.go @@ -755,5 +755,6 @@ func (c *webRTCConn) readCandidate() (*webrtc.ICECandidateInit, error) { func (c *webRTCConn) apiReaderDescribe() interface{} { return struct { Type string `json:"type"` - }{"webRTCConn"} + ID string `json:"id"` + }{"webRTCConn", c.uuid.String()} }