From 7633d2c29964fde72dd0b562ea06598dd3ace969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 5 Mar 2024 18:25:30 +0100 Subject: [PATCH] Clarify that sdpMid and sdpMLineIndex are not required in `m.call.candidates` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MSC2746, merged in v1.17, introduced the end-of-candidates candidate, where only the `candidate` property is set to an empty string. Besides, the [WebRTC specification](https://www.w3.org/TR/webrtc/) says that only one of those fields is required in a normal candidate. Signed-off-by: Kévin Commaille --- .../schema/m.call.candidates.yaml | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/data/event-schemas/schema/m.call.candidates.yaml b/data/event-schemas/schema/m.call.candidates.yaml index 62df3fb5..c2961f1a 100644 --- a/data/event-schemas/schema/m.call.candidates.yaml +++ b/data/event-schemas/schema/m.call.candidates.yaml @@ -20,18 +20,26 @@ properties: properties: sdpMid: type: string - description: The SDP media type this candidate is intended for. + description: |- + The SDP media type this candidate is intended for. + + At least one of `sdpMid` or `sdpMLineIndex` is required, unless + this an end-of-candidates candidate. sdpMLineIndex: type: number - description: The index of the SDP 'm' line this candidate is intended - for. + description: |- + The index of the SDP 'm' line this candidate is intended for. + + At least one of `sdpMid` or `sdpMLineIndex` is required, unless + this an end-of-candidates candidate. candidate: type: string - description: The SDP 'a' line of the candidate. + description: |- + The SDP 'a' line of the candidate. + + If this is an end-of-candidates candidate, this is empty. required: - candidate - - sdpMLineIndex - - sdpMid required: - candidates type: