@unwanted/matrix-sdk-mini 34.12.0-1 → 34.12.0-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/git-revision.txt +1 -1
- package/lib/@types/event.d.ts +0 -19
- package/lib/@types/event.d.ts.map +1 -1
- package/lib/@types/event.js.map +1 -1
- package/lib/client.d.ts +2 -50
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +391 -501
- package/lib/client.js.map +1 -1
- package/lib/embedded.d.ts.map +1 -1
- package/lib/embedded.js +0 -1
- package/lib/embedded.js.map +1 -1
- package/lib/matrix.d.ts +0 -6
- package/lib/matrix.d.ts.map +1 -1
- package/lib/matrix.js +1 -5
- package/lib/matrix.js.map +1 -1
- package/package.json +1 -1
- package/src/@types/event.ts +2 -36
- package/src/client.ts +1 -150
- package/src/embedded.ts +0 -2
- package/src/matrix.ts +0 -13
- package/lib/matrixrtc/CallMembership.d.ts +0 -66
- package/lib/matrixrtc/CallMembership.d.ts.map +0 -1
- package/lib/matrixrtc/CallMembership.js +0 -197
- package/lib/matrixrtc/CallMembership.js.map +0 -1
- package/lib/matrixrtc/LivekitFocus.d.ts +0 -16
- package/lib/matrixrtc/LivekitFocus.d.ts.map +0 -1
- package/lib/matrixrtc/LivekitFocus.js +0 -20
- package/lib/matrixrtc/LivekitFocus.js.map +0 -1
- package/lib/matrixrtc/MatrixRTCSession.d.ts +0 -295
- package/lib/matrixrtc/MatrixRTCSession.d.ts.map +0 -1
- package/lib/matrixrtc/MatrixRTCSession.js +0 -1043
- package/lib/matrixrtc/MatrixRTCSession.js.map +0 -1
- package/lib/matrixrtc/MatrixRTCSessionManager.d.ts +0 -40
- package/lib/matrixrtc/MatrixRTCSessionManager.d.ts.map +0 -1
- package/lib/matrixrtc/MatrixRTCSessionManager.js +0 -146
- package/lib/matrixrtc/MatrixRTCSessionManager.js.map +0 -1
- package/lib/matrixrtc/focus.d.ts +0 -10
- package/lib/matrixrtc/focus.d.ts.map +0 -1
- package/lib/matrixrtc/focus.js +0 -1
- package/lib/matrixrtc/focus.js.map +0 -1
- package/lib/matrixrtc/index.d.ts +0 -7
- package/lib/matrixrtc/index.d.ts.map +0 -1
- package/lib/matrixrtc/index.js +0 -21
- package/lib/matrixrtc/index.js.map +0 -1
- package/lib/matrixrtc/types.d.ts +0 -19
- package/lib/matrixrtc/types.d.ts.map +0 -1
- package/lib/matrixrtc/types.js +0 -1
- package/lib/matrixrtc/types.js.map +0 -1
- package/lib/webrtc/audioContext.d.ts +0 -15
- package/lib/webrtc/audioContext.d.ts.map +0 -1
- package/lib/webrtc/audioContext.js +0 -46
- package/lib/webrtc/audioContext.js.map +0 -1
- package/lib/webrtc/call.d.ts +0 -560
- package/lib/webrtc/call.d.ts.map +0 -1
- package/lib/webrtc/call.js +0 -2541
- package/lib/webrtc/call.js.map +0 -1
- package/lib/webrtc/callEventHandler.d.ts +0 -37
- package/lib/webrtc/callEventHandler.d.ts.map +0 -1
- package/lib/webrtc/callEventHandler.js +0 -344
- package/lib/webrtc/callEventHandler.js.map +0 -1
- package/lib/webrtc/callEventTypes.d.ts +0 -73
- package/lib/webrtc/callEventTypes.d.ts.map +0 -1
- package/lib/webrtc/callEventTypes.js +0 -13
- package/lib/webrtc/callEventTypes.js.map +0 -1
- package/lib/webrtc/callFeed.d.ts +0 -128
- package/lib/webrtc/callFeed.d.ts.map +0 -1
- package/lib/webrtc/callFeed.js +0 -289
- package/lib/webrtc/callFeed.js.map +0 -1
- package/lib/webrtc/groupCall.d.ts +0 -323
- package/lib/webrtc/groupCall.d.ts.map +0 -1
- package/lib/webrtc/groupCall.js +0 -1337
- package/lib/webrtc/groupCall.js.map +0 -1
- package/lib/webrtc/groupCallEventHandler.d.ts +0 -31
- package/lib/webrtc/groupCallEventHandler.d.ts.map +0 -1
- package/lib/webrtc/groupCallEventHandler.js +0 -178
- package/lib/webrtc/groupCallEventHandler.js.map +0 -1
- package/lib/webrtc/mediaHandler.d.ts +0 -89
- package/lib/webrtc/mediaHandler.d.ts.map +0 -1
- package/lib/webrtc/mediaHandler.js +0 -437
- package/lib/webrtc/mediaHandler.js.map +0 -1
- package/lib/webrtc/stats/callFeedStatsReporter.d.ts +0 -8
- package/lib/webrtc/stats/callFeedStatsReporter.d.ts.map +0 -1
- package/lib/webrtc/stats/callFeedStatsReporter.js +0 -82
- package/lib/webrtc/stats/callFeedStatsReporter.js.map +0 -1
- package/lib/webrtc/stats/callStatsReportGatherer.d.ts +0 -25
- package/lib/webrtc/stats/callStatsReportGatherer.d.ts.map +0 -1
- package/lib/webrtc/stats/callStatsReportGatherer.js +0 -199
- package/lib/webrtc/stats/callStatsReportGatherer.js.map +0 -1
- package/lib/webrtc/stats/callStatsReportSummary.d.ts +0 -17
- package/lib/webrtc/stats/callStatsReportSummary.d.ts.map +0 -1
- package/lib/webrtc/stats/callStatsReportSummary.js +0 -1
- package/lib/webrtc/stats/callStatsReportSummary.js.map +0 -1
- package/lib/webrtc/stats/connectionStats.d.ts +0 -28
- package/lib/webrtc/stats/connectionStats.d.ts.map +0 -1
- package/lib/webrtc/stats/connectionStats.js +0 -26
- package/lib/webrtc/stats/connectionStats.js.map +0 -1
- package/lib/webrtc/stats/connectionStatsBuilder.d.ts +0 -5
- package/lib/webrtc/stats/connectionStatsBuilder.d.ts.map +0 -1
- package/lib/webrtc/stats/connectionStatsBuilder.js +0 -27
- package/lib/webrtc/stats/connectionStatsBuilder.js.map +0 -1
- package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts +0 -7
- package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts.map +0 -1
- package/lib/webrtc/stats/connectionStatsReportBuilder.js +0 -121
- package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +0 -1
- package/lib/webrtc/stats/groupCallStats.d.ts +0 -22
- package/lib/webrtc/stats/groupCallStats.d.ts.map +0 -1
- package/lib/webrtc/stats/groupCallStats.js +0 -78
- package/lib/webrtc/stats/groupCallStats.js.map +0 -1
- package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts +0 -10
- package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts.map +0 -1
- package/lib/webrtc/stats/media/mediaSsrcHandler.js +0 -57
- package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +0 -1
- package/lib/webrtc/stats/media/mediaTrackHandler.d.ts +0 -12
- package/lib/webrtc/stats/media/mediaTrackHandler.d.ts.map +0 -1
- package/lib/webrtc/stats/media/mediaTrackHandler.js +0 -62
- package/lib/webrtc/stats/media/mediaTrackHandler.js.map +0 -1
- package/lib/webrtc/stats/media/mediaTrackStats.d.ts +0 -86
- package/lib/webrtc/stats/media/mediaTrackStats.d.ts.map +0 -1
- package/lib/webrtc/stats/media/mediaTrackStats.js +0 -142
- package/lib/webrtc/stats/media/mediaTrackStats.js.map +0 -1
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts +0 -22
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts.map +0 -1
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +0 -76
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +0 -1
- package/lib/webrtc/stats/statsReport.d.ts +0 -99
- package/lib/webrtc/stats/statsReport.d.ts.map +0 -1
- package/lib/webrtc/stats/statsReport.js +0 -32
- package/lib/webrtc/stats/statsReport.js.map +0 -1
- package/lib/webrtc/stats/statsReportEmitter.d.ts +0 -15
- package/lib/webrtc/stats/statsReportEmitter.d.ts.map +0 -1
- package/lib/webrtc/stats/statsReportEmitter.js +0 -33
- package/lib/webrtc/stats/statsReportEmitter.js.map +0 -1
- package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts +0 -16
- package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts.map +0 -1
- package/lib/webrtc/stats/summaryStatsReportGatherer.js +0 -116
- package/lib/webrtc/stats/summaryStatsReportGatherer.js.map +0 -1
- package/lib/webrtc/stats/trackStatsBuilder.d.ts +0 -19
- package/lib/webrtc/stats/trackStatsBuilder.d.ts.map +0 -1
- package/lib/webrtc/stats/trackStatsBuilder.js +0 -168
- package/lib/webrtc/stats/trackStatsBuilder.js.map +0 -1
- package/lib/webrtc/stats/transportStats.d.ts +0 -11
- package/lib/webrtc/stats/transportStats.d.ts.map +0 -1
- package/lib/webrtc/stats/transportStats.js +0 -1
- package/lib/webrtc/stats/transportStats.js.map +0 -1
- package/lib/webrtc/stats/transportStatsBuilder.d.ts +0 -5
- package/lib/webrtc/stats/transportStatsBuilder.d.ts.map +0 -1
- package/lib/webrtc/stats/transportStatsBuilder.js +0 -34
- package/lib/webrtc/stats/transportStatsBuilder.js.map +0 -1
- package/lib/webrtc/stats/valueFormatter.d.ts +0 -4
- package/lib/webrtc/stats/valueFormatter.d.ts.map +0 -1
- package/lib/webrtc/stats/valueFormatter.js +0 -25
- package/lib/webrtc/stats/valueFormatter.js.map +0 -1
- package/src/matrixrtc/CallMembership.ts +0 -247
- package/src/matrixrtc/LivekitFocus.ts +0 -39
- package/src/matrixrtc/MatrixRTCSession.ts +0 -1319
- package/src/matrixrtc/MatrixRTCSessionManager.ts +0 -166
- package/src/matrixrtc/focus.ts +0 -25
- package/src/matrixrtc/index.ts +0 -22
- package/src/matrixrtc/types.ts +0 -36
- package/src/webrtc/audioContext.ts +0 -44
- package/src/webrtc/call.ts +0 -3074
- package/src/webrtc/callEventHandler.ts +0 -425
- package/src/webrtc/callEventTypes.ts +0 -93
- package/src/webrtc/callFeed.ts +0 -364
- package/src/webrtc/groupCall.ts +0 -1735
- package/src/webrtc/groupCallEventHandler.ts +0 -234
- package/src/webrtc/mediaHandler.ts +0 -484
- package/src/webrtc/stats/callFeedStatsReporter.ts +0 -94
- package/src/webrtc/stats/callStatsReportGatherer.ts +0 -219
- package/src/webrtc/stats/callStatsReportSummary.ts +0 -30
- package/src/webrtc/stats/connectionStats.ts +0 -47
- package/src/webrtc/stats/connectionStatsBuilder.ts +0 -28
- package/src/webrtc/stats/connectionStatsReportBuilder.ts +0 -140
- package/src/webrtc/stats/groupCallStats.ts +0 -93
- package/src/webrtc/stats/media/mediaSsrcHandler.ts +0 -57
- package/src/webrtc/stats/media/mediaTrackHandler.ts +0 -76
- package/src/webrtc/stats/media/mediaTrackStats.ts +0 -176
- package/src/webrtc/stats/media/mediaTrackStatsHandler.ts +0 -90
- package/src/webrtc/stats/statsReport.ts +0 -133
- package/src/webrtc/stats/statsReportEmitter.ts +0 -49
- package/src/webrtc/stats/summaryStatsReportGatherer.ts +0 -148
- package/src/webrtc/stats/trackStatsBuilder.ts +0 -207
- package/src/webrtc/stats/transportStats.ts +0 -26
- package/src/webrtc/stats/transportStatsBuilder.ts +0 -48
- package/src/webrtc/stats/valueFormatter.ts +0 -27
@@ -1,295 +0,0 @@
|
|
1
|
-
import { TypedEventEmitter } from "../models/typed-event-emitter.ts";
|
2
|
-
import { Room } from "../models/room.ts";
|
3
|
-
import { MatrixClient } from "../client.ts";
|
4
|
-
import { CallMembership } from "./CallMembership.ts";
|
5
|
-
import { Focus } from "./focus.ts";
|
6
|
-
import { MatrixEvent } from "../models/event.ts";
|
7
|
-
export declare enum MatrixRTCSessionEvent {
|
8
|
-
MembershipsChanged = "memberships_changed",
|
9
|
-
JoinStateChanged = "join_state_changed",
|
10
|
-
EncryptionKeyChanged = "encryption_key_changed"
|
11
|
-
}
|
12
|
-
export type MatrixRTCSessionEventHandlerMap = {
|
13
|
-
[MatrixRTCSessionEvent.MembershipsChanged]: (oldMemberships: CallMembership[], newMemberships: CallMembership[]) => void;
|
14
|
-
[MatrixRTCSessionEvent.JoinStateChanged]: (isJoined: boolean) => void;
|
15
|
-
[MatrixRTCSessionEvent.EncryptionKeyChanged]: (key: Uint8Array, encryptionKeyIndex: number, participantId: string) => void;
|
16
|
-
};
|
17
|
-
export interface JoinSessionConfig {
|
18
|
-
/**
|
19
|
-
* If true, generate and share a media key for this participant,
|
20
|
-
* and emit MatrixRTCSessionEvent.EncryptionKeyChanged when
|
21
|
-
* media keys for other participants become available.
|
22
|
-
*/
|
23
|
-
manageMediaKeys?: boolean;
|
24
|
-
/** Lets you configure how the events for the session are formatted.
|
25
|
-
* - legacy: use one event with a membership array.
|
26
|
-
* - MSC4143: use one event per membership (with only one membership per event)
|
27
|
-
* More details can be found in MSC4143 and by checking the types:
|
28
|
-
* `CallMembershipDataLegacy` and `SessionMembershipData`
|
29
|
-
*/
|
30
|
-
useLegacyMemberEvents?: boolean;
|
31
|
-
/**
|
32
|
-
* The timeout (in milliseconds) after we joined the call, that our membership should expire
|
33
|
-
* unless we have explicitly updated it.
|
34
|
-
*/
|
35
|
-
membershipExpiryTimeout?: number;
|
36
|
-
/**
|
37
|
-
* The period (in milliseconds) with which we check that our membership event still exists on the
|
38
|
-
* server. If it is not found we create it again.
|
39
|
-
*/
|
40
|
-
memberEventCheckPeriod?: number;
|
41
|
-
/**
|
42
|
-
* The minimum delay (in milliseconds) after which we will retry sending the membership event if it
|
43
|
-
* failed to send.
|
44
|
-
*/
|
45
|
-
callMemberEventRetryDelayMinimum?: number;
|
46
|
-
/**
|
47
|
-
* The jitter (in milliseconds) which is added to callMemberEventRetryDelayMinimum before retrying
|
48
|
-
* sending the membership event. e.g. if this is set to 1000, then a random delay of between 0 and 1000
|
49
|
-
* milliseconds will be added.
|
50
|
-
*/
|
51
|
-
callMemberEventRetryJitter?: number;
|
52
|
-
/**
|
53
|
-
* The minimum time (in milliseconds) between each attempt to send encryption key(s).
|
54
|
-
* e.g. if this is set to 1000, then we will send at most one key event every second.
|
55
|
-
*/
|
56
|
-
updateEncryptionKeyThrottle?: number;
|
57
|
-
/**
|
58
|
-
* The delay (in milliseconds) after a member leaves before we create and publish a new key, because people
|
59
|
-
* tend to leave calls at the same time.
|
60
|
-
*/
|
61
|
-
makeKeyDelay?: number;
|
62
|
-
/**
|
63
|
-
* The delay (in milliseconds) between creating and sending a new key and starting to encrypt with it. This
|
64
|
-
* gives other a chance to receive the new key to minimise the chance they don't get media they can't decrypt.
|
65
|
-
* The total time between a member leaving and the call switching to new keys is therefore:
|
66
|
-
* makeKeyDelay + useKeyDelay
|
67
|
-
*/
|
68
|
-
useKeyDelay?: number;
|
69
|
-
/**
|
70
|
-
* The timeout (in milliseconds) after which the server will consider the membership to have expired if it
|
71
|
-
* has not received a keep-alive from the client.
|
72
|
-
*/
|
73
|
-
membershipServerSideExpiryTimeout?: number;
|
74
|
-
/**
|
75
|
-
* The period (in milliseconds) that the client will send membership keep-alives to the server.
|
76
|
-
*/
|
77
|
-
membershipKeepAlivePeriod?: number;
|
78
|
-
}
|
79
|
-
/**
|
80
|
-
* A MatrixRTCSession manages the membership & properties of a MatrixRTC session.
|
81
|
-
* This class doesn't deal with media at all, just membership & properties of a session.
|
82
|
-
*/
|
83
|
-
export declare class MatrixRTCSession extends TypedEventEmitter<MatrixRTCSessionEvent, MatrixRTCSessionEventHandlerMap> {
|
84
|
-
private readonly client;
|
85
|
-
readonly room: Room;
|
86
|
-
memberships: CallMembership[];
|
87
|
-
private _callId;
|
88
|
-
private relativeExpiry;
|
89
|
-
private joinConfig?;
|
90
|
-
private get membershipExpiryTimeout();
|
91
|
-
private get memberEventCheckPeriod();
|
92
|
-
private get callMemberEventRetryDelayMinimum();
|
93
|
-
private get updateEncryptionKeyThrottle();
|
94
|
-
private get makeKeyDelay();
|
95
|
-
private get useKeyDelay();
|
96
|
-
/**
|
97
|
-
* If the server disallows the configured {@link membershipServerSideExpiryTimeout},
|
98
|
-
* this stores a delay that the server does allow.
|
99
|
-
*/
|
100
|
-
private membershipServerSideExpiryTimeoutOverride?;
|
101
|
-
private get membershipServerSideExpiryTimeout();
|
102
|
-
private get membershipKeepAlivePeriod();
|
103
|
-
private get callMemberEventRetryJitter();
|
104
|
-
private membershipId;
|
105
|
-
private memberEventTimeout?;
|
106
|
-
private expiryTimeout?;
|
107
|
-
private keysEventUpdateTimeout?;
|
108
|
-
private makeNewKeyTimeout?;
|
109
|
-
private setNewKeyTimeouts;
|
110
|
-
private ownFocusActive?;
|
111
|
-
private ownFociPreferred?;
|
112
|
-
private updateCallMembershipRunning;
|
113
|
-
private needCallMembershipUpdate;
|
114
|
-
private manageMediaKeys;
|
115
|
-
private useLegacyMemberEvents;
|
116
|
-
private encryptionKeys;
|
117
|
-
private lastEncryptionKeyUpdateRequest?;
|
118
|
-
private disconnectDelayId;
|
119
|
-
private lastMembershipFingerprints;
|
120
|
-
private currentEncryptionKeyIndex;
|
121
|
-
/**
|
122
|
-
* The statistics for this session.
|
123
|
-
*/
|
124
|
-
statistics: {
|
125
|
-
counters: {
|
126
|
-
/**
|
127
|
-
* The number of times we have sent a room event containing encryption keys.
|
128
|
-
*/
|
129
|
-
roomEventEncryptionKeysSent: number;
|
130
|
-
/**
|
131
|
-
* The number of times we have received a room event containing encryption keys.
|
132
|
-
*/
|
133
|
-
roomEventEncryptionKeysReceived: number;
|
134
|
-
};
|
135
|
-
totals: {
|
136
|
-
/**
|
137
|
-
* The total age (in milliseconds) of all room events containing encryption keys that we have received.
|
138
|
-
* We track the total age so that we can later calculate the average age of all keys received.
|
139
|
-
*/
|
140
|
-
roomEventEncryptionKeysReceivedTotalAge: number;
|
141
|
-
};
|
142
|
-
};
|
143
|
-
/**
|
144
|
-
* The callId (sessionId) of the call.
|
145
|
-
*
|
146
|
-
* It can be undefined since the callId is only known once the first membership joins.
|
147
|
-
* The callId is the property that, per definition, groups memberships into one call.
|
148
|
-
*/
|
149
|
-
get callId(): string | undefined;
|
150
|
-
/**
|
151
|
-
* Returns all the call memberships for a room, oldest first
|
152
|
-
*/
|
153
|
-
static callMembershipsForRoom(room: Room): CallMembership[];
|
154
|
-
/**
|
155
|
-
* Return the MatrixRTC session for the room, whether there are currently active members or not
|
156
|
-
*/
|
157
|
-
static roomSessionForRoom(client: MatrixClient, room: Room): MatrixRTCSession;
|
158
|
-
private constructor();
|
159
|
-
isJoined(): boolean;
|
160
|
-
/**
|
161
|
-
* Performs cleanup & removes timers for client shutdown
|
162
|
-
*/
|
163
|
-
stop(): Promise<void>;
|
164
|
-
/**
|
165
|
-
* Announces this user and device as joined to the MatrixRTC session,
|
166
|
-
* and continues to update the membership event to keep it valid until
|
167
|
-
* leaveRoomSession() is called
|
168
|
-
* This will not subscribe to updates: remember to call subscribe() separately if
|
169
|
-
* desired.
|
170
|
-
* This method will return immediately and the session will be joined in the background.
|
171
|
-
*
|
172
|
-
* @param fociActive - The object representing the active focus. (This depends on the focus type.)
|
173
|
-
* @param fociPreferred - The list of preferred foci this member proposes to use/knows/has access to.
|
174
|
-
* For the livekit case this is a list of foci generated from the homeserver well-known, the current rtc session,
|
175
|
-
* or optionally other room members homeserver well known.
|
176
|
-
* @param joinConfig - Additional configuration for the joined session.
|
177
|
-
*/
|
178
|
-
joinRoomSession(fociPreferred: Focus[], fociActive?: Focus, joinConfig?: JoinSessionConfig): void;
|
179
|
-
/**
|
180
|
-
* Announces this user and device as having left the MatrixRTC session
|
181
|
-
* and stops scheduled updates.
|
182
|
-
* This will not unsubscribe from updates: remember to call unsubscribe() separately if
|
183
|
-
* desired.
|
184
|
-
* The membership update required to leave the session will retry if it fails.
|
185
|
-
* Without network connection the promise will never resolve.
|
186
|
-
* A timeout can be provided so that there is a guarantee for the promise to resolve.
|
187
|
-
* @returns Whether the membership update was attempted and did not time out.
|
188
|
-
*/
|
189
|
-
leaveRoomSession(timeout?: number | undefined): Promise<boolean>;
|
190
|
-
getActiveFocus(): Focus | undefined;
|
191
|
-
/**
|
192
|
-
* Re-emit an EncryptionKeyChanged event for each tracked encryption key. This can be used to export
|
193
|
-
* the keys.
|
194
|
-
*/
|
195
|
-
reemitEncryptionKeys(): void;
|
196
|
-
/**
|
197
|
-
* Get the known encryption keys for a given participant device.
|
198
|
-
*
|
199
|
-
* @param userId the user ID of the participant
|
200
|
-
* @param deviceId the device ID of the participant
|
201
|
-
* @returns The encryption keys for the given participant, or undefined if they are not known.
|
202
|
-
*
|
203
|
-
* @deprecated This will be made private in a future release.
|
204
|
-
*/
|
205
|
-
getKeysForParticipant(userId: string, deviceId: string): Array<Uint8Array> | undefined;
|
206
|
-
private getKeysForParticipantInternal;
|
207
|
-
/**
|
208
|
-
* A map of keys used to encrypt and decrypt (we are using a symmetric
|
209
|
-
* cipher) given participant's media. This also includes our own key
|
210
|
-
*
|
211
|
-
* @deprecated This will be made private in a future release.
|
212
|
-
*/
|
213
|
-
getEncryptionKeys(): IterableIterator<[string, Array<Uint8Array>]>;
|
214
|
-
private getNewEncryptionKeyIndex;
|
215
|
-
/**
|
216
|
-
* Sets an encryption key at a specified index for a participant.
|
217
|
-
* The encryption keys for the local participant are also stored here under the
|
218
|
-
* user and device ID of the local participant.
|
219
|
-
* If the key is older than the existing key at the index, it will be ignored.
|
220
|
-
* @param userId - The user ID of the participant
|
221
|
-
* @param deviceId - Device ID of the participant
|
222
|
-
* @param encryptionKeyIndex - The index of the key to set
|
223
|
-
* @param encryptionKeyString - The string representation of the key to set in base64
|
224
|
-
* @param timestamp - The timestamp of the key. We assume that these are monotonic for each participant device.
|
225
|
-
* @param delayBeforeUse - If true, delay before emitting a key changed event. Useful when setting
|
226
|
-
* encryption keys for the local participant to allow time for the key to
|
227
|
-
* be distributed.
|
228
|
-
*/
|
229
|
-
private setEncryptionKey;
|
230
|
-
/**
|
231
|
-
* Generate a new sender key and add it at the next available index
|
232
|
-
* @param delayBeforeUse - If true, wait for a short period before setting the key for the
|
233
|
-
* media encryptor to use. If false, set the key immediately.
|
234
|
-
* @returns The index of the new key
|
235
|
-
*/
|
236
|
-
private makeNewSenderKey;
|
237
|
-
/**
|
238
|
-
* Requests that we resend our current keys to the room. May send a keys event immediately
|
239
|
-
* or queue for alter if one has already been sent recently.
|
240
|
-
*/
|
241
|
-
private requestSendCurrentKey;
|
242
|
-
/**
|
243
|
-
* Re-sends the encryption keys room event
|
244
|
-
*/
|
245
|
-
private sendEncryptionKeysEvent;
|
246
|
-
/**
|
247
|
-
* Sets a timer for the soonest membership expiry
|
248
|
-
*/
|
249
|
-
private setExpiryTimer;
|
250
|
-
getOldestMembership(): CallMembership | undefined;
|
251
|
-
getFocusInUse(): Focus | undefined;
|
252
|
-
/**
|
253
|
-
* Process `m.call.encryption_keys` events to track the encryption keys for call participants.
|
254
|
-
* This should be called each time the relevant event is received from a room timeline.
|
255
|
-
* If the event is malformed then it will be logged and ignored.
|
256
|
-
*
|
257
|
-
* @param event the event to process
|
258
|
-
*/
|
259
|
-
onCallEncryption: (event: MatrixEvent) => void;
|
260
|
-
private isMyMembership;
|
261
|
-
/**
|
262
|
-
* Examines the latest call memberships and handles any encryption key sending or rotation that is needed.
|
263
|
-
*
|
264
|
-
* This function should be called when the room members or call memberships might have changed.
|
265
|
-
*/
|
266
|
-
onMembershipUpdate: () => void;
|
267
|
-
private storeLastMembershipFingerprints;
|
268
|
-
/**
|
269
|
-
* Constructs our own membership
|
270
|
-
* @param prevMembership - The previous value of our call membership, if any
|
271
|
-
*/
|
272
|
-
private makeMyMembershipLegacy;
|
273
|
-
/**
|
274
|
-
* Constructs our own membership
|
275
|
-
*/
|
276
|
-
private makeMyMembership;
|
277
|
-
/**
|
278
|
-
* Returns true if our membership event needs to be updated
|
279
|
-
*/
|
280
|
-
private membershipEventNeedsUpdate;
|
281
|
-
private makeNewMembership;
|
282
|
-
/**
|
283
|
-
* Makes a new membership list given the old list along with this user's previous membership event
|
284
|
-
* (if any) and this device's previous membership (if any)
|
285
|
-
*/
|
286
|
-
private makeNewLegacyMemberships;
|
287
|
-
private triggerCallMembershipEventUpdate;
|
288
|
-
private updateCallMembershipEvent;
|
289
|
-
private scheduleDelayDisconnection;
|
290
|
-
private readonly delayDisconnection;
|
291
|
-
private stateEventsContainOngoingLegacySession;
|
292
|
-
private makeMembershipStateKey;
|
293
|
-
private onRotateKeyTimeout;
|
294
|
-
}
|
295
|
-
//# sourceMappingURL=MatrixRTCSession.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MatrixRTCSession.d.ts","sourceRoot":"","sources":["../../src/matrixrtc/MatrixRTCSession.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,iBAAiB,EAAE,MA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