@observertc/observer-js 1.0.1-ec27289.0 → 1.1.0

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.
Files changed (210) hide show
  1. package/README.md +2184 -1
  2. package/dist/index.d.mts +6842 -0
  3. package/dist/index.d.ts +6842 -0
  4. package/dist/index.js +7736 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +7608 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/package.json +44 -18
  9. package/.eslintrc.json +0 -143
  10. package/.prettierignore +0 -5
  11. package/.prettierrc +0 -7
  12. package/jest.config.js +0 -9
  13. package/lib/ObservedCall.d.ts +0 -83
  14. package/lib/ObservedCall.d.ts.map +0 -1
  15. package/lib/ObservedCall.js +0 -203
  16. package/lib/ObservedCallSummary.d.ts +0 -18
  17. package/lib/ObservedCallSummary.d.ts.map +0 -1
  18. package/lib/ObservedCallSummary.js +0 -2
  19. package/lib/ObservedCertificate.d.ts +0 -19
  20. package/lib/ObservedCertificate.d.ts.map +0 -1
  21. package/lib/ObservedCertificate.js +0 -38
  22. package/lib/ObservedClient.d.ts +0 -131
  23. package/lib/ObservedClient.d.ts.map +0 -1
  24. package/lib/ObservedClient.js +0 -520
  25. package/lib/ObservedClientEventMonitor.d.ts +0 -89
  26. package/lib/ObservedClientEventMonitor.d.ts.map +0 -1
  27. package/lib/ObservedClientEventMonitor.js +0 -247
  28. package/lib/ObservedClientSummary.d.ts +0 -23
  29. package/lib/ObservedClientSummary.d.ts.map +0 -1
  30. package/lib/ObservedClientSummary.js +0 -2
  31. package/lib/ObservedCodec.d.ts +0 -22
  32. package/lib/ObservedCodec.d.ts.map +0 -1
  33. package/lib/ObservedCodec.js +0 -45
  34. package/lib/ObservedDataChannel.d.ts +0 -30
  35. package/lib/ObservedDataChannel.d.ts.map +0 -1
  36. package/lib/ObservedDataChannel.js +0 -75
  37. package/lib/ObservedIceCandidate.d.ts +0 -29
  38. package/lib/ObservedIceCandidate.d.ts.map +0 -1
  39. package/lib/ObservedIceCandidate.js +0 -59
  40. package/lib/ObservedIceCandidatePair.d.ts +0 -44
  41. package/lib/ObservedIceCandidatePair.d.ts.map +0 -1
  42. package/lib/ObservedIceCandidatePair.js +0 -111
  43. package/lib/ObservedIceTransport.d.ts +0 -36
  44. package/lib/ObservedIceTransport.d.ts.map +0 -1
  45. package/lib/ObservedIceTransport.js +0 -93
  46. package/lib/ObservedInboundRtp.d.ts +0 -92
  47. package/lib/ObservedInboundRtp.d.ts.map +0 -1
  48. package/lib/ObservedInboundRtp.js +0 -193
  49. package/lib/ObservedInboundTrack.d.ts +0 -31
  50. package/lib/ObservedInboundTrack.d.ts.map +0 -1
  51. package/lib/ObservedInboundTrack.js +0 -59
  52. package/lib/ObservedMediaPlayout.d.ts +0 -22
  53. package/lib/ObservedMediaPlayout.d.ts.map +0 -1
  54. package/lib/ObservedMediaPlayout.js +0 -42
  55. package/lib/ObservedMediaSource.d.ts +0 -28
  56. package/lib/ObservedMediaSource.d.ts.map +0 -1
  57. package/lib/ObservedMediaSource.js +0 -55
  58. package/lib/ObservedOutboundRtp.d.ts +0 -62
  59. package/lib/ObservedOutboundRtp.d.ts.map +0 -1
  60. package/lib/ObservedOutboundRtp.js +0 -144
  61. package/lib/ObservedOutboundTrack.d.ts +0 -31
  62. package/lib/ObservedOutboundTrack.d.ts.map +0 -1
  63. package/lib/ObservedOutboundTrack.js +0 -59
  64. package/lib/ObservedPeerConnection.d.ts +0 -185
  65. package/lib/ObservedPeerConnection.d.ts.map +0 -1
  66. package/lib/ObservedPeerConnection.js +0 -710
  67. package/lib/ObservedPeerConnectionTransport.d.ts +0 -17
  68. package/lib/ObservedPeerConnectionTransport.d.ts.map +0 -1
  69. package/lib/ObservedPeerConnectionTransport.js +0 -34
  70. package/lib/ObservedRemoteInboundRtp.d.ts +0 -30
  71. package/lib/ObservedRemoteInboundRtp.d.ts.map +0 -1
  72. package/lib/ObservedRemoteInboundRtp.js +0 -60
  73. package/lib/ObservedRemoteOutboundRtp.d.ts +0 -30
  74. package/lib/ObservedRemoteOutboundRtp.d.ts.map +0 -1
  75. package/lib/ObservedRemoteOutboundRtp.js +0 -60
  76. package/lib/ObservedTURN.d.ts +0 -31
  77. package/lib/ObservedTURN.d.ts.map +0 -1
  78. package/lib/ObservedTURN.js +0 -58
  79. package/lib/ObservedTurnServer.d.ts +0 -25
  80. package/lib/ObservedTurnServer.d.ts.map +0 -1
  81. package/lib/ObservedTurnServer.js +0 -59
  82. package/lib/Observer.d.ts +0 -61
  83. package/lib/Observer.d.ts.map +0 -1
  84. package/lib/Observer.js +0 -156
  85. package/lib/ObserverSummary.d.ts +0 -13
  86. package/lib/ObserverSummary.d.ts.map +0 -1
  87. package/lib/ObserverSummary.js +0 -2
  88. package/lib/common/Middleware.d.ts +0 -17
  89. package/lib/common/Middleware.d.ts.map +0 -1
  90. package/lib/common/Middleware.js +0 -60
  91. package/lib/common/SingleExecutor.d.ts +0 -3
  92. package/lib/common/SingleExecutor.d.ts.map +0 -1
  93. package/lib/common/SingleExecutor.js +0 -31
  94. package/lib/common/logger.d.ts +0 -17
  95. package/lib/common/logger.d.ts.map +0 -1
  96. package/lib/common/logger.js +0 -50
  97. package/lib/common/types.d.ts +0 -3
  98. package/lib/common/types.d.ts.map +0 -1
  99. package/lib/common/types.js +0 -3
  100. package/lib/common/utils.d.ts +0 -11
  101. package/lib/common/utils.d.ts.map +0 -1
  102. package/lib/common/utils.js +0 -63
  103. package/lib/detectors/Detector.d.ts +0 -5
  104. package/lib/detectors/Detector.d.ts.map +0 -1
  105. package/lib/detectors/Detector.js +0 -3
  106. package/lib/detectors/Detectors.d.ts +0 -11
  107. package/lib/detectors/Detectors.d.ts.map +0 -1
  108. package/lib/detectors/Detectors.js +0 -34
  109. package/lib/index.d.ts +0 -27
  110. package/lib/index.d.ts.map +0 -1
  111. package/lib/index.js +0 -47
  112. package/lib/monitors/TurnUsageMonitor.d.ts +0 -1
  113. package/lib/monitors/TurnUsageMonitor.d.ts.map +0 -1
  114. package/lib/monitors/TurnUsageMonitor.js +0 -146
  115. package/lib/schema/ClientEventTypes.d.ts +0 -100
  116. package/lib/schema/ClientEventTypes.d.ts.map +0 -1
  117. package/lib/schema/ClientEventTypes.js +0 -38
  118. package/lib/schema/ClientMetaTypes.d.ts +0 -34
  119. package/lib/schema/ClientMetaTypes.d.ts.map +0 -1
  120. package/lib/schema/ClientMetaTypes.js +0 -16
  121. package/lib/schema/ClientSample.d.ts +0 -1333
  122. package/lib/schema/ClientSample.d.ts.map +0 -1
  123. package/lib/schema/ClientSample.js +0 -4
  124. package/lib/scores/CalculatedScore.d.ts +0 -6
  125. package/lib/scores/CalculatedScore.d.ts.map +0 -1
  126. package/lib/scores/CalculatedScore.js +0 -2
  127. package/lib/scores/DefaultCallScoreCalculator.d.ts +0 -7
  128. package/lib/scores/DefaultCallScoreCalculator.d.ts.map +0 -1
  129. package/lib/scores/DefaultCallScoreCalculator.js +0 -21
  130. package/lib/scores/ScoreCalculator.d.ts +0 -4
  131. package/lib/scores/ScoreCalculator.d.ts.map +0 -1
  132. package/lib/scores/ScoreCalculator.js +0 -2
  133. package/lib/updaters/CallUpdater.d.ts +0 -5
  134. package/lib/updaters/CallUpdater.d.ts.map +0 -1
  135. package/lib/updaters/CallUpdater.js +0 -2
  136. package/lib/updaters/ObserverUpdater.d.ts +0 -5
  137. package/lib/updaters/ObserverUpdater.d.ts.map +0 -1
  138. package/lib/updaters/ObserverUpdater.js +0 -2
  139. package/lib/updaters/OnAllCallObserverUpdater_.d.ts +0 -13
  140. package/lib/updaters/OnAllCallObserverUpdater_.d.ts.map +0 -1
  141. package/lib/updaters/OnAllCallObserverUpdater_.js +0 -38
  142. package/lib/updaters/OnAllClientCallUpdater.d.ts +0 -13
  143. package/lib/updaters/OnAllClientCallUpdater.d.ts.map +0 -1
  144. package/lib/updaters/OnAllClientCallUpdater.js +0 -37
  145. package/lib/updaters/OnAnyCallObserverUpdater_.d.ts +0 -11
  146. package/lib/updaters/OnAnyCallObserverUpdater_.d.ts.map +0 -1
  147. package/lib/updaters/OnAnyCallObserverUpdater_.js +0 -27
  148. package/lib/updaters/OnAnyClientCallUpdater.d.ts +0 -11
  149. package/lib/updaters/OnAnyClientCallUpdater.d.ts.map +0 -1
  150. package/lib/updaters/OnAnyClientCallUpdater.js +0 -27
  151. package/lib/updaters/OnIntervalUpdater.d.ts +0 -10
  152. package/lib/updaters/OnIntervalUpdater.d.ts.map +0 -1
  153. package/lib/updaters/OnIntervalUpdater.js +0 -17
  154. package/lib/updaters/Updater.d.ts +0 -6
  155. package/lib/updaters/Updater.d.ts.map +0 -1
  156. package/lib/updaters/Updater.js +0 -2
  157. package/lib/utils/RemoteTrackResolver.d.ts +0 -7
  158. package/lib/utils/RemoteTrackResolver.d.ts.map +0 -1
  159. package/lib/utils/RemoteTrackResolver.js +0 -2
  160. package/src/ObservedCall.ts +0 -322
  161. package/src/ObservedCallSummary.ts +0 -22
  162. package/src/ObservedCertificate.ts +0 -43
  163. package/src/ObservedClient.ts +0 -673
  164. package/src/ObservedClientEventMonitor.ts +0 -301
  165. package/src/ObservedClientSummary.ts +0 -24
  166. package/src/ObservedCodec.ts +0 -49
  167. package/src/ObservedDataChannel.ts +0 -85
  168. package/src/ObservedIceCandidate.ts +0 -64
  169. package/src/ObservedIceCandidatePair.ts +0 -118
  170. package/src/ObservedIceTransport.ts +0 -99
  171. package/src/ObservedInboundRtp.ts +0 -205
  172. package/src/ObservedInboundTrack.ts +0 -73
  173. package/src/ObservedMediaPlayout.ts +0 -49
  174. package/src/ObservedMediaSource.ts +0 -60
  175. package/src/ObservedOutboundRtp.ts +0 -156
  176. package/src/ObservedOutboundTrack.ts +0 -72
  177. package/src/ObservedPeerConnection.ts +0 -1019
  178. package/src/ObservedPeerConnectionTransport.ts +0 -38
  179. package/src/ObservedRemoteInboundRtp.ts +0 -64
  180. package/src/ObservedRemoteOutboundRtp.ts +0 -65
  181. package/src/ObservedTURN.ts +0 -86
  182. package/src/ObservedTurnServer.ts +0 -72
  183. package/src/Observer.ts +0 -239
  184. package/src/ObserverSummary.ts +0 -15
  185. package/src/common/Middleware.ts +0 -84
  186. package/src/common/SingleExecutor.ts +0 -36
  187. package/src/common/logger.ts +0 -82
  188. package/src/common/types.ts +0 -4
  189. package/src/common/utils.ts +0 -69
  190. package/src/detectors/Detector.ts +0 -6
  191. package/src/detectors/Detectors.ts +0 -38
  192. package/src/index.ts +0 -28
  193. package/src/monitors/TurnUsageMonitor.ts +0 -187
  194. package/src/schema/ClientEventTypes.ts +0 -112
  195. package/src/schema/ClientMetaTypes.ts +0 -41
  196. package/src/schema/ClientSample.ts +0 -1682
  197. package/src/scores/CalculatedScore.ts +0 -6
  198. package/src/scores/DefaultCallScoreCalculator.ts +0 -23
  199. package/src/scores/ScoreCalculator.ts +0 -3
  200. package/src/updaters/CallUpdater.ts +0 -5
  201. package/src/updaters/ObserverUpdater.ts +0 -5
  202. package/src/updaters/OnAllCallObserverUpdater_.ts +0 -46
  203. package/src/updaters/OnAllClientCallUpdater.ts +0 -46
  204. package/src/updaters/OnAnyCallObserverUpdater_.ts +0 -32
  205. package/src/updaters/OnAnyClientCallUpdater.ts +0 -32
  206. package/src/updaters/OnIntervalUpdater.ts +0 -19
  207. package/src/updaters/Updater.ts +0 -5
  208. package/src/utils/RemoteTrackResolver.ts +0 -12
  209. package/tsconfig.json +0 -19
  210. package/tslint.json +0 -6
