diff --git a/data/event-schemas/schema/core-event-schema/sdp_stream_metadata.yaml b/data/event-schemas/schema/core-event-schema/sdp_stream_metadata.yaml new file mode 100644 index 00000000..6d06f8bc --- /dev/null +++ b/data/event-schemas/schema/core-event-schema/sdp_stream_metadata.yaml @@ -0,0 +1,27 @@ +type: object +x-addedInMatrixVersion: "1.10" +description: |- + Metadata describing the [streams](/client-server-api/#streams) that will be + sent. + + This is a map of stream ID to metadata about the stream. +additionalProperties: + type: object + title: StreamMetadata + description: Metadata describing a stream. + properties: + purpose: + type: string + enum: + - m.usermedia + - m.screenshare + description: |- + The purpose of the stream. + + The possible values are: + + * `m.usermedia` - stream that contains the webcam and/or microphone + tracks + * `m.screenshare` - stream with the screen-sharing tracks + required: + - purpose diff --git a/data/event-schemas/schema/m.call.answer.yaml b/data/event-schemas/schema/m.call.answer.yaml index 44e40dd2..987b78f8 100644 --- a/data/event-schemas/schema/m.call.answer.yaml +++ b/data/event-schemas/schema/m.call.answer.yaml @@ -29,21 +29,7 @@ "required": ["type", "sdp"] }, "sdp_stream_metadata": { - "type": "object", - "title": "SDP Stream Metadata", - "x-addedInMatrixVersion": "1.7", - "description": "Object describing the streams that will be sent", - "additionalProperties": { - "type": "object", - "title": "Stream Metadata Block", - "properties": { - "purpose": { - "type": "string", - "enum": ["m.usermedia", "m.screenshare"] - } - }, - "required": ["purpose"] - } + "$ref": "core-event-schema/sdp_stream_metadata.yaml" } }, "required": ["answer"] diff --git a/data/event-schemas/schema/m.call.invite.yaml b/data/event-schemas/schema/m.call.invite.yaml index 8bdde9b8..d779d99b 100644 --- a/data/event-schemas/schema/m.call.invite.yaml +++ b/data/event-schemas/schema/m.call.invite.yaml @@ -38,21 +38,7 @@ "x-addedInMatrixVersion": "1.7" }, "sdp_stream_metadata": { - "type": "object", - "title": "SDP Stream Metadata", - "x-addedInMatrixVersion": "1.7", - "description": "Object describing the streams that will be sent", - "additionalProperties": { - "type": "object", - "title": "Stream Metadata Block", - "properties": { - "purpose": { - "type": "string", - "enum": ["m.usermedia", "m.screenshare"] - } - }, - "required": ["purpose"] - } + "$ref": "core-event-schema/sdp_stream_metadata.yaml" } }, "required": ["offer", "lifetime"] diff --git a/data/event-schemas/schema/m.call.negotiate.yaml b/data/event-schemas/schema/m.call.negotiate.yaml index 2fb4b0aa..16674efd 100644 --- a/data/event-schemas/schema/m.call.negotiate.yaml +++ b/data/event-schemas/schema/m.call.negotiate.yaml @@ -64,22 +64,7 @@ properties: description: The time in milliseconds that the negotiation is valid for. Once the negotiation age exceeds this value, clients should discard it. sdp_stream_metadata: - type: object - title: SDP Stream Metadata - x-addedInMatrixVersion: '1.7' - description: Object describing the streams that will be sent - additionalProperties: - type: object - title: Stream Metadata Block - properties: - purpose: - type: string - enum: - - m.usermedia - - m.screenshare - required: - - purpose - + $ref: core-event-schema/sdp_stream_metadata.yaml required: - description - lifetime