11# MSC4515: RTC Transports discovery for widgets
22
33Widgets embedded in a room may need to know which real-time communication (RTC) backends the homeserver
4- offers, for example to join a call.
5- [ MSC4143] ( https://github.com/matrix-org/matrix-spec-proposals/pull/4143 ) Matrix RTC offers a way for clients
6- to discover the available transports through a new authenticated Client-Server endpoint, ** GET**
7- ` /_matrix/client/v1/rtc/transports ` .
4+ offers in order to join MatrixRTC sessions
5+ ([ MSC4143] ( https://github.com/matrix-org/matrix-spec-proposals/pull/4143 ) ).
6+ [ MSC4519: MatrixRTC Transports Registry] ( https://github.com/matrix-org/matrix-spec-proposals/pull/4519 )
7+ offers a way for clients to discover the available transports through a new authenticated
8+ Client-Server endpoint, ** GET** ` /_matrix/client/v1/rtc/transports ` .
89
910Given that this new endpoint is authenticated, widgets cannot access it directly: they need a new widget
1011action to get the information by delegating to the client.
1112
1213## Proposal
1314
14- The widget API is extended with one new interface to access the discovery of RTC transports. The client must
15+ The widget API is extended with one new action to access the discovery of RTC transports. The client must
1516approve the ` rtc_transports ` capability before the action can be used.
1617
1718To trigger the action to get the configuration, widgets will use a new fromWidget request with the action
@@ -30,7 +31,7 @@ To trigger the action to get the configuration, widgets will use a new fromWidge
3031If the widget did not get approved for the ` rtc_transports ` capability, the client MUST send an error
3132response (as required currently by the capabilities system for widgets).
3233
33- Upon reception of the action, the hosting client should call ** GET** ` /_matrix/client/v1/rtc/transports `
34+ Upon receipt of the action, the hosting client should call ** GET** ` /_matrix/client/v1/rtc/transports `
3435and forward the response body verbatim to the widget under the ` response ` field.
3536
3637** Success Response**
@@ -53,13 +54,14 @@ and forward the response body verbatim to the widget under the `response` field.
5354```
5455
5556The ` rtc_transports ` field follows the same format as
56- [ MSC4143 ] ( https://github.com/matrix-org/matrix-spec-proposals/pull/4143 ) , that is:
57+ [ MSC4519 ] ( https://github.com/matrix-org/matrix-spec-proposals/pull/4519 ) , that is:
5758
5859- ` rtc_transports ` (required, array): Array of objects describing the transports the homeserver supports.
59- - ` type ` : (required, string): The globally unique transport identifier. MUST follow the Common
60- Namespaced Identifier Grammar but without the namespacing requirements.
60+ - ` type ` : (required, string): The globally unique transport identifier. MUST be an
61+ [ Opaque Identifier] ( https://spec.matrix.org/v1.19/appendices/#opaque-identifiers ) registered
62+ in the MatrixRTC Transports Registry.
6163 - Optionally includes further properties specific to the transport type. The concrete properties are
62- defined by the transport's specification.
64+ defined by the transport's registered specification.
6365
6466
6567** Error Response**
@@ -87,13 +89,14 @@ The `error` envelope follows the standard widget API error format. At least two
8789
8890## Potential issues
8991
90- ** Staleness** . This is a one-shot fetch with no push/refresh (unlike MSC3846's watch_turn_servers). If
92+ ** Staleness** . This is a one-shot fetch with no push/refresh (unlike
93+ [ MSC3846] ( https://github.com/matrix-org/matrix-spec-proposals/pull/3846 ) 's watch_turn_servers). If
9194infrastructure rotates, the widget must re-request. This is intentional: RTC transports are quite stable.
9295
9396## Alternatives
9497
9598Instead of adding a new capability, maybe the ` get_rtc_transports ` could be granted automatically if the
96- widget is allowed to send rtc member events. There are no other examples of such mechanism, so we choose
99+ widget is allowed to send RTC member events. There are no other examples of such mechanism, so we choose
97100to keep the "one action ↔ one capability". If needed the client consent policy could merge several
98101capability in a single check for users.
99102
0 commit comments