Skip to content

Use MatrixRTC slots behind labs flag - #34392

Open
Johennes wants to merge 9 commits into
developfrom
johannes/slots
Open

Use MatrixRTC slots behind labs flag#34392
Johennes wants to merge 9 commits into
developfrom
johannes/slots

Conversation

@Johennes

@Johennes Johennes commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Requires: matrix-org/matrix-js-sdk#5438
Fixes: https://github.com/element-hq/voip-internal/issues/632
Fixes: https://github.com/element-hq/voip-internal/issues/634

This adds a new labs flag that enables the MatrixRTC slot logic from matrix-org/matrix-spec-proposals#4143. Getting this mixed in with the existing branches was a bit hairy. I expect we may have to iterate on the concrete form a little.

Checklist

Comment thread apps/web/src/hooks/room/useRoomCall.ts Outdated
Comment thread apps/web/src/hooks/room/useRoomCall.ts Outdated
Comment thread apps/web/src/hooks/room/useRoomCall.ts Outdated
Comment thread apps/web/src/utils/room/rtcSlot.ts
Comment thread apps/web/src/utils/room/rtcSlot.ts Outdated
logErrorAndShowErrorDialog(_t("voip|open_slot_failed_title"), e);
return false;
}
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of this function feels quite generic and that maybe it could go into the js-sdk, and likewise some of the app-specific logic in the hook feels like it could be pulled out to a utility like this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I'm struggling a bit in finding a good way to disentangle the two functions to create a good amount of reuse. Happy to follow any pointers though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems weird that there's session.getRtcSlot() but then to open a slot you have to manually send a state event. It feels like there ought to be an openRtcSlot() or maybe just this ensureSlotOpen() method on the session?

Also, wouldn't this get any open slot in the room, even if it were a slot for a different RTC application?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think I see what you mean now. Have opened matrix-org/matrix-js-sdk#5524 to extract the ensure methods to the SDK.

Comment thread apps/web/src/utils/room/rtcSlot.ts
Comment thread apps/web/src/components/views/settings/tabs/room/VoipRoomSettingsTab.test.tsx Outdated
Comment thread apps/web/src/settings/Settings.tsx
Comment thread apps/web/src/utils/room/rtcSlot.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants