matrix-js-sdk icon indicating copy to clipboard operation
matrix-js-sdk copied to clipboard

MatrixRTCSessionManager: Support arbitrarily many applications and slots

Open robintown opened this issue 2 months ago • 0 comments

https://github.com/matrix-org/matrix-js-sdk/pull/5022#discussion_r2412462402 @robintown:

Definitely not a task for this PR, but I'll note that particularly with the introduction of slots, we may want to rethink the role of the MatrixRTCSessionManager going forward.

Currently "one MatrixRTCSessionManager is required for each MatrixRTC sessionDescription (application, session id) that the client wants to support" - but with us designing MatrixRTC such that clients of the future can add and remove slots on demand, do we really want clients to have to implement their own management of MatrixRTCSessionManager objects? šŸ˜µā€šŸ’« (It would be non-trivial to manage them, as each Manager object handles a single slot ID across all rooms, so you need to ensure one Manager exists for each slot ID used in 1 or more rooms, if you want to support arbitrary slots…)

A more convenient design from my perspective would be for a single MatrixRTCSessionManager object to be responsible for all rooms and all slot IDs, storing a nested map of type Map<string, Map<string, MatrixRTCSession>> (room ID → slot ID → session). Which brings me back to #5033 😃

robintown avatar Oct 08 '25 12:10 robintown