Add support for multi-stream VoIP (#1735)

As per MSC3077.
This commit is contained in:
Kévin Commaille 2024-03-19 18:02:35 +01:00 committed by GitHub
parent 5c96f45556
commit 38796de79a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 84 additions and 11 deletions

View file

@ -8,6 +8,14 @@
"answer": {
"type" : "answer",
"sdp" : "v=0\r\no=- 6584580628695956864 2 IN IP4 127.0.0.1[...]"
},
"sdp_stream_metadata": {
"271828182845": {
"purpose": "m.screenshare"
},
"314159265358": {
"purpose": "m.usermedia"
}
}
}
}

View file

@ -9,6 +9,14 @@
"offer": {
"type" : "offer",
"sdp" : "v=0\r\no=- 6584580628695956864 2 IN IP4 127.0.0.1[...]"
},
"sdp_stream_metadata": {
"271828182845": {
"purpose": "m.screenshare"
},
"314159265358": {
"purpose": "m.usermedia"
}
}
}
}

View file

@ -9,6 +9,14 @@
"description": {
"type" : "offer",
"sdp" : "v=0\r\no=- 6584580628695956864 2 IN IP4 127.0.0.1[...]"
},
"sdp_stream_metadata": {
"271828182845": {
"purpose": "m.screenshare"
},
"314159265358": {
"purpose": "m.usermedia"
}
}
}
}

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

@ -27,6 +27,9 @@
}
},
"required": ["type", "sdp"]
},
"sdp_stream_metadata": {
"$ref": "components/sdp_stream_metadata.yaml"
}
},
"required": ["answer"]

View file

@ -35,7 +35,10 @@
"invitee": {
"type": "string",
"description": "The ID of the user being called. If omitted, any user in the room can answer.",
"x-addedInMatrixVersion": "1.7",
"x-addedInMatrixVersion": "1.7"
},
"sdp_stream_metadata": {
"$ref": "components/sdp_stream_metadata.yaml"
}
},
"required": ["offer", "lifetime"]

View file

@ -63,6 +63,8 @@ properties:
type: integer
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:
$ref: components/sdp_stream_metadata.yaml
required:
- description
- lifetime