Factor out sdp_stream_metadata definition

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille 2024-02-28 22:07:43 +01:00
parent 8ce2b946ab
commit ef9546dabc
No known key found for this signature in database
GPG key ID: 29A48C1F03620416
4 changed files with 30 additions and 46 deletions

View file

@ -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

View file

@ -29,21 +29,7 @@
"required": ["type", "sdp"] "required": ["type", "sdp"]
}, },
"sdp_stream_metadata": { "sdp_stream_metadata": {
"type": "object", "$ref": "core-event-schema/sdp_stream_metadata.yaml"
"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"]
}
} }
}, },
"required": ["answer"] "required": ["answer"]

View file

@ -38,21 +38,7 @@
"x-addedInMatrixVersion": "1.7" "x-addedInMatrixVersion": "1.7"
}, },
"sdp_stream_metadata": { "sdp_stream_metadata": {
"type": "object", "$ref": "core-event-schema/sdp_stream_metadata.yaml"
"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"]
}
} }
}, },
"required": ["offer", "lifetime"] "required": ["offer", "lifetime"]

View file

@ -64,22 +64,7 @@ properties:
description: The time in milliseconds that the negotiation is valid for. description: The time in milliseconds that the negotiation is valid for.
Once the negotiation age exceeds this value, clients should discard it. Once the negotiation age exceeds this value, clients should discard it.
sdp_stream_metadata: sdp_stream_metadata:
type: object $ref: core-event-schema/sdp_stream_metadata.yaml
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
required: required:
- description - description
- lifetime - lifetime