Skip to content

Commit d4e1f51

Browse files
committed
add docs to SessionMembershipData
1 parent a236b8a commit d4e1f51

1 file changed

Lines changed: 34 additions & 2 deletions

File tree

src/matrixrtc/CallMembership.ts

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,52 @@ type CallScope = "m.room" | "m.user";
2828
* Represents an entry in the memberships section of an m.call.member event as it is on the wire.
2929
**/
3030
export type SessionMembershipData = {
31+
/**
32+
* The RTC application defines the type of the RTC session.
33+
*/
3134
application: string;
35+
36+
/**
37+
* The id of this session.
38+
* A session can never span over multiple rooms so this id is to distinguish between
39+
* multiple session in one room. A room wide session that is not associated with a user,
40+
* and therefore immune to creation race conflicts, uses the `call_id: ""`.
41+
*/
3242
call_id: string;
3343
device_id: string;
3444

45+
/**
46+
* The focus selection system this user/membership is using.
47+
*/
3548
focus_active: Focus;
49+
50+
/**
51+
* A list of possible foci this uses knows about. One of them might be used based on the focus_active
52+
* selection system.
53+
*/
3654
foci_preferred: Focus[];
55+
56+
/**
57+
* Optional field that contains the creation of the session. If it is undefined the creation
58+
* is the `origin_server_ts` of the event itself. For updates to the event this property tracks
59+
* the `origin_server_ts` of the initial join event.
60+
* - If it is undefined it can be interpreted as a "Join".
61+
* - If it is defined it can be interpreted as an "Update"
62+
*/
3763
created_ts?: number;
3864

3965
// Application specific data
66+
67+
/**
68+
* If the `application` = `"m.call"` this defines if it is a room or user owned call.
69+
* There can always be one room scroped call but multiple user owned calls (breakout sessions)
70+
*/
4071
scope?: CallScope;
4172

4273
/**
43-
* Optionally we allow to define a delta to the created_ts when it expires. This should be set to multiple hours.
44-
* The only reason it exist is if delayed events fail. (for example because if a homeserver crashes)
74+
* Optionally we allow to define a delta to the `created_ts` that defines when the event is expired/invalid.
75+
* This should be set to multiple hours. The only reason it exist is to deal with failed delayed events.
76+
* (for example caused by a homeserver crashes)
4577
**/
4678
expires?: number;
4779
};

0 commit comments

Comments
 (0)