@@ -1,1682 +0,0 @@
1
- export const schemaVersion = '3.0.0';
2
-
3
- /**
4
- * The WebRTC app provided custom stats payload
5
- */
6
- export type ExtensionStat = {
7
-
8
- /**
9
- * The type of the extension stats the custom app provides
10
- */
11
- type: string;
12
-
13
- /**
14
- * The payload of the extension stats the custom app provides
15
- */
16
- payload?: string;
17
-
18
- }
19
-
20
- /**
21
- * A list of additional client events.
22
- */
23
- export type ClientMetaData = {
24
-
25
- /**
26
- * The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.).
27
- */
28
- type: string;
29
-
30
- /**
31
- * The value associated with the event, if applicable.
32
- */
33
- payload?: string;
34
-
35
- /**
36
- * The unique identifier of the peer connection for which the event was generated.
37
- */
38
- peerConnectionId?: string;
39
-
40
- /**
41
- * The identifier of the media track related to the event, if applicable.
42
- */
43
- trackId?: string;
44
-
45
- /**
46
- * The SSRC (Synchronization Source) identifier associated with the event, if applicable.
47
- */
48
- ssrc?: number;
49
-
50
- /**
51
- * The timestamp in epoch format when the event was generated.
52
- */
53
- timestamp?: number;
54
-
55
- }
56
-
57
- /**
58
- * A list of client issues.
59
- */
60
- export type ClientIssue = {
61
-
62
- /**
63
- * The name of the issue
64
- */
65
- type: string;
66
-
67
- /**
68
- * The value associated with the event, if applicable.
69
- */
70
- payload?: string;
71
-
72
- /**
73
- * The timestamp in epoch format when the event was generated.
74
- */
75
- timestamp?: number;
76
-
77
- }
78
-
79
- /**
80
- * A list of client events.
81
- */
82
- export type ClientEvent = {
83
-
84
- /**
85
- * The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.).
86
- */
87
- type: string;
88
-
89
- /**
90
- * The value associated with the event, if applicable.
91
- */
92
- payload?: string;
93
-
94
- /**
95
- * The timestamp in epoch format when the event was generated.
96
- */
97
- timestamp?: number;
98
-
99
- }
100
-
101
- /**
102
- * Certificates
103
- */
104
- export type CertificateStats = {
105
-
106
- /**
107
- * The timestamp of the stat.
108
- */
109
- timestamp: number;
110
-
111
- /**
112
- * A unique identifier for the stat.
113
- */
114
- id: string;
115
-
116
- /**
117
- * The fingerprint of the certificate.
118
- */
119
- fingerprint?: string;
120
-
121
- /**
122
- * The algorithm used for the fingerprint (e.g., 'SHA-256').
123
- */
124
- fingerprintAlgorithm?: string;
125
-
126
- /**
127
- * The certificate encoded in base64 format.
128
- */
129
- base64Certificate?: string;
130
-
131
- /**
132
- * The certificate ID of the issuer (nullable).
133
- */
134
- issuerCertificateId?: string;
135
-
136
- /**
137
- * Additional information attached to this stats
138
- */
139
- attachments?: Record<string, unknown>;
140
-
141
- }
142
-
143
- /**
144
- * ICE Candidate Pair Stats
145
- */
146
- export type IceCandidatePairStats = {
147
-
148
- /**
149
- * The unique identifier for this RTCStats object.
150
- */
151
- id: string;
152
-
153
- /**
154
- * The timestamp of when the stats were recorded, in seconds.
155
- */
156
- timestamp: number;
157
-
158
- /**
159
- * The transport id of the connection this candidate pair belongs to.
160
- */
161
- transportId?: string;
162
-
163
- /**
164
- * The ID of the local ICE candidate in this pair.
165
- */
166
- localCandidateId?: string;
167
-
168
- /**
169
- * The ID of the remote ICE candidate in this pair.
170
- */
171
- remoteCandidateId?: string;
172
-
173
- state?: 'new' | 'inProgress' | 'failed' | 'succeeded';
174
-
175
- /**
176
- * Whether this candidate pair has been nominated.
177
- */
178
- nominated?: boolean;
179
-
180
- /**
181
- * The number of packets sent using this candidate pair.
182
- */
183
- packetsSent?: number;
184
-
185
- /**
186
- * The number of packets received using this candidate pair.
187
- */
188
- packetsReceived?: number;
189
-
190
- /**
191
- * The total number of bytes sent using this candidate pair.
192
- */
193
- bytesSent?: number;
194
-
195
- /**
196
- * The total number of bytes received using this candidate pair.
197
- */
198
- bytesReceived?: number;
199
-
200
- /**
201
- * The timestamp of the last packet sent using this candidate pair.
202
- */
203
- lastPacketSentTimestamp?: number;
204
-
205
- /**
206
- * The timestamp of the last packet received using this candidate pair.
207
- */
208
- lastPacketReceivedTimestamp?: number;
209
-
210
- /**
211
- * The total round trip time (RTT) for this candidate pair in seconds.
212
- */
213
- totalRoundTripTime?: number;
214
-
215
- /**
216
- * The current round trip time (RTT) for this candidate pair in seconds.
217
- */
218
- currentRoundTripTime?: number;
219
-
220
- /**
221
- * The available outgoing bitrate (in bits per second) for this candidate pair.
222
- */
223
- availableOutgoingBitrate?: number;
224
-
225
- /**
226
- * The available incoming bitrate (in bits per second) for this candidate pair.
227
- */
228
- availableIncomingBitrate?: number;
229
-
230
- /**
231
- * The number of ICE connection requests received by this candidate pair.
232
- */
233
- requestsReceived?: number;
234
-
235
- /**
236
- * The number of ICE connection requests sent by this candidate pair.
237
- */
238
- requestsSent?: number;
239
-
240
- /**
241
- * The number of ICE connection responses received by this candidate pair.
242
- */
243
- responsesReceived?: number;
244
-
245
- /**
246
- * The number of ICE connection responses sent by this candidate pair.
247
- */
248
- responsesSent?: number;
249
-
250
- /**
251
- * The number of ICE connection consent requests sent by this candidate pair.
252
- */
253
- consentRequestsSent?: number;
254
-
255
- /**
256
- * The number of packets discarded while attempting to send via this candidate pair.
257
- */
258
- packetsDiscardedOnSend?: number;
259
-
260
- /**
261
- * The total number of bytes discarded while attempting to send via this candidate pair.
262
- */
263
- bytesDiscardedOnSend?: number;
264
-
265
- /**
266
- * Additional information attached to this stats
267
- */
268
- attachments?: Record<string, unknown>;
269
-
270
- }
271
-
272
- /**
273
- * ICE Candidate Stats
274
- */
275
- export type IceCandidateStats = {
276
-
277
- /**
278
- * The timestamp of the stat.
279
- */
280
- timestamp: number;
281
-
282
- /**
283
- * A unique identifier for the stat.
284
- */
285
- id: string;
286
-
287
- /**
288
- * The transport ID associated with the ICE candidate.
289
- */
290
- transportId?: string;
291
-
292
- /**
293
- * The IP address of the ICE candidate (nullable).
294
- */
295
- address?: string;
296
-
297
- /**
298
- * The port number of the ICE candidate.
299
- */
300
- port?: number;
301
-
302
- /**
303
- * The transport protocol used by the candidate (e.g., 'udp', 'tcp').
304
- */
305
- protocol?: string;
306
-
307
- /**
308
- * The type of the ICE candidate (e.g., 'host', 'srflx', 'relay').
309
- */
310
- candidateType?: string;
311
-
312
- /**
313
- * The priority of the ICE candidate.
314
- */
315
- priority?: number;
316
-
317
- /**
318
- * The URL of the ICE candidate.
319
- */
320
- url?: string;
321
-
322
- /**
323
- * The protocol used for the relay (e.g., 'tcp', 'udp').
324
- */
325
- relayProtocol?: string;
326
-
327
- /**
328
- * A string representing the foundation for the ICE candidate.
329
- */
330
- foundation?: string;
331
-
332
- /**
333
- * The related address for the ICE candidate (if any).
334
- */
335
- relatedAddress?: string;
336
-
337
- /**
338
- * The related port for the ICE candidate (if any).
339
- */
340
- relatedPort?: number;
341
-
342
- /**
343
- * The username fragment for the ICE candidate.
344
- */
345
- usernameFragment?: string;
346
-
347
- /**
348
- * The TCP type of the ICE candidate (e.g., 'active', 'passive').
349
- */
350
- tcpType?: string;
351
-
352
- /**
353
- * Additional information attached to this stats
354
- */
355
- attachments?: Record<string, unknown>;
356
-
357
- }
358
-
359
- /**
360
- * ICE Transport Stats
361
- */
362
- export type IceTransportStats = {
363
-
364
- /**
365
- * The timestamp of the stat.
366
- */
367
- timestamp: number;
368
-
369
- /**
370
- * A unique identifier for the stat.
371
- */
372
- id: string;
373
-
374
- /**
375
- * The number of packets sent.
376
- */
377
- packetsSent?: number;
378
-
379
- /**
380
- * The number of packets received.
381
- */
382
- packetsReceived?: number;
383
-
384
- /**
385
- * The number of bytes sent.
386
- */
387
- bytesSent?: number;
388
-
389
- /**
390
- * The number of bytes received.
391
- */
392
- bytesReceived?: number;
393
-
394
- /**
395
- * The ICE role (e.g., 'controlling', 'controlled').
396
- */
397
- iceRole?: string;
398
-
399
- /**
400
- * The local username fragment for ICE.
401
- */
402
- iceLocalUsernameFragment?: string;
403
-
404
- /**
405
- * The DTLS transport state (e.g., 'new', 'connecting', 'connected').
406
- */
407
- dtlsState?: string;
408
-
409
- /**
410
- * The ICE transport state (e.g., 'new', 'checking', 'connected').
411
- */
412
- iceState?: string;
413
-
414
- /**
415
- * The ID of the selected ICE candidate pair.
416
- */
417
- selectedCandidatePairId?: string;
418
-
419
- /**
420
- * The ID of the local certificate.
421
- */
422
- localCertificateId?: string;
423
-
424
- /**
425
- * The ID of the remote certificate.
426
- */
427
- remoteCertificateId?: string;
428
-
429
- /**
430
- * The TLS version used for encryption.
431
- */
432
- tlsVersion?: string;
433
-
434
- /**
435
- * The DTLS cipher suite used.
436
- */
437
- dtlsCipher?: string;
438
-
439
- /**
440
- * The role in the DTLS handshake (e.g., 'client', 'server').
441
- */
442
- dtlsRole?: string;
443
-
444
- /**
445
- * The SRTP cipher used for encryption.
446
- */
447
- srtpCipher?: string;
448
-
449
- /**
450
- * The number of changes to the selected ICE candidate pair.
451
- */
452
- selectedCandidatePairChanges?: number;
453
-
454
- /**
455
- * Additional information attached to this stats
456
- */
457
- attachments?: Record<string, unknown>;
458
-
459
- }
460
-
461
- /**
462
- * Data Channels Stats
463
- */
464
- export type DataChannelStats = {
465
-
466
- /**
467
- * The timestamp of the stat.
468
- */
469
- timestamp: number;
470
-
471
- /**
472
- * A unique identifier for the stat.
473
- */
474
- id: string;
475
-
476
- /**
477
- * The label of the data channel.
478
- */
479
- label?: string;
480
-
481
- /**
482
- * The protocol of the data channel.
483
- */
484
- protocol?: string;
485
-
486
- /**
487
- * The identifier for the data channel.
488
- */
489
- dataChannelIdentifier?: number;
490
-
491
- /**
492
- * The state of the data channel (e.g., 'open', 'closed').
493
- */
494
- state?: string;
495
-
496
- /**
497
- * The number of messages sent on the data channel.
498
- */
499
- messagesSent?: number;
500
-
501
- /**
502
- * The number of bytes sent on the data channel.
503
- */
504
- bytesSent?: number;
505
-
506
- /**
507
- * The number of messages received on the data channel.
508
- */
509
- messagesReceived?: number;
510
-
511
- /**
512
- * The number of bytes received on the data channel.
513
- */
514
- bytesReceived?: number;
515
-
516
- /**
517
- * Additional information attached to this stats
518
- */
519
- attachments?: Record<string, unknown>;
520
-
521
- }
522
-
523
- /**
524
- * PeerConnection Transport Stats
525
- */
526
- export type PeerConnectionTransportStats = {
527
-
528
- /**
529
- * The timestamp of the stat.
530
- */
531
- timestamp: number;
532
-
533
- /**
534
- * A unique identifier for the stat.
535
- */
536
- id: string;
537
-
538
- /**
539
- * The number of data channels opened.
540
- */
541
- dataChannelsOpened?: number;
542
-
543
- /**
544
- * The number of data channels closed.
545
- */
546
- dataChannelsClosed?: number;
547
-
548
- /**
549
- * Additional information attached to this stats
550
- */
551
- attachments?: Record<string, unknown>;
552
-
553
- }
554
-
555
- /**
556
- * Media Playout Stats
557
- */
558
- export type MediaPlayoutStats = {
559
-
560
- /**
561
- * The timestamp of the stat.
562
- */
563
- timestamp: number;
564
-
565
- /**
566
- * A unique identifier for the stat.
567
- */
568
- id: string;
569
-
570
- /**
571
- * The kind of media (audio/video).
572
- */
573
- kind: string;
574
-
575
- /**
576
- * The duration of synthesized audio samples.
577
- */
578
- synthesizedSamplesDuration?: number;
579
-
580
- /**
581
- * The number of synthesized audio samples events.
582
- */
583
- synthesizedSamplesEvents?: number;
584
-
585
- /**
586
- * The total duration of all audio samples.
587
- */
588
- totalSamplesDuration?: number;
589
-
590
- /**
591
- * The total delay experienced during audio playout.
592
- */
593
- totalPlayoutDelay?: number;
594
-
595
- /**
596
- * The total count of audio samples.
597
- */
598
- totalSamplesCount?: number;
599
-
600
- /**
601
- * Additional information attached to this stats
602
- */
603
- attachments?: Record<string, unknown>;
604
-
605
- }
606
-
607
- /**
608
- * Audio Source Stats
609
- */
610
- export type MediaSourceStats = {
611
-
612
- /**
613
- * The timestamp of the stat.
614
- */
615
- timestamp: number;
616
-
617
- /**
618
- * A unique identifier for the stat.
619
- */
620
- id: string;
621
-
622
- /**
623
- * The type of media ('audio' or 'video').
624
- */
625
- kind: string;
626
-
627
- /**
628
- * The identifier of the media track.
629
- */
630
- trackIdentifier?: string;
631
-
632
- /**
633
- * The current audio level.
634
- */
635
- audioLevel?: number;
636
-
637
- /**
638
- * The total audio energy.
639
- */
640
- totalAudioEnergy?: number;
641
-
642
- /**
643
- * The total duration of audio samples.
644
- */
645
- totalSamplesDuration?: number;
646
-
647
- /**
648
- * The echo return loss.
649
- */
650
- echoReturnLoss?: number;
651
-
652
- /**
653
- * The enhancement of echo return loss.
654
- */
655
- echoReturnLossEnhancement?: number;
656
-
657
- /**
658
- * The width of the video.
659
- */
660
- width?: number;
661
-
662
- /**
663
- * The height of the video.
664
- */
665
- height?: number;
666
-
667
- /**
668
- * The total number of frames.
669
- */
670
- frames?: number;
671
-
672
- /**
673
- * The frames per second of the video.
674
- */
675
- framesPerSecond?: number;
676
-
677
- /**
678
- * Additional information attached to this stats
679
- */
680
- attachments?: Record<string, unknown>;
681
-
682
- }
683
-
684
- /**
685
- * Remote Outbound RTPs
686
- */
687
- export type RemoteOutboundRtpStats = {
688
-
689
- /**
690
- * The timestamp for this stats object in DOMHighResTimeStamp format.
691
- */
692
- timestamp: number;
693
-
694
- /**
695
- * The unique identifier for this stats object.
696
- */
697
- id: string;
698
-
699
- /**
700
- * The SSRC identifier of the RTP stream.
701
- */
702
- ssrc: number;
703
-
704
- /**
705
- * The type of media ('audio' or 'video').
706
- */
707
- kind: string;
708
-
709
- /**
710
- * The ID of the transport used for this stream.
711
- */
712
- transportId?: string;
713
-
714
- /**
715
- * The ID of the codec used for this stream.
716
- */
717
- codecId?: string;
718
-
719
- /**
720
- * The total number of packets sent on this stream.
721
- */
722
- packetsSent?: number;
723
-
724
- /**
725
- * The total number of bytes sent on this stream.
726
- */
727
- bytesSent?: number;
728
-
729
- /**
730
- * The ID of the local object corresponding to this stream.
731
- */
732
- localId?: string;
733
-
734
- /**
735
- * The remote timestamp for this stats object in DOMHighResTimeStamp format.
736
- */
737
- remoteTimestamp?: number;
738
-
739
- /**
740
- * The total number of reports sent on this stream.
741
- */
742
- reportsSent?: number;
743
-
744
- /**
745
- * The current estimated round-trip time for this stream in seconds.
746
- */
747
- roundTripTime?: number;
748
-
749
- /**
750
- * The total round-trip time for this stream in seconds.
751
- */
752
- totalRoundTripTime?: number;
753
-
754
- /**
755
- * The total number of round-trip time measurements for this stream.
756
- */
757
- roundTripTimeMeasurements?: number;
758
-
759
- /**
760
- * Additional information attached to this stats
761
- */
762
- attachments?: Record<string, unknown>;
763
-
764
- }
765
-
766
- /**
767
- * The duration of quality limitation reasons categorized by type.
768
- */
769
- export type QualityLimitationDurations = {
770
-
771
- /**
772
- * Duration of no quality limitation in seconds.
773
- */
774
- none: number;
775
-
776
- /**
777
- * Duration of CPU-based quality limitation in seconds.
778
- */
779
- cpu: number;
780
-
781
- /**
782
- * Duration of bandwidth-based quality limitation in seconds.
783
- */
784
- bandwidth: number;
785
-
786
- /**
787
- * Duration of other quality limitation reasons in seconds.
788
- */
789
- other: number;
790
-
791
- }
792
-
793
- /**
794
- * Outbound RTPs
795
- */
796
- export type OutboundRtpStats = {
797
-
798
- /**
799
- * The timestamp for this stats object in DOMHighResTimeStamp format.
800
- */
801
- timestamp: number;
802
-
803
- /**
804
- * The unique identifier for this stats object.
805
- */
806
- id: string;
807
-
808
- /**
809
- * The SSRC identifier of the RTP stream.
810
- */
811
- ssrc: number;
812
-
813
- /**
814
- * The type of media ('audio' or 'video').
815
- */
816
- kind: string;
817
-
818
- /**
819
- * The ID of the transport used for this stream.
820
- */
821
- transportId?: string;
822
-
823
- /**
824
- * The ID of the codec used for this stream.
825
- */
826
- codecId?: string;
827
-
828
- /**
829
- * The total number of packets sent on this stream.
830
- */
831
- packetsSent?: number;
832
-
833
- /**
834
- * The total number of bytes sent on this stream.
835
- */
836
- bytesSent?: number;
837
-
838
- /**
839
- * The media ID associated with this RTP stream.
840
- */
841
- mid?: string;
842
-
843
- /**
844
- * The ID of the media source associated with this stream.
845
- */
846
- mediaSourceId?: string;
847
-
848
- /**
849
- * The ID of the remote object corresponding to this stream.
850
- */
851
- remoteId?: string;
852
-
853
- /**
854
- * The RID value of the RTP stream.
855
- */
856
- rid?: string;
857
-
858
- /**
859
- * The total number of header bytes sent on this stream.
860
- */
861
- headerBytesSent?: number;
862
-
863
- /**
864
- * The number of retransmitted packets sent on this stream.
865
- */
866
- retransmittedPacketsSent?: number;
867
-
868
- /**
869
- * The number of retransmitted bytes sent on this stream.
870
- */
871
- retransmittedBytesSent?: number;
872
-
873
- /**
874
- * The SSRC for the RTX stream, if applicable.
875
- */
876
- rtxSsrc?: number;
877
-
878
- /**
879
- * The target bitrate for this RTP stream in bits per second.
880
- */
881
- targetBitrate?: number;
882
-
883
- /**
884
- * The total target encoded bytes for this stream.
885
- */
886
- totalEncodedBytesTarget?: number;
887
-
888
- /**
889
- * The width of the frames sent in pixels.
890
- */
891
- frameWidth?: number;
892
-
893
- /**
894
- * The height of the frames sent in pixels.
895
- */
896
- frameHeight?: number;
897
-
898
- /**
899
- * The number of frames sent per second.
900
- */
901
- framesPerSecond?: number;
902
-
903
- /**
904
- * The total number of frames sent on this stream.
905
- */
906
- framesSent?: number;
907
-
908
- /**
909
- * The total number of huge frames sent on this stream.
910
- */
911
- hugeFramesSent?: number;
912
-
913
- /**
914
- * The total number of frames encoded on this stream.
915
- */
916
- framesEncoded?: number;
917
-
918
- /**
919
- * The total number of key frames encoded on this stream.
920
- */
921
- keyFramesEncoded?: number;
922
-
923
- /**
924
- * The sum of QP values for all frames encoded on this stream.
925
- */
926
- qpSum?: number;
927
-
928
- /**
929
- * The total time spent encoding frames on this stream in seconds.
930
- */
931
- totalEncodeTime?: number;
932
-
933
- /**
934
- * The total delay for packets sent on this stream in seconds.
935
- */
936
- totalPacketSendDelay?: number;
937
-
938
- /**
939
- * The reason for any quality limitation on this stream.
940
- */
941
- qualityLimitationReason?: string;
942
-
943
- /**
944
- * The number of resolution changes due to quality limitations.
945
- */
946
- qualityLimitationResolutionChanges?: number;
947
-
948
- /**
949
- * The total number of NACK packets sent on this stream.
950
- */
951
- nackCount?: number;
952
-
953
- /**
954
- * The total number of FIR packets sent on this stream.
955
- */
956
- firCount?: number;
957
-
958
- /**
959
- * The total number of PLI packets sent on this stream.
960
- */
961
- pliCount?: number;
962
-
963
- /**
964
- * The implementation of the encoder used for this stream.
965
- */
966
- encoderImplementation?: string;
967
-
968
- /**
969
- * Indicates whether the encoder is power efficient.
970
- */
971
- powerEfficientEncoder?: boolean;
972
-
973
- /**
974
- * Indicates whether this stream is actively sending data.
975
- */
976
- active?: boolean;
977
-
978
- /**
979
- * The scalability mode of the encoder used for this stream.
980
- */
981
- scalabilityMode?: string;
982
-
983
- /**
984
- * The duration of quality limitation reasons categorized by type.
985
- */
986
- qualityLimitationDurations?: QualityLimitationDurations;
987
-
988
- /**
989
- * Additional information attached to this stats.
990
- */
991
- attachments?: Record<string, unknown>;
992
-
993
- }
994
-
995
- /**
996
- * Remote Inbound RTPs
997
- */
998
- export type RemoteInboundRtpStats = {
999
-
1000
- /**
1001
- * The timestamp for this stats object in DOMHighResTimeStamp format.
1002
- */
1003
- timestamp: number;
1004
-
1005
- /**
1006
- * The unique identifier for this stats object.
1007
- */
1008
- id: string;
1009
-
1010
- /**
1011
- * The SSRC identifier of the RTP stream.
1012
- */
1013
- ssrc: number;
1014
-
1015
- /**
1016
- * The type of media ('audio' or 'video').
1017
- */
1018
- kind: string;
1019
-
1020
- /**
1021
- * The ID of the transport used for this stream.
1022
- */
1023
- transportId?: string;
1024
-
1025
- /**
1026
- * The ID of the codec used for this stream.
1027
- */
1028
- codecId?: string;
1029
-
1030
- /**
1031
- * The total number of packets received on this stream.
1032
- */
1033
- packetsReceived?: number;
1034
-
1035
- /**
1036
- * The total number of packets lost on this stream.
1037
- */
1038
- packetsLost?: number;
1039
-
1040
- /**
1041
- * The jitter value for this stream in seconds.
1042
- */
1043
- jitter?: number;
1044
-
1045
- /**
1046
- * The ID of the local object corresponding to this remote stream.
1047
- */
1048
- localId?: string;
1049
-
1050
- /**
1051
- * The most recent RTT measurement for this stream in seconds.
1052
- */
1053
- roundTripTime?: number;
1054
-
1055
- /**
1056
- * The cumulative RTT for all packets on this stream in seconds.
1057
- */
1058
- totalRoundTripTime?: number;
1059
-
1060
- /**
1061
- * The fraction of packets lost on this stream, calculated over a time interval.
1062
- */
1063
- fractionLost?: number;
1064
-
1065
- /**
1066
- * The total number of RTT measurements for this stream.
1067
- */
1068
- roundTripTimeMeasurements?: number;
1069
-
1070
- /**
1071
- * Additional information attached to this stats
1072
- */
1073
- attachments?: Record<string, unknown>;
1074
-
1075
- }
1076
-
1077
- /**
1078
- * Inbound RTPs
1079
- */
1080
- export type InboundRtpStats = {
1081
-
1082
- /**
1083
- * The time the stats were collected, in high-resolution time.
1084
- */
1085
- timestamp: number;
1086
-
1087
- /**
1088
- * Unique identifier of the stats object.
1089
- */
1090
- id: string;
1091
-
1092
- /**
1093
- * Synchronization source identifier of the RTP stream.
1094
- */
1095
- ssrc: number;
1096
-
1097
- /**
1098
- * Kind of the media (e.g., 'audio' or 'video').
1099
- */
1100
- kind: string;
1101
-
1102
- /**
1103
- * Identifier for the media track associated with the RTP stream.
1104
- */
1105
- trackIdentifier: string;
1106
-
1107
- /**
1108
- * ID of the transport associated with the RTP stream.
1109
- */
1110
- transportId?: string;
1111
-
1112
- /**
1113
- * ID of the codec used for the RTP stream.
1114
- */
1115
- codecId?: string;
1116
-
1117
- /**
1118
- * Number of packets received on the RTP stream.
1119
- */
1120
- packetsReceived?: number;
1121
-
1122
- /**
1123
- * Number of packets lost on the RTP stream.
1124
- */
1125
- packetsLost?: number;
1126
-
1127
- /**
1128
- * Jitter of the RTP stream in seconds.
1129
- */
1130
- jitter?: number;
1131
-
1132
- /**
1133
- * The MediaStream ID of the RTP stream.
1134
- */
1135
- mid?: string;
1136
-
1137
- /**
1138
- * Remote stats object ID associated with the RTP stream.
1139
- */
1140
- remoteId?: string;
1141
-
1142
- /**
1143
- * Number of frames decoded.
1144
- */
1145
- framesDecoded?: number;
1146
-
1147
- /**
1148
- * Number of keyframes decoded.
1149
- */
1150
- keyFramesDecoded?: number;
1151
-
1152
- /**
1153
- * Number of frames rendered.
1154
- */
1155
- framesRendered?: number;
1156
-
1157
- /**
1158
- * Number of frames dropped.
1159
- */
1160
- framesDropped?: number;
1161
-
1162
- /**
1163
- * Width of the decoded video frames.
1164
- */
1165
- frameWidth?: number;
1166
-
1167
- /**
1168
- * Height of the decoded video frames.
1169
- */
1170
- frameHeight?: number;
1171
-
1172
- /**
1173
- * Frame rate in frames per second.
1174
- */
1175
- framesPerSecond?: number;
1176
-
1177
- /**
1178
- * Sum of the Quantization Parameter values for decoded frames.
1179
- */
1180
- qpSum?: number;
1181
-
1182
- /**
1183
- * Total time spent decoding in seconds.
1184
- */
1185
- totalDecodeTime?: number;
1186
-
1187
- /**
1188
- * Sum of inter-frame delays in seconds.
1189
- */
1190
- totalInterFrameDelay?: number;
1191
-
1192
- /**
1193
- * Sum of squared inter-frame delays in seconds.
1194
- */
1195
- totalSquaredInterFrameDelay?: number;
1196
-
1197
- /**
1198
- * Number of times playback was paused.
1199
- */
1200
- pauseCount?: number;
1201
-
1202
- /**
1203
- * Total duration of pauses in seconds.
1204
- */
1205
- totalPausesDuration?: number;
1206
-
1207
- /**
1208
- * Number of times playback was frozen.
1209
- */
1210
- freezeCount?: number;
1211
-
1212
- /**
1213
- * Total duration of freezes in seconds.
1214
- */
1215
- totalFreezesDuration?: number;
1216
-
1217
- /**
1218
- * Timestamp of the last packet received.
1219
- */
1220
- lastPacketReceivedTimestamp?: number;
1221
-
1222
- /**
1223
- * Total header bytes received.
1224
- */
1225
- headerBytesReceived?: number;
1226
-
1227
- /**
1228
- * Total packets discarded.
1229
- */
1230
- packetsDiscarded?: number;
1231
-
1232
- /**
1233
- * Total bytes received from FEC.
1234
- */
1235
- fecBytesReceived?: number;
1236
-
1237
- /**
1238
- * Total packets received from FEC.
1239
- */
1240
- fecPacketsReceived?: number;
1241
-
1242
- /**
1243
- * Total FEC packets discarded.
1244
- */
1245
- fecPacketsDiscarded?: number;
1246
-
1247
- /**
1248
- * Total bytes received on the RTP stream.
1249
- */
1250
- bytesReceived?: number;
1251
-
1252
- /**
1253
- * Number of NACKs sent.
1254
- */
1255
- nackCount?: number;
1256
-
1257
- /**
1258
- * Number of Full Intra Requests sent.
1259
- */
1260
- firCount?: number;
1261
-
1262
- /**
1263
- * Number of Picture Loss Indications sent.
1264
- */
1265
- pliCount?: number;
1266
-
1267
- /**
1268
- * Total processing delay in seconds.
1269
- */
1270
- totalProcessingDelay?: number;
1271
-
1272
- /**
1273
- * Estimated timestamp of playout.
1274
- */
1275
- estimatedPlayoutTimestamp?: number;
1276
-
1277
- /**
1278
- * Total jitter buffer delay in seconds.
1279
- */
1280
- jitterBufferDelay?: number;
1281
-
1282
- /**
1283
- * Target delay for the jitter buffer in seconds.
1284
- */
1285
- jitterBufferTargetDelay?: number;
1286
-
1287
- /**
1288
- * Number of packets emitted from the jitter buffer.
1289
- */
1290
- jitterBufferEmittedCount?: number;
1291
-
1292
- /**
1293
- * Minimum delay of the jitter buffer in seconds.
1294
- */
1295
- jitterBufferMinimumDelay?: number;
1296
-
1297
- /**
1298
- * Total audio samples received.
1299
- */
1300
- totalSamplesReceived?: number;
1301
-
1302
- /**
1303
- * Number of concealed audio samples.
1304
- */
1305
- concealedSamples?: number;
1306
-
1307
- /**
1308
- * Number of silent audio samples concealed.
1309
- */
1310
- silentConcealedSamples?: number;
1311
-
1312
- /**
1313
- * Number of audio concealment events.
1314
- */
1315
- concealmentEvents?: number;
1316
-
1317
- /**
1318
- * Number of audio samples inserted for deceleration.
1319
- */
1320
- insertedSamplesForDeceleration?: number;
1321
-
1322
- /**
1323
- * Number of audio samples removed for acceleration.
1324
- */
1325
- removedSamplesForAcceleration?: number;
1326
-
1327
- /**
1328
- * Audio level in the range [0.0, 1.0].
1329
- */
1330
- audioLevel?: number;
1331
-
1332
- /**
1333
- * Total audio energy in the stream.
1334
- */
1335
- totalAudioEnergy?: number;
1336
-
1337
- /**
1338
- * Total duration of all received audio samples in seconds.
1339
- */
1340
- totalSamplesDuration?: number;
1341
-
1342
- /**
1343
- * Total number of frames received.
1344
- */
1345
- framesReceived?: number;
1346
-
1347
- /**
1348
- * Decoder implementation used for decoding frames.
1349
- */
1350
- decoderImplementation?: string;
1351
-
1352
- /**
1353
- * Playout identifier for the RTP stream.
1354
- */
1355
- playoutId?: string;
1356
-
1357
- /**
1358
- * Indicates if the decoder is power-efficient.
1359
- */
1360
- powerEfficientDecoder?: boolean;
1361
-
1362
- /**
1363
- * Number of frames assembled from multiple packets.
1364
- */
1365
- framesAssembledFromMultiplePackets?: number;
1366
-
1367
- /**
1368
- * Total assembly time for frames in seconds.
1369
- */
1370
- totalAssemblyTime?: number;
1371
-
1372
- /**
1373
- * Number of retransmitted packets received.
1374
- */
1375
- retransmittedPacketsReceived?: number;
1376
-
1377
- /**
1378
- * Number of retransmitted bytes received.
1379
- */
1380
- retransmittedBytesReceived?: number;
1381
-
1382
- /**
1383
- * SSRC of the retransmission stream.
1384
- */
1385
- rtxSsrc?: number;
1386
-
1387
- /**
1388
- * SSRC of the FEC stream.
1389
- */
1390
- fecSsrc?: number;
1391
-
1392
- /**
1393
- * Total corruption probability of packets.
1394
- */
1395
- totalCorruptionProbability?: number;
1396
-
1397
- /**
1398
- * Total squared corruption probability of packets.
1399
- */
1400
- totalSquaredCorruptionProbability?: number;
1401
-
1402
- /**
1403
- * Number of corruption measurements.
1404
- */
1405
- corruptionMeasurements?: number;
1406
-
1407
- /**
1408
- * Additional information attached to this stats
1409
- */
1410
- attachments?: Record<string, unknown>;
1411
-
1412
- }
1413
-
1414
- /**
1415
- * Codec items
1416
- */
1417
- export type CodecStats = {
1418
-
1419
- /**
1420
- * The timestamp when the stats were generated.
1421
- */
1422
- timestamp: number;
1423
-
1424
- /**
1425
- * The unique identifier for the stats object.
1426
- */
1427
- id: string;
1428
-
1429
- /**
1430
- * The MIME type of the codec.
1431
- */
1432
- mimeType: string;
1433
-
1434
- /**
1435
- * The payload type of the codec.
1436
- */
1437
- payloadType?: number;
1438
-
1439
- /**
1440
- * The identifier of the transport associated with the codec.
1441
- */
1442
- transportId?: string;
1443
-
1444
- /**
1445
- * The clock rate of the codec in Hz.
1446
- */
1447
- clockRate?: number;
1448
-
1449
- /**
1450
- * The number of audio channels for the codec, if applicable.
1451
- */
1452
- channels?: number;
1453
-
1454
- /**
1455
- * The SDP format-specific parameters line for the codec.
1456
- */
1457
- sdpFmtpLine?: string;
1458
-
1459
- /**
1460
- * Additional information attached to this stats
1461
- */
1462
- attachments?: Record<string, unknown>;
1463
-
1464
- }
1465
-
1466
- /**
1467
- * Outbound Track Stats items
1468
- */
1469
- export type OutboundTrackSample = {
1470
-
1471
- /**
1472
- * The timestamp when the stats were generated.
1473
- */
1474
- timestamp: number;
1475
-
1476
- /**
1477
- * The unique identifier for the stats object.
1478
- */
1479
- id: string;
1480
-
1481
- /**
1482
- * Kind of the media (e.g., 'audio' or 'video').
1483
- */
1484
- kind: string;
1485
-
1486
- /**
1487
- * Calculated score for track (details should be added to attachments)
1488
- */
1489
- score?: number;
1490
-
1491
- /**
1492
- * Additional information attached to this stats
1493
- */
1494
- attachments?: Record<string, unknown>;
1495
-
1496
- }
1497
-
1498
- /**
1499
- * Inbound Track Stats items
1500
- */
1501
- export type InboundTrackSample = {
1502
-
1503
- /**
1504
- * The timestamp when the stats were generated.
1505
- */
1506
- timestamp: number;
1507
-
1508
- /**
1509
- * The unique identifier for the stats object.
1510
- */
1511
- id: string;
1512
-
1513
- /**
1514
- * Kind of the media (e.g., 'audio' or 'video').
1515
- */
1516
- kind: string;
1517
-
1518
- /**
1519
- * Calculated score for track (details should be added to attachments)
1520
- */
1521
- score?: number;
1522
-
1523
- /**
1524
- * Additional information attached to this stats
1525
- */
1526
- attachments?: Record<string, unknown>;
1527
-
1528
- }
1529
-
1530
- /**
1531
- * docs
1532
- */
1533
- export type PeerConnectionSample = {
1534
-
1535
- /**
1536
- * Unique identifier of the stats object.
1537
- */
1538
- peerConnectionId: string;
1539
-
1540
- /**
1541
- * Additional information attached to this sample
1542
- */
1543
- attachments?: Record<string, unknown>;
1544
-
1545
- /**
1546
- * Calculated score for peer connection (details should be added to attachments)
1547
- */
1548
- score?: number;
1549
-
1550
- /**
1551
- * Inbound Track Stats items
1552
- */
1553
- inboundTracks?: InboundTrackSample[];
1554
-
1555
- /**
1556
- * Outbound Track Stats items
1557
- */
1558
- outboundTracks?: OutboundTrackSample[];
1559
-
1560
- /**
1561
- * Codec items
1562
- */
1563
- codecs?: CodecStats[];
1564
-
1565
- /**
1566
- * Inbound RTPs
1567
- */
1568
- inboundRtps?: InboundRtpStats[];
1569
-
1570
- /**
1571
- * Remote Inbound RTPs
1572
- */
1573
- remoteInboundRtps?: RemoteInboundRtpStats[];
1574
-
1575
- /**
1576
- * Outbound RTPs
1577
- */
1578
- outboundRtps?: OutboundRtpStats[];
1579
-
1580
- /**
1581
- * Remote Outbound RTPs
1582
- */
1583
- remoteOutboundRtps?: RemoteOutboundRtpStats[];
1584
-
1585
- /**
1586
- * Audio Source Stats
1587
- */
1588
- mediaSources?: MediaSourceStats[];
1589
-
1590
- /**
1591
- * Media Playout Stats
1592
- */
1593
- mediaPlayouts?: MediaPlayoutStats[];
1594
-
1595
- /**
1596
- * PeerConnection Transport Stats
1597
- */
1598
- peerConnectionTransports?: PeerConnectionTransportStats[];
1599
-
1600
- /**
1601
- * Data Channels Stats
1602
- */
1603
- dataChannels?: DataChannelStats[];
1604
-
1605
- /**
1606
- * ICE Transport Stats
1607
- */
1608
- iceTransports?: IceTransportStats[];
1609
-
1610
- /**
1611
- * ICE Candidate Stats
1612
- */
1613
- iceCandidates?: IceCandidateStats[];
1614
-
1615
- /**
1616
- * ICE Candidate Pair Stats
1617
- */
1618
- iceCandidatePairs?: IceCandidatePairStats[];
1619
-
1620
- /**
1621
- * Certificates
1622
- */
1623
- certificates?: CertificateStats[];
1624
-
1625
- }
1626
-
1627
- /**
1628
- * docs
1629
- */
1630
- export type ClientSample = {
1631
-
1632
- /**
1633
- * The timestamp the sample is created in GMT
1634
- */
1635
- timestamp: number;
1636
-
1637
- /**
1638
- * the unique identifier of the call or session
1639
- */
1640
- callId?: string;
1641
-
1642
- /**
1643
- * Unique id of the client providing samples.
1644
- */
1645
- clientId?: string;
1646
-
1647
- /**
1648
- * Additional information attached to this sample (e.g.: roomId, userId, displayName, etc...)
1649
- */
1650
- attachments?: Record<string, unknown>;
1651
-
1652
- /**
1653
- * Calculated score for client (details should be added to attachments)
1654
- */
1655
- score?: number;
1656
-
1657
- /**
1658
- * Samples taken PeerConnections
1659
- */
1660
- peerConnections?: PeerConnectionSample[];
1661
-
1662
- /**
1663
- * A list of client events.
1664
- */
1665
- clientEvents?: ClientEvent[];
1666
-
1667
- /**
1668
- * A list of client issues.
1669
- */
1670
- clientIssues?: ClientIssue[];
1671
-
1672
- /**
1673
- * A list of additional client events.
1674
- */
1675
- clientMetaItems?: ClientMetaData[];
1676
-
1677
- /**
1678
- * The WebRTC app provided custom stats payload
1679
- */
1680
- extensionStats?: ExtensionStat[];
1681
-
1682
- }