|
@@ -1,33 +1,3 @@
|
1
|
|
-/**
|
2
|
|
- * Creates a conference event.
|
3
|
|
- *
|
4
|
|
- * @param {string} action - The action of the event.
|
5
|
|
- * @param {Object} attributes - The attributes to be added to the event.
|
6
|
|
- * @returns {{type: string, source: string, action: string, attributes: object}}
|
7
|
|
- */
|
8
|
|
-export function createConferenceEvent(action: string, attributes: any): {
|
9
|
|
- type: string;
|
10
|
|
- source: string;
|
11
|
|
- action: string;
|
12
|
|
- attributes: object;
|
13
|
|
-};
|
14
|
|
-/**
|
15
|
|
- * Creates an event which contains information about the audio output problem (the user id of the affected participant,
|
16
|
|
- * the local audio levels and the remote audio levels that triggered the event).
|
17
|
|
- *
|
18
|
|
- * @param {string} userID - The user id of the affected participant.
|
19
|
|
- * @param {*} localAudioLevels - The local audio levels.
|
20
|
|
- * @param {*} remoteAudioLevels - The audio levels received from the participant.
|
21
|
|
- */
|
22
|
|
-export function createAudioOutputProblemEvent(userID: string, localAudioLevels: any, remoteAudioLevels: any): {
|
23
|
|
- type: string;
|
24
|
|
- action: string;
|
25
|
|
- attributes: {
|
26
|
|
- userID: string;
|
27
|
|
- localAudioLevels: any;
|
28
|
|
- remoteAudioLevels: any;
|
29
|
|
- };
|
30
|
|
-};
|
31
|
1
|
/**
|
32
|
2
|
* This class exports constants and factory methods related to the analytics
|
33
|
3
|
* API provided by AnalyticsAdapter. In order for entries in a database to be
|
|
@@ -51,287 +21,475 @@ export function createAudioOutputProblemEvent(userID: string, localAudioLevels:
|
51
|
21
|
* should create new objects.
|
52
|
22
|
*
|
53
|
23
|
*/
|
|
24
|
+export declare enum AnalyticsEvents {
|
|
25
|
+ /**
|
|
26
|
+ * The constant which identifies an event of type "operational".
|
|
27
|
+ */
|
|
28
|
+ TYPE_OPERATIONAL = "operational",
|
|
29
|
+ /**
|
|
30
|
+ * The constant which identifies an event of type "page".
|
|
31
|
+ */
|
|
32
|
+ TYPE_PAGE = "page",
|
|
33
|
+ /**
|
|
34
|
+ * The constant which identifies an event of type "track".
|
|
35
|
+ */
|
|
36
|
+ TYPE_TRACK = "track",
|
|
37
|
+ /**
|
|
38
|
+ * The constant which identifies an event of type "ui".
|
|
39
|
+ */
|
|
40
|
+ TYPE_UI = "ui",
|
|
41
|
+ /**
|
|
42
|
+ * The "action" value for Jingle events which indicates that the Jingle session
|
|
43
|
+ * was restarted (TODO: verify/fix the documentation)
|
|
44
|
+ */
|
|
45
|
+ ACTION_JINGLE_RESTART = "restart",
|
|
46
|
+ /**
|
|
47
|
+ * The "action" value for Jingle events which indicates that a session-accept
|
|
48
|
+ * timed out (TODO: verify/fix the documentation)
|
|
49
|
+ */
|
|
50
|
+ ACTION_JINGLE_SA_TIMEOUT = "session-accept.timeout",
|
|
51
|
+ /**
|
|
52
|
+ * The "action" value for Jingle events which indicates that a session-initiate
|
|
53
|
+ * was received.
|
|
54
|
+ */
|
|
55
|
+ ACTION_JINGLE_SI_RECEIVED = "session-initiate.received",
|
|
56
|
+ /**
|
|
57
|
+ * The "action" value for Jingle events which indicates that a session-initiate
|
|
58
|
+ * not arrived within a timeout (the value is specified in
|
|
59
|
+ * the {@link JingleSessionPC}.
|
|
60
|
+ */
|
|
61
|
+ ACTION_JINGLE_SI_TIMEOUT = "session-initiate.timeout",
|
|
62
|
+ /**
|
|
63
|
+ * A constant for the "terminate" action for Jingle events. TODO: verify/fix
|
|
64
|
+ * the documentation)
|
|
65
|
+ */
|
|
66
|
+ ACTION_JINGLE_TERMINATE = "terminate",
|
|
67
|
+ /**
|
|
68
|
+ * The "action" value for Jingle events which indicates that a transport-replace
|
|
69
|
+ * was received.
|
|
70
|
+ */
|
|
71
|
+ ACTION_JINGLE_TR_RECEIVED = "transport-replace.received",
|
|
72
|
+ /**
|
|
73
|
+ * The "action" value for Jingle events which indicates that a transport-replace
|
|
74
|
+ * succeeded (TODO: verify/fix the documentation)
|
|
75
|
+ */
|
|
76
|
+ ACTION_JINGLE_TR_SUCCESS = "transport-replace.success",
|
|
77
|
+ /**
|
|
78
|
+ * The "action" value for P2P events which indicates that P2P session initiate message has been rejected by the client
|
|
79
|
+ * because the mandatory requirements were not met.
|
|
80
|
+ */
|
|
81
|
+ ACTION_P2P_DECLINED = "decline",
|
|
82
|
+ /**
|
|
83
|
+ * The "action" value for P2P events which indicates that a connection was
|
|
84
|
+ * established (TODO: verify/fix the documentation)
|
|
85
|
+ */
|
|
86
|
+ ACTION_P2P_ESTABLISHED = "established",
|
|
87
|
+ /**
|
|
88
|
+ * The "action" value for P2P events which indicates that something failed.
|
|
89
|
+ */
|
|
90
|
+ ACTION_P2P_FAILED = "failed",
|
|
91
|
+ /**
|
|
92
|
+ * The "action" value for P2P events which indicates that a switch to
|
|
93
|
+ * jitsi-videobridge happened.
|
|
94
|
+ */
|
|
95
|
+ ACTION_P2P_SWITCH_TO_JVB = "switch.to.jvb",
|
|
96
|
+ /**
|
|
97
|
+ * The name of an event which indicates an available device. We send one such
|
|
98
|
+ * event per available device once when the available devices are first known,
|
|
99
|
+ * and every time that they change
|
|
100
|
+ *
|
|
101
|
+ * Properties:
|
|
102
|
+ * audio_input_device_count: the number of audio input devices available at
|
|
103
|
+ * the time the event was sent.
|
|
104
|
+ * audio_output_device_count: the number of audio output devices available
|
|
105
|
+ * at the time the event was sent.
|
|
106
|
+ * video_input_device_count: the number of video input devices available at
|
|
107
|
+ * the time the event was sent.
|
|
108
|
+ * video_output_device_count: the number of video output devices available
|
|
109
|
+ * at the time the event was sent.
|
|
110
|
+ * device_id: an identifier of the device described in this event.
|
|
111
|
+ * device_group_id:
|
|
112
|
+ * device_kind: one of 'audioinput', 'audiooutput', 'videoinput' or
|
|
113
|
+ * 'videooutput'.
|
|
114
|
+ * device_label: a string which describes the device.
|
|
115
|
+ */
|
|
116
|
+ AVAILABLE_DEVICE = "available.device",
|
|
117
|
+ /**
|
|
118
|
+ * This appears to be fired only in certain cases when the XMPP connection
|
|
119
|
+ * disconnects (and it was intentional?). It is currently never observed to
|
|
120
|
+ * fire in production.
|
|
121
|
+ *
|
|
122
|
+ * TODO: document
|
|
123
|
+ *
|
|
124
|
+ * Properties:
|
|
125
|
+ * message: an error message
|
|
126
|
+ */
|
|
127
|
+ CONNECTION_DISCONNECTED = "connection.disconnected",
|
|
128
|
+ /**
|
|
129
|
+ * Indicates that the user of the application provided feedback in terms of a
|
|
130
|
+ * rating (an integer from 1 to 5) and an optional comment.
|
|
131
|
+ * Properties:
|
|
132
|
+ * value: the user's rating (an integer from 1 to 5)
|
|
133
|
+ * comment: the user's comment
|
|
134
|
+ */
|
|
135
|
+ FEEDBACK = "feedback",
|
|
136
|
+ /**
|
|
137
|
+ * Indicates the duration of a particular phase of the ICE connectivity
|
|
138
|
+ * establishment.
|
|
139
|
+ *
|
|
140
|
+ * Properties:
|
|
141
|
+ * phase: the ICE phase (e.g. 'gathering', 'checking', 'establishment')
|
|
142
|
+ * value: the duration in milliseconds.
|
|
143
|
+ * p2p: whether the associated ICE connection is p2p or towards a
|
|
144
|
+ * jitsi-videobridge
|
|
145
|
+ * initiator: whether the local Jingle peer is the initiator or responder
|
|
146
|
+ * in the Jingle session. XXX we probably actually care about the ICE
|
|
147
|
+ * role (controlling vs controlled), and we assume that this correlates
|
|
148
|
+ * with the Jingle initiator.
|
|
149
|
+ */
|
|
150
|
+ ICE_DURATION = "ice.duration",
|
|
151
|
+ /**
|
|
152
|
+ * Indicates the difference in milliseconds between the ICE establishment time
|
|
153
|
+ * for the P2P and JVB connections (e.g. a value of 10 would indicate that the
|
|
154
|
+ * P2P connection took 10ms more than JVB connection to establish).
|
|
155
|
+ *
|
|
156
|
+ * Properties:
|
|
157
|
+ * value: the difference in establishment durations in milliseconds.
|
|
158
|
+ *
|
|
159
|
+ */
|
|
160
|
+ ICE_ESTABLISHMENT_DURATION_DIFF = "ice.establishment.duration.diff",
|
|
161
|
+ /**
|
|
162
|
+ * Indicates that the ICE state has changed.
|
|
163
|
+ *
|
|
164
|
+ * Properties:
|
|
165
|
+ * state: the ICE state which was entered (e.g. 'checking', 'connected',
|
|
166
|
+ * 'completed', etc).
|
|
167
|
+ * value: the time in milliseconds (as reported by
|
|
168
|
+ * window.performance.now()) that the state change occurred.
|
|
169
|
+ * p2p: whether the associated ICE connection is p2p or towards a
|
|
170
|
+ * jitsi-videobridge
|
|
171
|
+ * signalingState: The signaling state of the associated PeerConnection
|
|
172
|
+ * reconnect: whether the associated Jingle session is in the process of
|
|
173
|
+ * reconnecting (or is it ICE? TODO: verify/fix the documentation)
|
|
174
|
+ */
|
|
175
|
+ ICE_STATE_CHANGED = "ice.state.changed",
|
|
176
|
+ /**
|
|
177
|
+ * Indicates that no bytes have been sent for the track.
|
|
178
|
+ *
|
|
179
|
+ * Properties:
|
|
180
|
+ * mediaType: the media type of the local track ('audio' or 'video').
|
|
181
|
+ */
|
|
182
|
+ NO_BYTES_SENT = "track.no-bytes-sent",
|
|
183
|
+ /**
|
|
184
|
+ * Indicates that a track was unmuted (?).
|
|
185
|
+ *
|
|
186
|
+ * Properties:
|
|
187
|
+ * mediaType: the media type of the local track ('audio' or 'video').
|
|
188
|
+ * trackType: the type of the track ('local' or 'remote').
|
|
189
|
+ * value: TODO: document
|
|
190
|
+ */
|
|
191
|
+ TRACK_UNMUTED = "track.unmuted"
|
|
192
|
+}
|
|
193
|
+export declare const TYPE_OPERATIONAL = AnalyticsEvents.TYPE_OPERATIONAL;
|
|
194
|
+export declare const TYPE_PAGE = AnalyticsEvents.TYPE_PAGE;
|
|
195
|
+export declare const TYPE_TRACK = AnalyticsEvents.TYPE_TRACK;
|
|
196
|
+export declare const TYPE_UI = AnalyticsEvents.TYPE_UI;
|
|
197
|
+export declare const ACTION_JINGLE_RESTART = AnalyticsEvents.ACTION_JINGLE_RESTART;
|
|
198
|
+export declare const ACTION_JINGLE_SA_TIMEOUT = AnalyticsEvents.ACTION_JINGLE_SA_TIMEOUT;
|
|
199
|
+export declare const ACTION_JINGLE_SI_RECEIVED = AnalyticsEvents.ACTION_JINGLE_SI_RECEIVED;
|
|
200
|
+export declare const ACTION_JINGLE_SI_TIMEOUT = AnalyticsEvents.ACTION_JINGLE_SI_TIMEOUT;
|
|
201
|
+export declare const ACTION_JINGLE_TERMINATE = AnalyticsEvents.ACTION_JINGLE_TERMINATE;
|
|
202
|
+export declare const ACTION_JINGLE_TR_RECEIVED = AnalyticsEvents.ACTION_JINGLE_TR_RECEIVED;
|
|
203
|
+export declare const ACTION_JINGLE_TR_SUCCESS = AnalyticsEvents.ACTION_JINGLE_TR_SUCCESS;
|
|
204
|
+export declare const ACTION_P2P_DECLINED = AnalyticsEvents.ACTION_P2P_DECLINED;
|
|
205
|
+export declare const ACTION_P2P_ESTABLISHED = AnalyticsEvents.ACTION_P2P_ESTABLISHED;
|
|
206
|
+export declare const ACTION_P2P_FAILED = AnalyticsEvents.ACTION_P2P_FAILED;
|
|
207
|
+export declare const ACTION_P2P_SWITCH_TO_JVB = AnalyticsEvents.ACTION_P2P_SWITCH_TO_JVB;
|
|
208
|
+export declare const AVAILABLE_DEVICE = AnalyticsEvents.AVAILABLE_DEVICE;
|
|
209
|
+export declare const CONNECTION_DISCONNECTED = AnalyticsEvents.CONNECTION_DISCONNECTED;
|
|
210
|
+export declare const FEEDBACK = AnalyticsEvents.FEEDBACK;
|
|
211
|
+export declare const ICE_DURATION = AnalyticsEvents.ICE_DURATION;
|
|
212
|
+export declare const ICE_ESTABLISHMENT_DURATION_DIFF = AnalyticsEvents.ICE_ESTABLISHMENT_DURATION_DIFF;
|
|
213
|
+export declare const ICE_STATE_CHANGED = AnalyticsEvents.ICE_STATE_CHANGED;
|
|
214
|
+export declare const NO_BYTES_SENT = AnalyticsEvents.NO_BYTES_SENT;
|
|
215
|
+export declare const TRACK_UNMUTED = AnalyticsEvents.TRACK_UNMUTED;
|
54
|
216
|
/**
|
55
|
|
- * The constant which identifies an event of type "operational".
|
56
|
|
- * @type {string}
|
|
217
|
+ * Creates an operational event which indicates that we have received a
|
|
218
|
+ * "bridge down" event from jicofo.
|
57
|
219
|
*/
|
58
|
|
-export const TYPE_OPERATIONAL: string;
|
59
|
|
-/**
|
60
|
|
- * The constant which identifies an event of type "page".
|
61
|
|
- * @type {string}
|
62
|
|
- */
|
63
|
|
-export const TYPE_PAGE: string;
|
64
|
|
-/**
|
65
|
|
- * The constant which identifies an event of type "track".
|
66
|
|
- * @type {string}
|
67
|
|
- */
|
68
|
|
-export const TYPE_TRACK: string;
|
|
220
|
+export declare const createBridgeDownEvent: () => {
|
|
221
|
+ action: string;
|
|
222
|
+ actionSubject: string;
|
|
223
|
+ type: AnalyticsEvents;
|
|
224
|
+};
|
69
|
225
|
/**
|
70
|
|
- * The constant which identifies an event of type "ui".
|
71
|
|
- * @type {string}
|
|
226
|
+ * Creates an event which indicates that the XMPP connection failed
|
|
227
|
+ * @param errorType TODO
|
|
228
|
+ * @param errorMessage TODO
|
|
229
|
+ * @param detail connection failed details.
|
72
|
230
|
*/
|
73
|
|
-export const TYPE_UI: string;
|
|
231
|
+export declare const createConnectionFailedEvent: (errorType: unknown, errorMessage: unknown, details: object) => {
|
|
232
|
+ type: AnalyticsEvents;
|
|
233
|
+ action: string;
|
|
234
|
+ attributes: {
|
|
235
|
+ error_type: unknown;
|
|
236
|
+ error_message: unknown;
|
|
237
|
+ };
|
|
238
|
+};
|
74
|
239
|
/**
|
75
|
|
- * The "action" value for Jingle events which indicates that the Jingle session
|
76
|
|
- * was restarted (TODO: verify/fix the documentation)
|
77
|
|
- * @type {string}
|
|
240
|
+ * Creates a conference event.
|
|
241
|
+ *
|
|
242
|
+ * @param action - The action of the event.
|
|
243
|
+ * @param attributes - The attributes to be added to the event.
|
78
|
244
|
*/
|
79
|
|
-export const ACTION_JINGLE_RESTART: string;
|
|
245
|
+export declare const createConferenceEvent: (action: string, attributes: object) => {
|
|
246
|
+ action: string;
|
|
247
|
+ attributes: object;
|
|
248
|
+ source: string;
|
|
249
|
+ type: AnalyticsEvents;
|
|
250
|
+};
|
80
|
251
|
/**
|
81
|
|
- * The "action" value for Jingle events which indicates that a session-accept
|
82
|
|
- * timed out (TODO: verify/fix the documentation)
|
83
|
|
- * @type {string}
|
|
252
|
+ * Creates an operational event which indicates that a particular connection
|
|
253
|
+ * stage was reached (i.e. the XMPP connection transitioned to the "connected"
|
|
254
|
+ * state).
|
|
255
|
+ *
|
|
256
|
+ * @param stage the stage which was reached
|
|
257
|
+ * @param attributes additional attributes for the event. This should be an
|
|
258
|
+ * object with a "value" property indicating a timestamp in milliseconds
|
|
259
|
+ * relative to the beginning of the document's lifetime.
|
|
260
|
+ *
|
84
|
261
|
*/
|
85
|
|
-export const ACTION_JINGLE_SA_TIMEOUT: string;
|
|
262
|
+export declare const createConnectionStageReachedEvent: (stage: unknown, attributes: object) => {
|
|
263
|
+ action: string;
|
|
264
|
+ actionSubject: unknown;
|
|
265
|
+ attributes: object;
|
|
266
|
+ source: string;
|
|
267
|
+ type: AnalyticsEvents;
|
|
268
|
+};
|
86
|
269
|
/**
|
87
|
|
- * The "action" value for Jingle events which indicates that a session-initiate
|
88
|
|
- * was received.
|
89
|
|
- * @type {string}
|
|
270
|
+ * Creates an operational event for the end-to-end round trip time to a
|
|
271
|
+ * specific remote participant.
|
|
272
|
+ * @param participantId the ID of the remote participant.
|
|
273
|
+ * @param region the region of the remote participant
|
|
274
|
+ * @param rtt the rtt
|
90
|
275
|
*/
|
91
|
|
-export const ACTION_JINGLE_SI_RECEIVED: string;
|
|
276
|
+export declare const createE2eRttEvent: (participantId: unknown, region: unknown, rtt: unknown) => {
|
|
277
|
+ attributes: {
|
|
278
|
+ participant_id: unknown;
|
|
279
|
+ region: unknown;
|
|
280
|
+ rtt: unknown;
|
|
281
|
+ };
|
|
282
|
+ name: string;
|
|
283
|
+ type: AnalyticsEvents;
|
|
284
|
+};
|
92
|
285
|
/**
|
93
|
|
- * The "action" value for Jingle events which indicates that a session-initiate
|
94
|
|
- * not arrived within a timeout (the value is specified in
|
95
|
|
- * the {@link JingleSessionPC}.
|
96
|
|
- * @type {string}
|
|
286
|
+ * Creates an event which indicates that the focus has left the MUC.
|
97
|
287
|
*/
|
98
|
|
-export const ACTION_JINGLE_SI_TIMEOUT: string;
|
|
288
|
+export declare const createFocusLeftEvent: () => {
|
|
289
|
+ action: string;
|
|
290
|
+ actionSubject: string;
|
|
291
|
+ type: AnalyticsEvents;
|
|
292
|
+};
|
99
|
293
|
/**
|
100
|
|
- * A constant for the "terminate" action for Jingle events. TODO: verify/fix
|
101
|
|
- * the documentation)
|
102
|
|
- * @type {string}
|
|
294
|
+ * Creates an event related to a getUserMedia call.
|
|
295
|
+ *
|
|
296
|
+ * @param action the type of the result that the event represents: 'error',
|
|
297
|
+ * 'success', 'warning', etc.
|
|
298
|
+ * @param attributes the attributes to attach to the event.
|
103
|
299
|
*/
|
104
|
|
-export const ACTION_JINGLE_TERMINATE: string;
|
|
300
|
+export declare const createGetUserMediaEvent: (action: 'error' | 'success' | 'warning' | string, attributes?: object) => {
|
|
301
|
+ type: AnalyticsEvents;
|
|
302
|
+ source: string;
|
|
303
|
+ action: string;
|
|
304
|
+ attributes: object;
|
|
305
|
+};
|
105
|
306
|
/**
|
106
|
|
- * The "action" value for Jingle events which indicates that a transport-replace
|
107
|
|
- * was received.
|
108
|
|
- * @type {string}
|
|
307
|
+ * Creates an event related to remote participant connection status changes.
|
|
308
|
+ *
|
|
309
|
+ * @param attributes the attributes to attach to the event.
|
109
|
310
|
*/
|
110
|
|
-export const ACTION_JINGLE_TR_RECEIVED: string;
|
|
311
|
+export declare const createParticipantConnectionStatusEvent: (attributes?: object) => {
|
|
312
|
+ type: AnalyticsEvents;
|
|
313
|
+ source: string;
|
|
314
|
+ action: string;
|
|
315
|
+ attributes: object;
|
|
316
|
+};
|
111
|
317
|
/**
|
112
|
|
- * The "action" value for Jingle events which indicates that a transport-replace
|
113
|
|
- * succeeded (TODO: verify/fix the documentation)
|
114
|
|
- * @type {string}
|
|
318
|
+ * Creates an event related to remote track streaming status changes.
|
|
319
|
+ *
|
|
320
|
+ * @param attributes the attributes to attach to the event.
|
115
|
321
|
*/
|
116
|
|
-export const ACTION_JINGLE_TR_SUCCESS: string;
|
|
322
|
+export declare const createTrackStreamingStatusEvent: (attributes?: object) => {
|
|
323
|
+ type: AnalyticsEvents;
|
|
324
|
+ source: string;
|
|
325
|
+ action: string;
|
|
326
|
+ attributes: object;
|
|
327
|
+};
|
117
|
328
|
/**
|
118
|
|
- * The "action" value for P2P events which indicates that P2P session initiate message has been rejected by the client
|
119
|
|
- * because the mandatory requirements were not met.
|
120
|
|
- * @type {string}
|
|
329
|
+ * Creates an event for a Jingle-related event.
|
|
330
|
+ * @param action the action of the event
|
|
331
|
+ * @param attributes attributes to add to the event.
|
121
|
332
|
*/
|
122
|
|
-export const ACTION_P2P_DECLINED: string;
|
|
333
|
+export declare const createJingleEvent: (action: unknown, attributes?: object) => {
|
|
334
|
+ type: AnalyticsEvents;
|
|
335
|
+ action: unknown;
|
|
336
|
+ source: string;
|
|
337
|
+ attributes: object;
|
|
338
|
+};
|
123
|
339
|
/**
|
124
|
|
- * The "action" value for P2P events which indicates that a connection was
|
125
|
|
- * established (TODO: verify/fix the documentation)
|
126
|
|
- * @type {string}
|
|
340
|
+ * Creates an event which indicates that a local track was not able to read
|
|
341
|
+ * data from its source (a camera or a microphone).
|
|
342
|
+ *
|
|
343
|
+ * @param mediaType the media type of the local track ('audio' or
|
|
344
|
+ * 'video').
|
127
|
345
|
*/
|
128
|
|
-export const ACTION_P2P_ESTABLISHED: string;
|
|
346
|
+export declare const createNoDataFromSourceEvent: (mediaType: 'audio' | 'video' | string, value: unknown) => {
|
|
347
|
+ attributes: {
|
|
348
|
+ media_type: string;
|
|
349
|
+ value: unknown;
|
|
350
|
+ };
|
|
351
|
+ action: string;
|
|
352
|
+ type: AnalyticsEvents;
|
|
353
|
+};
|
129
|
354
|
/**
|
130
|
|
- * The "action" value for P2P events which indicates that something failed.
|
131
|
|
- * @type {string}
|
|
355
|
+ * Creates an event for a p2p-related event.
|
|
356
|
+ * @param action the action of the event
|
|
357
|
+ * @param attributes attributes to add to the event.
|
132
|
358
|
*/
|
133
|
|
-export const ACTION_P2P_FAILED: string;
|
|
359
|
+export declare const createP2PEvent: (action: unknown, attributes?: object) => {
|
|
360
|
+ type: AnalyticsEvents;
|
|
361
|
+ action: unknown;
|
|
362
|
+ source: string;
|
|
363
|
+ attributes: object;
|
|
364
|
+};
|
134
|
365
|
/**
|
135
|
|
- * The "action" value for P2P events which indicates that a switch to
|
136
|
|
- * jitsi-videobridge happened.
|
137
|
|
- * @type {string}
|
|
366
|
+ * Indicates that we received a remote command to mute.
|
138
|
367
|
*/
|
139
|
|
-export const ACTION_P2P_SWITCH_TO_JVB: string;
|
|
368
|
+export declare const createRemotelyMutedEvent: (mediaType: unknown) => {
|
|
369
|
+ type: AnalyticsEvents;
|
|
370
|
+ action: string;
|
|
371
|
+ mediaType: unknown;
|
|
372
|
+};
|
140
|
373
|
/**
|
141
|
|
- * The name of an event which indicates an available device. We send one such
|
142
|
|
- * event per available device once when the available devices are first known,
|
143
|
|
- * and every time that they change
|
144
|
|
- * @type {string}
|
|
374
|
+ * Creates an event which contains RTP statistics such as RTT and packet loss.
|
145
|
375
|
*
|
146
|
|
- * Properties:
|
147
|
|
- * audio_input_device_count: the number of audio input devices available at
|
148
|
|
- * the time the event was sent.
|
149
|
|
- * audio_output_device_count: the number of audio output devices available
|
150
|
|
- * at the time the event was sent.
|
151
|
|
- * video_input_device_count: the number of video input devices available at
|
152
|
|
- * the time the event was sent.
|
153
|
|
- * video_output_device_count: the number of video output devices available
|
154
|
|
- * at the time the event was sent.
|
155
|
|
- * device_id: an identifier of the device described in this event.
|
156
|
|
- * device_group_id:
|
157
|
|
- * device_kind: one of 'audioinput', 'audiooutput', 'videoinput' or
|
158
|
|
- * 'videooutput'.
|
159
|
|
- * device_label: a string which describes the device.
|
160
|
|
- */
|
161
|
|
-export const AVAILABLE_DEVICE: string;
|
162
|
|
-/**
|
163
|
|
- * This appears to be fired only in certain cases when the XMPP connection
|
164
|
|
- * disconnects (and it was intentional?). It is currently never observed to
|
165
|
|
- * fire in production.
|
|
376
|
+ * All average RTP stats are currently reported under 1 event name, but with
|
|
377
|
+ * different properties that allows to distinguish between a P2P call, a
|
|
378
|
+ * call relayed through TURN or the JVB, and multiparty vs 1:1.
|
166
|
379
|
*
|
167
|
|
- * TODO: document
|
|
380
|
+ * The structure of the event is:
|
168
|
381
|
*
|
169
|
|
- * Properties:
|
170
|
|
- * message: an error message
|
171
|
|
- */
|
172
|
|
-export const CONNECTION_DISCONNECTED: "connection.disconnected";
|
173
|
|
-/**
|
174
|
|
- * Indicates that the user of the application provided feedback in terms of a
|
175
|
|
- * rating (an integer from 1 to 5) and an optional comment.
|
176
|
|
- * Properties:
|
177
|
|
- * value: the user's rating (an integer from 1 to 5)
|
178
|
|
- * comment: the user's comment
|
179
|
|
- */
|
180
|
|
-export const FEEDBACK: "feedback";
|
181
|
|
-/**
|
182
|
|
- * Indicates the duration of a particular phase of the ICE connectivity
|
183
|
|
- * establishment.
|
|
382
|
+ * {
|
|
383
|
+ * p2p: true,
|
|
384
|
+ * conferenceSize: 2,
|
|
385
|
+ * localCandidateType: "relay",
|
|
386
|
+ * remoteCandidateType: "relay",
|
|
387
|
+ * transportType: "udp",
|
184
|
388
|
*
|
185
|
|
- * Properties:
|
186
|
|
- * phase: the ICE phase (e.g. 'gathering', 'checking', 'establishment')
|
187
|
|
- * value: the duration in milliseconds.
|
188
|
|
- * p2p: whether the associated ICE connection is p2p or towards a
|
189
|
|
- * jitsi-videobridge
|
190
|
|
- * initiator: whether the local Jingle peer is the initiator or responder
|
191
|
|
- * in the Jingle session. XXX we probably actually care about the ICE
|
192
|
|
- * role (controlling vs controlled), and we assume that this correlates
|
193
|
|
- * with the Jingle initiator.
|
194
|
|
- */
|
195
|
|
-export const ICE_DURATION: "ice.duration";
|
196
|
|
-/**
|
197
|
|
- * Indicates the difference in milliseconds between the ICE establishment time
|
198
|
|
- * for the P2P and JVB connections (e.g. a value of 10 would indicate that the
|
199
|
|
- * P2P connection took 10ms more than JVB connection to establish).
|
|
389
|
+ * // Average RTT of 200ms
|
|
390
|
+ * "rtt.avg": 200,
|
|
391
|
+ * "rtt.samples": "[100, 200, 300]",
|
200
|
392
|
*
|
201
|
|
- * Properties:
|
202
|
|
- * value: the difference in establishment durations in milliseconds.
|
|
393
|
+ * // Average packet loss of 10%
|
|
394
|
+ * "packet.loss.avg": 10,
|
|
395
|
+ * "packet.loss.samples": '[5, 10, 15]'
|
203
|
396
|
*
|
204
|
|
- */
|
205
|
|
-export const ICE_ESTABLISHMENT_DURATION_DIFF: "ice.establishment.duration.diff";
|
206
|
|
-/**
|
207
|
|
- * Indicates that the ICE state has changed.
|
|
397
|
+ * // Difference in milliseconds in the end-to-end RTT between p2p and jvb.
|
|
398
|
+ * // The e2e RTT through jvb is 15ms shorter:
|
|
399
|
+ * "rtt.diff": 15,
|
208
|
400
|
*
|
209
|
|
- * Properties:
|
210
|
|
- * state: the ICE state which was entered (e.g. 'checking', 'connected',
|
211
|
|
- * 'completed', etc).
|
212
|
|
- * value: the time in milliseconds (as reported by
|
213
|
|
- * window.performance.now()) that the state change occurred.
|
214
|
|
- * p2p: whether the associated ICE connection is p2p or towards a
|
215
|
|
- * jitsi-videobridge
|
216
|
|
- * signalingState: The signaling state of the associated PeerConnection
|
217
|
|
- * reconnect: whether the associated Jingle session is in the process of
|
218
|
|
- * reconnecting (or is it ICE? TODO: verify/fix the documentation)
|
219
|
|
- */
|
220
|
|
-export const ICE_STATE_CHANGED: "ice.state.changed";
|
221
|
|
-/**
|
222
|
|
- * Indicates that no bytes have been sent for the track.
|
|
401
|
+ * // End-to-end RTT through JVB is ms.
|
|
402
|
+ * "end2end.rtt.avg" = 100
|
|
403
|
+ * }
|
223
|
404
|
*
|
224
|
|
- * Properties:
|
225
|
|
- * mediaType: the media type of the local track ('audio' or 'video').
|
226
|
|
- */
|
227
|
|
-export const NO_BYTES_SENT: "track.no-bytes-sent";
|
228
|
|
-/**
|
229
|
|
- * Indicates that a track was unmuted (?).
|
|
405
|
+ * Note that the value of the "samples" properties are (JSON encoded) strings,
|
|
406
|
+ * and not JSON arrays, as events' attributes can not be nested. The samples are
|
|
407
|
+ * currently included for debug purposes only and can be removed anytime soon
|
|
408
|
+ * from the structure.
|
230
|
409
|
*
|
231
|
|
- * Properties:
|
232
|
|
- * mediaType: the media type of the local track ('audio' or 'video').
|
233
|
|
- * trackType: the type of the track ('local' or 'remote').
|
234
|
|
- * value: TODO: document
|
|
410
|
+ * Also note that not all of values are present in each event, as values are
|
|
411
|
+ * obtained and calculated as part of different process/event pipe. For example
|
|
412
|
+ * {@link ConnectionAvgStats} instances are doing the reports for each
|
|
413
|
+ * {@link TraceablePeerConnection} and work independently from the main stats
|
|
414
|
+ * pipe.
|
235
|
415
|
*/
|
236
|
|
-export const TRACK_UNMUTED: "track.unmuted";
|
237
|
|
-export function createBridgeDownEvent(): {
|
|
416
|
+export declare const createRtpStatsEvent: (attributes: object) => {
|
|
417
|
+ type: AnalyticsEvents;
|
238
|
418
|
action: string;
|
239
|
|
- actionSubject: string;
|
240
|
|
- type: string;
|
|
419
|
+ attributes: object;
|
241
|
420
|
};
|
242
|
|
-export function createConnectionFailedEvent(errorType: any, errorMessage: any, details: any): {
|
243
|
|
- type: string;
|
|
421
|
+/**
|
|
422
|
+ * Creates an event which contains the round trip time (RTT) to a set of
|
|
423
|
+ * regions.
|
|
424
|
+ *
|
|
425
|
+ * @param attributes
|
|
426
|
+ */
|
|
427
|
+export declare const createRttByRegionEvent: (attributes: object) => {
|
|
428
|
+ type: AnalyticsEvents;
|
244
|
429
|
action: string;
|
245
|
|
- attributes: any;
|
|
430
|
+ attributes: object;
|
246
|
431
|
};
|
247
|
|
-export function createConnectionStageReachedEvent(stage: any, attributes: any): {
|
|
432
|
+/**
|
|
433
|
+ * Creates an event which contains the local and remote ICE candidate types
|
|
434
|
+ * for the transport that is currently selected.
|
|
435
|
+ *
|
|
436
|
+ * @param attributes
|
|
437
|
+ */
|
|
438
|
+export declare const createTransportStatsEvent: (attributes: object) => {
|
|
439
|
+ type: AnalyticsEvents;
|
248
|
440
|
action: string;
|
249
|
|
- actionSubject: any;
|
250
|
|
- attributes: any;
|
251
|
|
- source: string;
|
252
|
|
- type: string;
|
253
|
|
-};
|
254
|
|
-export function createE2eRttEvent(participantId: any, region: any, rtt: any): {
|
255
|
|
- attributes: {
|
256
|
|
- participant_id: any;
|
257
|
|
- region: any;
|
258
|
|
- rtt: any;
|
259
|
|
- };
|
260
|
|
- name: string;
|
261
|
|
- type: string;
|
|
441
|
+ attributes: object;
|
262
|
442
|
};
|
263
|
|
-export function createFocusLeftEvent(): {
|
|
443
|
+/**
|
|
444
|
+ * Creates an event which contains information about the audio output problem (the user id of the affected participant,
|
|
445
|
+ * the local audio levels and the remote audio levels that triggered the event).
|
|
446
|
+ *
|
|
447
|
+ * @param userID - The user id of the affected participant.
|
|
448
|
+ * @param localAudioLevels - The local audio levels.
|
|
449
|
+ * @param remoteAudioLevels - The audio levels received from the participant.
|
|
450
|
+ */
|
|
451
|
+export declare const createAudioOutputProblemEvent: (userID: string, localAudioLevels: unknown, remoteAudioLevels: unknown) => {
|
|
452
|
+ type: AnalyticsEvents;
|
264
|
453
|
action: string;
|
265
|
|
- actionSubject: string;
|
266
|
|
- type: string;
|
267
|
|
-};
|
268
|
|
-export function createGetUserMediaEvent(action: any, attributes?: {}): {
|
269
|
|
- type: string;
|
270
|
|
- source: string;
|
271
|
|
- name: string;
|
272
|
|
-};
|
273
|
|
-export function createParticipantConnectionStatusEvent(attributes?: {}): {
|
274
|
|
- type: string;
|
275
|
|
- source: string;
|
276
|
|
- name: string;
|
277
|
|
-};
|
278
|
|
-export function createTrackStreamingStatusEvent(attributes?: {}): {
|
279
|
|
- type: string;
|
280
|
|
- source: string;
|
281
|
|
- name: string;
|
282
|
|
-};
|
283
|
|
-export function createJingleEvent(action: any, attributes?: {}): {
|
284
|
|
- type: string;
|
285
|
|
- action: any;
|
286
|
|
- source: string;
|
287
|
|
- attributes: {};
|
288
|
|
-};
|
289
|
|
-export function createNoDataFromSourceEvent(mediaType: string, value: any): {
|
290
|
454
|
attributes: {
|
291
|
|
- media_type: string;
|
292
|
|
- value: any;
|
|
455
|
+ userID: string;
|
|
456
|
+ localAudioLevels: unknown;
|
|
457
|
+ remoteAudioLevels: unknown;
|
293
|
458
|
};
|
294
|
|
- action: string;
|
295
|
|
- type: string;
|
296
|
459
|
};
|
297
|
|
-export function createP2PEvent(action: any, attributes?: {}): {
|
298
|
|
- type: string;
|
299
|
|
- action: any;
|
300
|
|
- source: string;
|
301
|
|
- attributes: {};
|
302
|
|
-};
|
303
|
|
-export function createRemotelyMutedEvent(mediaType: any): {
|
304
|
|
- type: string;
|
305
|
|
- action: string;
|
306
|
|
- mediaType: any;
|
307
|
|
-};
|
308
|
|
-export function createRtpStatsEvent(attributes: any): {
|
309
|
|
- type: string;
|
310
|
|
- action: string;
|
311
|
|
- attributes: any;
|
312
|
|
-};
|
313
|
|
-export function createRttByRegionEvent(attributes: any): {
|
314
|
|
- type: string;
|
315
|
|
- action: string;
|
316
|
|
- attributes: any;
|
317
|
|
-};
|
318
|
|
-export function createTransportStatsEvent(attributes: any): {
|
319
|
|
- type: string;
|
320
|
|
- action: string;
|
321
|
|
- attributes: any;
|
322
|
|
-};
|
323
|
|
-export function createBridgeChannelClosedEvent(code: string, reason: string): {
|
324
|
|
- type: string;
|
|
460
|
+/**
|
|
461
|
+ * Creates an event which contains an information related to the bridge channel close event.
|
|
462
|
+ *
|
|
463
|
+ * @param code - A code from {@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}
|
|
464
|
+ * @param reason - A string which describes the reason for closing the bridge channel.
|
|
465
|
+ */
|
|
466
|
+export declare const createBridgeChannelClosedEvent: (code: string, reason: string) => {
|
|
467
|
+ type: AnalyticsEvents;
|
325
|
468
|
action: string;
|
326
|
469
|
attributes: {
|
327
|
470
|
code: string;
|
328
|
471
|
reason: string;
|
329
|
472
|
};
|
330
|
473
|
};
|
331
|
|
-export function createTtfmEvent(attributes: any): {
|
|
474
|
+/**
|
|
475
|
+ * Creates an event which indicates the Time To First Media (TTFM).
|
|
476
|
+ * It is measured in milliseconds relative to the beginning of the document's
|
|
477
|
+ * lifetime (i.e. the origin used by window.performance.now()), and it excludes
|
|
478
|
+ * the following:
|
|
479
|
+ * 1. The delay due to getUserMedia()
|
|
480
|
+ * 2. The period between the MUC being joined and the reception of the Jingle
|
|
481
|
+ * session-initiate from jicofo. This is because jicofo will not start a Jingle
|
|
482
|
+ * session until there are at least 2 participants in the room.
|
|
483
|
+ *
|
|
484
|
+ * @param attributes the attributes to add to the event. Currently used fields:
|
|
485
|
+ * mediaType: the media type of the local track ('audio' or 'video').
|
|
486
|
+ * muted: whether the track has ever been muted (?)
|
|
487
|
+ * value: the TTMF in milliseconds.
|
|
488
|
+ */
|
|
489
|
+export declare const createTtfmEvent: (attributes: object) => {
|
332
|
490
|
action: string;
|
333
|
|
- actionSubject: any;
|
334
|
|
- attributes: any;
|
|
491
|
+ actionSubject: unknown;
|
|
492
|
+ attributes: object;
|
335
|
493
|
source: string;
|
336
|
|
- type: string;
|
|
494
|
+ type: AnalyticsEvents;
|
337
|
495
|
};
|