@observertc/observer-js 0.42.9 → 1.0.0-beta.1

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 (299) hide show
  1. package/.prettierrc +6 -6
  2. package/README.md +493 -63
  3. package/lib/ObservedCall.d.ts +63 -43
  4. package/lib/ObservedCall.d.ts.map +1 -1
  5. package/lib/ObservedCall.js +188 -108
  6. package/lib/ObservedCallEventMonitor.d.ts +104 -0
  7. package/lib/ObservedCallEventMonitor.d.ts.map +1 -0
  8. package/lib/ObservedCallEventMonitor.js +314 -0
  9. package/lib/ObservedCallSummary.d.ts +18 -0
  10. package/lib/ObservedCallSummary.d.ts.map +1 -0
  11. package/lib/ObservedCertificate.d.ts +19 -0
  12. package/lib/ObservedCertificate.d.ts.map +1 -0
  13. package/lib/ObservedCertificate.js +38 -0
  14. package/lib/ObservedClient.d.ts +81 -136
  15. package/lib/ObservedClient.d.ts.map +1 -1
  16. package/lib/ObservedClient.js +581 -744
  17. package/lib/ObservedClientEventMonitor.d.ts +91 -0
  18. package/lib/ObservedClientEventMonitor.d.ts.map +1 -0
  19. package/lib/ObservedClientEventMonitor.js +254 -0
  20. package/lib/ObservedClientSummary.d.ts +23 -0
  21. package/lib/ObservedClientSummary.d.ts.map +1 -0
  22. package/lib/ObservedClientSummary.js +2 -0
  23. package/lib/ObservedCodec.d.ts +22 -0
  24. package/lib/ObservedCodec.d.ts.map +1 -0
  25. package/lib/ObservedCodec.js +45 -0
  26. package/lib/ObservedDataChannel.d.ts +25 -69
  27. package/lib/ObservedDataChannel.d.ts.map +1 -1
  28. package/lib/ObservedDataChannel.js +69 -109
  29. package/lib/ObservedIceCandidate.d.ts +29 -0
  30. package/lib/ObservedIceCandidate.d.ts.map +1 -0
  31. package/lib/ObservedIceCandidate.js +59 -0
  32. package/lib/ObservedIceCandidatePair.d.ts +45 -0
  33. package/lib/ObservedIceCandidatePair.d.ts.map +1 -0
  34. package/lib/ObservedIceCandidatePair.js +127 -0
  35. package/lib/ObservedIceTransport.d.ts +36 -0
  36. package/lib/ObservedIceTransport.d.ts.map +1 -0
  37. package/lib/ObservedIceTransport.js +93 -0
  38. package/lib/ObservedInboundRtp.d.ts +92 -0
  39. package/lib/ObservedInboundRtp.d.ts.map +1 -0
  40. package/lib/ObservedInboundRtp.js +193 -0
  41. package/lib/ObservedInboundTrack.d.ts +32 -0
  42. package/lib/ObservedInboundTrack.d.ts.map +1 -0
  43. package/lib/ObservedInboundTrack.js +60 -0
  44. package/lib/ObservedMediaPlayout.d.ts +22 -0
  45. package/lib/ObservedMediaPlayout.d.ts.map +1 -0
  46. package/lib/ObservedMediaPlayout.js +42 -0
  47. package/lib/ObservedMediaSource.d.ts +28 -0
  48. package/lib/ObservedMediaSource.d.ts.map +1 -0
  49. package/lib/ObservedMediaSource.js +55 -0
  50. package/lib/ObservedOutboundRtp.d.ts +62 -0
  51. package/lib/ObservedOutboundRtp.d.ts.map +1 -0
  52. package/lib/ObservedOutboundRtp.js +144 -0
  53. package/lib/ObservedOutboundTrack.d.ts +32 -0
  54. package/lib/ObservedOutboundTrack.d.ts.map +1 -0
  55. package/lib/ObservedOutboundTrack.js +60 -0
  56. package/lib/ObservedPeerConnection.d.ts +154 -80
  57. package/lib/ObservedPeerConnection.d.ts.map +1 -1
  58. package/lib/ObservedPeerConnection.js +709 -357
  59. package/lib/ObservedPeerConnectionTransport.d.ts +17 -0
  60. package/lib/ObservedPeerConnectionTransport.d.ts.map +1 -0
  61. package/lib/ObservedPeerConnectionTransport.js +34 -0
  62. package/lib/ObservedRemoteInboundRtp.d.ts +30 -0
  63. package/lib/ObservedRemoteInboundRtp.d.ts.map +1 -0
  64. package/lib/ObservedRemoteInboundRtp.js +60 -0
  65. package/lib/ObservedRemoteOutboundRtp.d.ts +30 -0
  66. package/lib/ObservedRemoteOutboundRtp.d.ts.map +1 -0
  67. package/lib/ObservedRemoteOutboundRtp.js +60 -0
  68. package/lib/ObservedTURN.d.ts +31 -0
  69. package/lib/ObservedTURN.d.ts.map +1 -0
  70. package/lib/ObservedTURN.js +58 -0
  71. package/lib/ObservedTurnServer.d.ts +25 -0
  72. package/lib/ObservedTurnServer.d.ts.map +1 -0
  73. package/lib/ObservedTurnServer.js +59 -0
  74. package/lib/Observer.d.ts +49 -54
  75. package/lib/Observer.d.ts.map +1 -1
  76. package/lib/Observer.js +131 -226
  77. package/lib/ObserverEventMonitor.d.ts +138 -0
  78. package/lib/ObserverEventMonitor.d.ts.map +1 -0
  79. package/lib/ObserverEventMonitor.js +433 -0
  80. package/lib/ObserverSummary.d.ts +13 -0
  81. package/lib/ObserverSummary.d.ts.map +1 -0
  82. package/lib/ObserverSummary.js +2 -0
  83. package/lib/common/Middleware.d.ts +10 -1
  84. package/lib/common/Middleware.d.ts.map +1 -1
  85. package/lib/common/Middleware.js +55 -36
  86. package/lib/common/logger.d.ts +8 -4
  87. package/lib/common/logger.d.ts.map +1 -1
  88. package/lib/common/logger.js +44 -68
  89. package/lib/common/types.d.ts +0 -21
  90. package/lib/common/types.d.ts.map +1 -1
  91. package/lib/common/types.js +1 -0
  92. package/lib/common/utils.d.ts +3 -1
  93. package/lib/common/utils.d.ts.map +1 -1
  94. package/lib/common/utils.js +23 -3
  95. package/lib/detectors/Detector.d.ts +5 -0
  96. package/lib/detectors/Detector.d.ts.map +1 -0
  97. package/lib/detectors/Detector.js +3 -0
  98. package/lib/detectors/Detectors.d.ts +11 -0
  99. package/lib/detectors/Detectors.d.ts.map +1 -0
  100. package/lib/detectors/Detectors.js +34 -0
  101. package/lib/index.d.ts +26 -25
  102. package/lib/index.d.ts.map +1 -1
  103. package/lib/index.js +45 -41
  104. package/lib/mediasoup/ObservedMediaRouter.d.ts +10 -0
  105. package/lib/mediasoup/ObservedMediaRouter.d.ts.map +1 -0
  106. package/lib/mediasoup/ObservedMediaRouter.js +6 -0
  107. package/lib/monitors/TurnUsageMonitor.d.ts +0 -52
  108. package/lib/monitors/TurnUsageMonitor.d.ts.map +1 -1
  109. package/lib/monitors/TurnUsageMonitor.js +145 -120
  110. package/lib/schema/ClientEventTypes.d.ts +228 -0
  111. package/lib/schema/ClientEventTypes.d.ts.map +1 -0
  112. package/lib/schema/ClientEventTypes.js +41 -0
  113. package/lib/schema/ClientMetaTypes.d.ts +34 -0
  114. package/lib/schema/ClientMetaTypes.d.ts.map +1 -0
  115. package/lib/schema/ClientMetaTypes.js +16 -0
  116. package/lib/schema/ClientSample.d.ts +1333 -0
  117. package/lib/schema/ClientSample.d.ts.map +1 -0
  118. package/lib/schema/ClientSample.js +4 -0
  119. package/lib/scores/CalculatedScore.d.ts +6 -0
  120. package/lib/scores/CalculatedScore.d.ts.map +1 -0
  121. package/lib/scores/CalculatedScore.js +2 -0
  122. package/lib/scores/DefaultCallScoreCalculator.d.ts +7 -0
  123. package/lib/scores/DefaultCallScoreCalculator.d.ts.map +1 -0
  124. package/lib/scores/DefaultCallScoreCalculator.js +21 -0
  125. package/lib/scores/ScoreCalculator.d.ts +4 -0
  126. package/lib/scores/ScoreCalculator.d.ts.map +1 -0
  127. package/lib/scores/ScoreCalculator.js +2 -0
  128. package/lib/updaters/CallUpdater.d.ts +5 -0
  129. package/lib/updaters/CallUpdater.d.ts.map +1 -0
  130. package/lib/updaters/CallUpdater.js +2 -0
  131. package/lib/updaters/ObserverUpdater.d.ts +5 -0
  132. package/lib/updaters/ObserverUpdater.d.ts.map +1 -0
  133. package/lib/updaters/ObserverUpdater.js +2 -0
  134. package/lib/updaters/OnAllCallObserverUpdater.d.ts +15 -0
  135. package/lib/updaters/OnAllCallObserverUpdater.d.ts.map +1 -0
  136. package/lib/updaters/OnAllCallObserverUpdater.js +50 -0
  137. package/lib/updaters/OnAllClientCallUpdater.d.ts +15 -0
  138. package/lib/updaters/OnAllClientCallUpdater.d.ts.map +1 -0
  139. package/lib/updaters/OnAllClientCallUpdater.js +53 -0
  140. package/lib/updaters/OnAnyCallObserverUpdater.d.ts +12 -0
  141. package/lib/updaters/OnAnyCallObserverUpdater.d.ts.map +1 -0
  142. package/lib/updaters/OnAnyCallObserverUpdater.js +37 -0
  143. package/lib/updaters/OnAnyClientCallUpdater.d.ts +12 -0
  144. package/lib/updaters/OnAnyClientCallUpdater.d.ts.map +1 -0
  145. package/lib/updaters/OnAnyClientCallUpdater.js +36 -0
  146. package/lib/updaters/OnIntervalUpdater.d.ts +10 -0
  147. package/lib/updaters/OnIntervalUpdater.d.ts.map +1 -0
  148. package/lib/updaters/OnIntervalUpdater.js +17 -0
  149. package/lib/updaters/Updater.d.ts +6 -0
  150. package/lib/updaters/Updater.d.ts.map +1 -0
  151. package/lib/updaters/Updater.js +2 -0
  152. package/lib/utils/MediasoupRemoteTrackResolver.d.ts +25 -0
  153. package/lib/utils/MediasoupRemoteTrackResolver.d.ts.map +1 -0
  154. package/lib/utils/MediasoupRemoteTrackResolver.js +110 -0
  155. package/lib/utils/RemoteTrackResolver.d.ts +7 -0
  156. package/lib/utils/RemoteTrackResolver.d.ts.map +1 -0
  157. package/lib/utils/RemoteTrackResolver.js +2 -0
  158. package/package.json +4 -4
  159. package/src/ObservedCall.ts +276 -164
  160. package/src/ObservedCallEventMonitor.ts +392 -0
  161. package/src/ObservedCallSummary.ts +22 -0
  162. package/src/ObservedCertificate.ts +43 -0
  163. package/src/ObservedClient.ts +624 -1007
  164. package/src/ObservedClientEventMonitor.ts +309 -0
  165. package/src/ObservedClientSummary.ts +24 -0
  166. package/src/ObservedCodec.ts +49 -0
  167. package/src/ObservedDataChannel.ts +71 -181
  168. package/src/ObservedIceCandidate.ts +64 -0
  169. package/src/ObservedIceCandidatePair.ts +134 -0
  170. package/src/ObservedIceTransport.ts +99 -0
  171. package/src/ObservedInboundRtp.ts +205 -0
  172. package/src/ObservedInboundTrack.ts +75 -0
  173. package/src/ObservedMediaPlayout.ts +49 -0
  174. package/src/ObservedMediaSource.ts +60 -0
  175. package/src/ObservedOutboundRtp.ts +156 -0
  176. package/src/ObservedOutboundTrack.ts +74 -0
  177. package/src/ObservedPeerConnection.ts +917 -402
  178. package/src/ObservedPeerConnectionTransport.ts +38 -0
  179. package/src/ObservedRemoteInboundRtp.ts +64 -0
  180. package/src/ObservedRemoteOutboundRtp.ts +65 -0
  181. package/src/ObservedTURN.ts +86 -0
  182. package/src/ObservedTurnServer.ts +72 -0
  183. package/src/Observer.ts +182 -298
  184. package/src/ObserverEventMonitor.ts +551 -0
  185. package/src/ObserverSummary.ts +15 -0
  186. package/src/common/Middleware.ts +70 -42
  187. package/src/common/logger.ts +60 -69
  188. package/src/common/types.ts +0 -42
  189. package/src/common/utils.ts +24 -2
  190. package/src/detectors/Detector.ts +6 -0
  191. package/src/detectors/Detectors.ts +38 -0
  192. package/src/index.ts +26 -91
  193. package/src/mediasoup/ObservedMediaRouter.ts +10 -0
  194. package/src/monitors/TurnUsageMonitor.ts +164 -164
  195. package/src/schema/ClientEventTypes.ts +280 -0
  196. package/src/schema/ClientMetaTypes.ts +41 -0
  197. package/src/schema/ClientSample.ts +1682 -0
  198. package/src/scores/CalculatedScore.ts +6 -0
  199. package/src/scores/DefaultCallScoreCalculator.ts +23 -0
  200. package/src/scores/ScoreCalculator.ts +3 -0
  201. package/src/updaters/CallUpdater.ts +5 -0
  202. package/src/updaters/ObserverUpdater.ts +5 -0
  203. package/src/updaters/OnAllCallObserverUpdater.ts +59 -0
  204. package/src/updaters/OnAllClientCallUpdater.ts +61 -0
  205. package/src/updaters/OnAnyCallObserverUpdater.ts +41 -0
  206. package/src/updaters/OnAnyClientCallUpdater.ts +39 -0
  207. package/src/updaters/OnIntervalUpdater.ts +19 -0
  208. package/src/updaters/Updater.ts +5 -0
  209. package/src/utils/MediasoupRemoteTrackResolver.ts +155 -0
  210. package/src/utils/RemoteTrackResolver.ts +12 -0
  211. package/tsconfig.json +3 -3
  212. package/lib/ObservedICE.d.ts +0 -64
  213. package/lib/ObservedICE.d.ts.map +0 -1
  214. package/lib/ObservedICE.js +0 -141
  215. package/lib/ObservedInboundAudioTrack.d.ts +0 -96
  216. package/lib/ObservedInboundAudioTrack.d.ts.map +0 -1
  217. package/lib/ObservedInboundAudioTrack.js +0 -217
  218. package/lib/ObservedInboundVideoTrack.d.ts +0 -101
  219. package/lib/ObservedInboundVideoTrack.d.ts.map +0 -1
  220. package/lib/ObservedInboundVideoTrack.js +0 -232
  221. package/lib/ObservedOutboundAudioTrack.d.ts +0 -87
  222. package/lib/ObservedOutboundAudioTrack.d.ts.map +0 -1
  223. package/lib/ObservedOutboundAudioTrack.js +0 -186
  224. package/lib/ObservedOutboundVideoTrack.d.ts +0 -91
  225. package/lib/ObservedOutboundVideoTrack.d.ts.map +0 -1
  226. package/lib/ObservedOutboundVideoTrack.js +0 -193
  227. package/lib/ObservedSfu.d.ts +0 -59
  228. package/lib/ObservedSfu.d.ts.map +0 -1
  229. package/lib/ObservedSfu.js +0 -157
  230. package/lib/ObservedSfuInboundRtpPad.d.ts +0 -42
  231. package/lib/ObservedSfuInboundRtpPad.d.ts.map +0 -1
  232. package/lib/ObservedSfuInboundRtpPad.js +0 -71
  233. package/lib/ObservedSfuOutboundRtpPad.d.ts +0 -42
  234. package/lib/ObservedSfuOutboundRtpPad.d.ts.map +0 -1
  235. package/lib/ObservedSfuOutboundRtpPad.js +0 -72
  236. package/lib/ObservedSfuSctpChannel.d.ts +0 -42
  237. package/lib/ObservedSfuSctpChannel.d.ts.map +0 -1
  238. package/lib/ObservedSfuSctpChannel.js +0 -57
  239. package/lib/ObservedSfuTransport.d.ts +0 -58
  240. package/lib/ObservedSfuTransport.d.ts.map +0 -1
  241. package/lib/ObservedSfuTransport.js +0 -120
  242. package/lib/RemoteTrackAssigner.d.ts +0 -14
  243. package/lib/RemoteTrackAssigner.d.ts.map +0 -1
  244. package/lib/RemoteTrackAssigner.js +0 -52
  245. package/lib/ReportsCollector.d.ts +0 -109
  246. package/lib/ReportsCollector.d.ts.map +0 -1
  247. package/lib/ReportsCollector.js +0 -207
  248. package/lib/common/CalculatedScore.d.ts +0 -80
  249. package/lib/common/CalculatedScore.d.ts.map +0 -1
  250. package/lib/common/CalculatedScore.js +0 -162
  251. package/lib/common/CallEventType.d.ts +0 -63
  252. package/lib/common/CallEventType.d.ts.map +0 -1
  253. package/lib/common/CallEventType.js +0 -39
  254. package/lib/common/CallMetaReports.d.ts +0 -42
  255. package/lib/common/CallMetaReports.d.ts.map +0 -1
  256. package/lib/common/CallMetaReports.js +0 -36
  257. package/lib/common/QualityScoreUtils.d.ts +0 -1
  258. package/lib/common/QualityScoreUtils.d.ts.map +0 -1
  259. package/lib/common/QualityScoreUtils.js +0 -1
  260. package/lib/common/TypedEventEmitter.d.ts +0 -22
  261. package/lib/common/TypedEventEmitter.d.ts.map +0 -1
  262. package/lib/common/TypedEventEmitter.js +0 -11
  263. package/lib/common/callEventReports.d.ts +0 -10
  264. package/lib/common/callEventReports.d.ts.map +0 -1
  265. package/lib/common/callEventReports.js +0 -112
  266. package/lib/monitors/CallSummary.d.ts +0 -37
  267. package/lib/monitors/CallSummary.d.ts.map +0 -1
  268. package/lib/monitors/CallSummaryMonitor.d.ts +0 -32
  269. package/lib/monitors/CallSummaryMonitor.d.ts.map +0 -1
  270. package/lib/monitors/CallSummaryMonitor.js +0 -152
  271. package/lib/monitors/ClientIssueMonitor.d.ts +0 -32
  272. package/lib/monitors/ClientIssueMonitor.d.ts.map +0 -1
  273. package/lib/monitors/ClientIssueMonitor.js +0 -49
  274. package/lib/monitors/SfuServerMonitor.d.ts +0 -79
  275. package/lib/monitors/SfuServerMonitor.d.ts.map +0 -1
  276. package/lib/monitors/SfuServerMonitor.js +0 -198
  277. package/src/ObservedICE.ts +0 -237
  278. package/src/ObservedInboundAudioTrack.ts +0 -344
  279. package/src/ObservedInboundVideoTrack.ts +0 -361
  280. package/src/ObservedOutboundAudioTrack.ts +0 -307
  281. package/src/ObservedOutboundVideoTrack.ts +0 -319
  282. package/src/ObservedSfu.ts +0 -231
  283. package/src/ObservedSfuInboundRtpPad.ts +0 -106
  284. package/src/ObservedSfuOutboundRtpPad.ts +0 -107
  285. package/src/ObservedSfuSctpChannel.ts +0 -103
  286. package/src/ObservedSfuTransport.ts +0 -185
  287. package/src/RemoteTrackAssigner.ts +0 -68
  288. package/src/ReportsCollector.ts +0 -336
  289. package/src/common/CalculatedScore.ts +0 -188
  290. package/src/common/CallEventType.ts +0 -69
  291. package/src/common/CallMetaReports.ts +0 -82
  292. package/src/common/QualityScoreUtils.ts +0 -0
  293. package/src/common/TypedEventEmitter.ts +0 -32
  294. package/src/common/callEventReports.ts +0 -178
  295. package/src/monitors/CallSummary.ts +0 -38
  296. package/src/monitors/CallSummaryMonitor.ts +0 -192
  297. package/src/monitors/ClientIssueMonitor.ts +0 -88
  298. package/src/monitors/SfuServerMonitor.ts +0 -285
  299. /package/lib/{monitors/CallSummary.js → ObservedCallSummary.js} +0 -0
package/lib/Observer.js CHANGED
@@ -1,255 +1,160 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.Observer = void 0;
15
4
  const logger_1 = require("./common/logger");
16
5
  const ObservedCall_1 = require("./ObservedCall");
17
- const ReportsCollector_1 = require("./ReportsCollector");
18
6
  const events_1 = require("events");
19
- const callEventReports_1 = require("./common/callEventReports");
20
- const ObservedSfu_1 = require("./ObservedSfu");
21
- const CallSummaryMonitor_1 = require("./monitors/CallSummaryMonitor");
22
- const TurnUsageMonitor_1 = require("./monitors/TurnUsageMonitor");
23
- const ClientIssueMonitor_1 = require("./monitors/ClientIssueMonitor");
24
- const SfuServerMonitor_1 = require("./monitors/SfuServerMonitor");
7
+ const ObservedTURN_1 = require("./ObservedTURN");
8
+ const Detectors_1 = require("./detectors/Detectors");
9
+ const OnIntervalUpdater_1 = require("./updaters/OnIntervalUpdater");
10
+ const OnAllCallObserverUpdater_1 = require("./updaters/OnAllCallObserverUpdater");
11
+ const OnAnyCallObserverUpdater_1 = require("./updaters/OnAnyCallObserverUpdater");
12
+ const ObserverEventMonitor_1 = require("./ObserverEventMonitor");
13
+ const MediasoupRemoteTrackResolver_1 = require("./utils/MediasoupRemoteTrackResolver");
25
14
  const logger = (0, logger_1.createLogger)('Observer');
26
15
  class Observer extends events_1.EventEmitter {
27
- static create(providedConfig) {
28
- const config = Object.assign({
29
- defaultServiceId: 'default-service-id',
30
- defaultMediaUnitId: 'default-media-unit-id',
31
- evaluator: {
32
- fetchSamples: true,
33
- maxIdleTimeInMs: 300 * 1000,
34
- },
35
- sink: {},
36
- logLevel: 'info',
37
- }, providedConfig);
38
- return new Observer(config);
16
+ config;
17
+ detectors;
18
+ observedTURN = new ObservedTURN_1.ObservedTURN();
19
+ observedCalls = new Map();
20
+ updater;
21
+ closed = false;
22
+ totalAddedCall = 0;
23
+ totalRemovedCall = 0;
24
+ totalRttLt50Measurements = 0;
25
+ totalRttLt150Measurements = 0;
26
+ totalRttLt300Measurements = 0;
27
+ totalRttGtOrEq300Measurements = 0;
28
+ totalClientIssues = 0;
29
+ numberOfClientsUsingTurn = 0;
30
+ numberOfClients = 0;
31
+ numberOfInboundRtpStreams = 0;
32
+ numberOfOutboundRtpStreams = 0;
33
+ numberOfDataChannels = 0;
34
+ numberOfPeerConnections = 0;
35
+ get numberOfCalls() {
36
+ return this.observedCalls.size;
39
37
  }
40
- constructor(config) {
38
+ _timer;
39
+ constructor(config = {
40
+ updatePolicy: 'update-when-all-call-updated',
41
+ updateIntervalInMs: undefined,
42
+ appData: {},
43
+ }) {
41
44
  super();
42
45
  this.config = config;
43
- this.reports = new ReportsCollector_1.ReportsCollector();
44
- this._observedCalls = new Map();
45
- this._observedSfus = new Map();
46
- this._monitors = new Map();
47
- this._closed = false;
48
46
  this.setMaxListeners(Infinity);
49
- logger.debug('Observer is created with config', this.config);
50
- const onReports = (context) => this.emit('reports', context);
51
- const onNewReport = (collectedReports) => {
52
- if (!this.config.maxReports || this._closed)
53
- return;
54
- if (this.config.maxReports < collectedReports) {
55
- this._emitReports();
47
+ this.update = this.update.bind(this);
48
+ const currentUpdatePolicy = (config?.updatePolicy) ?? 'update-when-all-call-updated';
49
+ switch (currentUpdatePolicy) {
50
+ case 'update-on-any-call-updated':
51
+ this.updater = new OnAnyCallObserverUpdater_1.OnAnyCallObserverUpdater(this);
52
+ break;
53
+ case 'update-when-all-call-updated':
54
+ this.updater = new OnAllCallObserverUpdater_1.OnAllCallObserverUpdater(this);
55
+ break;
56
+ case 'update-on-interval': {
57
+ const interval = config?.updateIntervalInMs;
58
+ if (!interval) {
59
+ throw new Error('updateIntervalInMs setting in config must be set if updatePolicy is update-on-interval');
60
+ }
61
+ this.updater = new OnIntervalUpdater_1.OnIntervalUpdater(interval, this.update.bind(this));
62
+ break;
56
63
  }
57
- };
58
- this._emitReports();
59
- this.once('close', () => {
60
- this.reports.off('newreport', onNewReport);
61
- this.reports.off('reports', onReports);
62
- });
63
- this.reports.on('newreport', onNewReport);
64
- this.reports.on('reports', onReports);
65
- }
66
- createObservedCall(config) {
67
- if (this._closed) {
68
- throw new Error('Attempted to create a call source on a closed observer');
69
64
  }
70
- const { appData, reportCallEnded = true, reportCallStarted = true } = config, model = __rest(config, ["appData", "reportCallEnded", "reportCallStarted"]);
71
- const call = new ObservedCall_1.ObservedCall(Object.assign(Object.assign({}, model), { serviceId: this.config.defaultServiceId }), this, appData);
72
- if (this._closed)
73
- throw new Error('Cannot create an observed call on a closed observer');
74
- if (this._observedCalls.has(call.callId))
75
- throw new Error(`Observed Call with id ${call.callId} already exists`);
76
- call.once('close', () => {
77
- var _a;
78
- this._observedCalls.delete(call.callId);
79
- reportCallEnded && this.reports.addCallEventReport((0, callEventReports_1.createCallEndedEventReport)(call.serviceId, call.roomId, call.callId, (_a = call.observationEnded) !== null && _a !== void 0 ? _a : Date.now()));
80
- });
81
- this._observedCalls.set(call.callId, call);
82
- reportCallStarted && this.reports.addCallEventReport((0, callEventReports_1.createCallStartedEventReport)(call.serviceId, call.roomId, call.callId, call.observationStarted));
83
- this.emit('newcall', call);
84
- return call;
65
+ this.detectors = new Detectors_1.Detectors();
85
66
  }
86
- createObservedSfu(model, appData) {
87
- if (this._closed) {
88
- throw new Error('Attempted to create an sfu source on a closed observer');
89
- }
90
- const sfu = new ObservedSfu_1.ObservedSfu(model, this, appData);
91
- if (this._closed)
92
- throw new Error('Cannot create an observed sfu on a closed observer');
93
- if (this._observedSfus.has(sfu.sfuId))
94
- throw new Error(`Observed SFU with id ${sfu.sfuId} already exists`);
95
- sfu.once('close', () => {
96
- this._observedSfus.delete(sfu.sfuId);
97
- });
98
- this._observedSfus.set(sfu.sfuId, sfu);
99
- this.emit('newsfu', sfu);
100
- return sfu;
67
+ get appData() {
68
+ return this.config.appData;
101
69
  }
102
- createCallSummaryMonitor(options) {
103
- if (this._closed)
104
- throw new Error('Cannot create a call summary monitor on a closed observer');
105
- const existingMonitor = this._monitors.get(CallSummaryMonitor_1.CallSummaryMonitor.name);
106
- if (existingMonitor)
107
- return existingMonitor;
108
- const monitor = new CallSummaryMonitor_1.CallSummaryMonitor(options);
109
- const onNewCall = (call) => {
110
- monitor.addCall(call);
111
- call.once('close', () => {
112
- var _a;
113
- return setTimeout(() => {
114
- const summary = monitor.takeSummary(call.callId);
115
- summary && monitor.emit('summary', summary);
116
- }, (_a = options === null || options === void 0 ? void 0 : options.timeoutAfterCallClose) !== null && _a !== void 0 ? _a : 1000);
117
- });
118
- };
119
- monitor.once('close', () => {
120
- this._monitors.delete(CallSummaryMonitor_1.CallSummaryMonitor.name);
121
- this.off('newcall', onNewCall);
122
- });
123
- this._monitors.set(CallSummaryMonitor_1.CallSummaryMonitor.name, monitor);
124
- this.on('newcall', onNewCall);
125
- this.once('close', () => {
126
- monitor.close();
127
- });
128
- return monitor;
129
- }
130
- createTurnUsageMonitor() {
131
- if (this._closed)
132
- throw new Error('Cannot create a turn usage monitor on a closed observer');
133
- const existingMonitor = this._monitors.get(TurnUsageMonitor_1.TurnUsageMonitor.name);
134
- if (existingMonitor)
135
- return existingMonitor;
136
- const monitor = new TurnUsageMonitor_1.TurnUsageMonitor();
137
- const onNewCall = (call) => {
138
- const onNewClient = (client) => {
139
- const onNewPeerConnection = (pc) => {
140
- const onUsingTurnChanged = (usingTurn) => {
141
- if (usingTurn)
142
- monitor.addPeerConnection(pc);
143
- else
144
- monitor.removePeerConnection(pc);
145
- };
146
- pc.once('close', () => {
147
- pc.ICE.off('usingturnchanged', onUsingTurnChanged);
148
- monitor.removePeerConnection(pc);
149
- });
150
- pc.ICE.on('usingturnchanged', onUsingTurnChanged);
151
- };
152
- client.once('close', () => client.off('newpeerconnection', onNewPeerConnection));
153
- client.on('newpeerconnection', onNewPeerConnection);
154
- };
155
- call.once('close', () => call.off('newclient', onNewClient));
156
- call.on('newclient', onNewClient);
157
- };
158
- monitor.once('close', () => {
159
- this._monitors.delete(TurnUsageMonitor_1.TurnUsageMonitor.name);
160
- this.off('newcall', onNewCall);
161
- });
162
- this._monitors.set(TurnUsageMonitor_1.TurnUsageMonitor.name, monitor);
163
- this.on('newcall', onNewCall);
164
- this.once('close', () => {
165
- monitor.close();
166
- });
167
- return monitor;
168
- }
169
- createSfuServerMonitor() {
170
- if (this._closed)
171
- throw new Error('Cannot create a turn usage monitor on a closed observer');
172
- const existingMonitor = this._monitors.get(SfuServerMonitor_1.SfuServerMonitor.name);
173
- if (existingMonitor)
174
- return existingMonitor;
175
- const monitor = new SfuServerMonitor_1.SfuServerMonitor({
176
- tooHighRttAlertSettings: {
177
- minNumberOfPeerConnections: 10,
178
- percentageOfPeerConnectionsHighWatermark: 0.5,
179
- percentageOfPeerConnectionsLowWatermark: 0.2,
180
- threshold: 'rtt-gt-300',
181
- }
182
- });
183
- const onNewCall = (call) => {
184
- const onNewClient = (client) => {
185
- const onNewPeerConnection = (pc) => {
186
- monitor.addPeerConnection(pc);
187
- };
188
- client.once('close', () => client.off('newpeerconnection', onNewPeerConnection));
189
- client.on('newpeerconnection', onNewPeerConnection);
190
- };
191
- call.once('close', () => call.off('newclient', onNewClient));
192
- call.on('newclient', onNewClient);
193
- };
194
- monitor.once('close', () => {
195
- this._monitors.delete(SfuServerMonitor_1.SfuServerMonitor.name);
196
- this.off('newcall', onNewCall);
197
- });
198
- this._monitors.set(SfuServerMonitor_1.SfuServerMonitor.name, monitor);
199
- this.on('newcall', onNewCall);
200
- this.once('close', () => {
201
- monitor.close();
202
- });
203
- return monitor;
70
+ getObservedCall(callId) {
71
+ if (this.closed || !this.observedCalls.has(callId))
72
+ return;
73
+ return this.observedCalls.get(callId);
204
74
  }
205
- createClientIssueMonitor() {
206
- if (this._closed)
207
- throw new Error('Cannot create a turn usage monitor on a closed observer');
208
- const existingMonitor = this._monitors.get(ClientIssueMonitor_1.ClientIssueMonitor.name);
209
- if (existingMonitor)
210
- return existingMonitor;
211
- const monitor = new ClientIssueMonitor_1.ClientIssueMonitor();
212
- const onNewCall = (call) => monitor.addCall(call);
213
- monitor.once('close', () => {
214
- this._monitors.delete(ClientIssueMonitor_1.ClientIssueMonitor.name);
215
- this.off('newcall', onNewCall);
216
- });
217
- this._monitors.set(ClientIssueMonitor_1.ClientIssueMonitor.name, monitor);
218
- this.on('newcall', onNewCall);
219
- this.once('close', () => {
220
- monitor.close();
75
+ createObservedCall(settings) {
76
+ if (this.closed) {
77
+ throw new Error('Attempted to create a call source on a closed observer');
78
+ }
79
+ if (!settings.updatePolicy) {
80
+ settings.updatePolicy = this.config.defaultCallUpdatePolicy;
81
+ settings.updateIntervalInMs = this.config.defaultCallUpdateIntervalInMs;
82
+ }
83
+ const observedCall = new ObservedCall_1.ObservedCall(settings, this);
84
+ const onCallUpdated = () => this._onObservedCallUpdated(observedCall);
85
+ if (this.observedCalls.has(observedCall.callId))
86
+ throw new Error(`Observed Call with id ${observedCall.callId} already exists`);
87
+ if (settings.remoteTrackResolvePolicy === 'mediasoup-sfu') {
88
+ observedCall.remoteTrackResolver = new MediasoupRemoteTrackResolver_1.MediasoupRemoteTrackResolver(observedCall);
89
+ }
90
+ observedCall.once('close', () => {
91
+ this.observedCalls.delete(observedCall.callId);
92
+ observedCall.off('update', onCallUpdated);
93
+ ++this.totalRemovedCall;
221
94
  });
222
- return monitor;
223
- }
224
- get observedCalls() {
225
- return this._observedCalls;
226
- }
227
- get observedSfus() {
228
- return this._observedSfus;
229
- }
230
- get closed() {
231
- return this._closed;
95
+ this.observedCalls.set(observedCall.callId, observedCall);
96
+ observedCall.on('update', onCallUpdated);
97
+ ++this.totalAddedCall;
98
+ this.emit('newcall', observedCall);
99
+ return observedCall;
232
100
  }
233
101
  close() {
234
- if (this._closed) {
102
+ if (this.closed) {
235
103
  return logger.debug('Attempted to close twice');
236
104
  }
237
- this._closed = true;
238
- this._observedCalls.forEach((call) => call.close());
105
+ this.closed = true;
106
+ clearInterval(this._timer);
107
+ this._timer = undefined;
108
+ this.observedCalls.forEach((call) => call.close());
239
109
  this.emit('close');
240
110
  }
241
- _emitReports() {
242
- if (this._reportTimer) {
243
- clearTimeout(this._reportTimer);
244
- this._reportTimer = undefined;
111
+ accept(sample) {
112
+ if (this.closed)
113
+ return;
114
+ if (!sample.callId)
115
+ return logger.warn('Received sample without callId. %o', sample);
116
+ if (!sample.clientId)
117
+ return logger.warn('Received sample without clientId %o', sample);
118
+ const call = this.getObservedCall(sample.callId) ?? this.createObservedCall({
119
+ callId: sample.callId,
120
+ updateIntervalInMs: this.config.defaultCallUpdateIntervalInMs,
121
+ updatePolicy: this.config.defaultCallUpdatePolicy,
122
+ });
123
+ const client = call.getObservedClient(sample.clientId) ?? call.createObservedClient({
124
+ clientId: sample.clientId,
125
+ });
126
+ client.accept(sample);
127
+ }
128
+ update() {
129
+ if (this.closed) {
130
+ return;
245
131
  }
246
- this.reports.emit();
247
- if (this.config.maxCollectingTimeInMs) {
248
- this._reportTimer = setTimeout(() => {
249
- this._reportTimer = undefined;
250
- this._emitReports();
251
- }, this.config.maxCollectingTimeInMs);
132
+ this.numberOfInboundRtpStreams = 0;
133
+ this.numberOfOutboundRtpStreams = 0;
134
+ this.numberOfPeerConnections = 0;
135
+ this.numberOfDataChannels = 0;
136
+ this.numberOfClients = 0;
137
+ this.numberOfClientsUsingTurn = 0;
138
+ for (const call of this.observedCalls.values()) {
139
+ this.numberOfInboundRtpStreams += call.numberOfInboundRtpStreams;
140
+ this.numberOfOutboundRtpStreams += call.numberOfOutboundRtpStreams;
141
+ this.numberOfPeerConnections += call.numberOfPeerConnections;
142
+ this.numberOfDataChannels += call.numberOfDataChannels;
143
+ this.numberOfClients += call.numberOfClients;
144
+ this.numberOfClientsUsingTurn += call.clientsUsedTurn.size;
252
145
  }
146
+ this.observedTURN.update();
147
+ this.emit('update');
148
+ }
149
+ _onObservedCallUpdated(call) {
150
+ this.totalRttLt50Measurements += call.deltaRttLt50Measurements;
151
+ this.totalRttLt150Measurements += call.deltaRttLt150Measurements;
152
+ this.totalRttLt300Measurements += call.deltaRttLt300Measurements;
153
+ this.totalRttGtOrEq300Measurements += call.deltaRttGtOrEq300Measurements;
154
+ this.totalClientIssues += call.deltaNumberOfIssues;
155
+ }
156
+ createEventMonitor(ctx) {
157
+ return new ObserverEventMonitor_1.ObserverEventMonitor(this, ctx ?? {});
253
158
  }
254
159
  }
255
160
  exports.Observer = Observer;
@@ -0,0 +1,138 @@
1
+ import { ObservedCall } from './ObservedCall';
2
+ import { ObservedCertificate } from './ObservedCertificate';
3
+ import { ObservedClient } from './ObservedClient';
4
+ import { ObservedCodec } from './ObservedCodec';
5
+ import { ObservedDataChannel } from './ObservedDataChannel';
6
+ import { ObservedIceCandidate } from './ObservedIceCandidate';
7
+ import { ObservedIceCandidatePair } from './ObservedIceCandidatePair';
8
+ import { ObservedIceTransport } from './ObservedIceTransport';
9
+ import { ObservedInboundRtp } from './ObservedInboundRtp';
10
+ import { ObservedInboundTrack } from './ObservedInboundTrack';
11
+ import { ObservedMediaPlayout } from './ObservedMediaPlayout';
12
+ import { ObservedMediaSource } from './ObservedMediaSource';
13
+ import { ObservedOutboundRtp } from './ObservedOutboundRtp';
14
+ import { ObservedOutboundTrack } from './ObservedOutboundTrack';
15
+ import { ObservedPeerConnection } from './ObservedPeerConnection';
16
+ import { Observer } from './Observer';
17
+ import { ClientEvent, ClientIssue, ClientMetaData, ClientSample, ExtensionStat } from './schema/ClientSample';
18
+ export declare class ObserverEventMonitor<Context> {
19
+ readonly observer: Observer;
20
+ readonly context: Context;
21
+ constructor(observer: Observer, context: Context);
22
+ onCallAdded?: (call: ObservedCall, ctx: Context) => void;
23
+ onCallRemoved?: (call: ObservedCall, ctx: Context) => void;
24
+ onCallEmpty?: (call: ObservedCall, ctx: Context) => void;
25
+ onCallNotEmpty?: (call: ObservedCall, ctx: Context) => void;
26
+ onCallUpdated?: (call: ObservedCall, ctx: Context) => void;
27
+ onClientAdded?: (client: ObservedClient, ctx: Context) => void;
28
+ onClientClosed?: (client: ObservedClient, ctx: Context) => void;
29
+ onClientRejoined?: (client: ObservedClient, ctx: Context) => void;
30
+ onClientIssue?: (observedClent: ObservedClient, issue: ClientIssue, ctx: Context) => void;
31
+ onClientMetadata?: (observedClient: ObservedClient, metadata: ClientMetaData, ctx: Context) => void;
32
+ onClientExtensionStats?: (observedClient: ObservedClient, extensionStats: ExtensionStat, ctx: Context) => void;
33
+ onClientJoined?: (client: ObservedClient, ctx: Context) => void;
34
+ onClientLeft?: (client: ObservedClient, ctx: Context) => void;
35
+ onClientUserMediaError?: (observedClient: ObservedClient, error: string, ctx: Context) => void;
36
+ onClientUsingTurn?: (client: ObservedClient, usingTurn: boolean, ctx: Context) => void;
37
+ onClientUpdated?: (client: ObservedClient, sample: ClientSample, ctx: Context) => void;
38
+ onClientEvent?: (client: ObservedClient, event: ClientEvent, ctx: Context) => void;
39
+ onPeerConnectionAdded?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
40
+ onPeerConnectionRemoved?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
41
+ onSelectedCandidatePairChanged?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
42
+ onIceGatheringStateChange?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
43
+ onIceConnectionStateChange?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
44
+ onConnectionStateChange?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
45
+ onCertificateAdded?: (certificate: ObservedCertificate, ctx: Context) => void;
46
+ onCertificateRemoved?: (certificate: ObservedCertificate, ctx: Context) => void;
47
+ onCertificateUpdated?: (certificate: ObservedCertificate, ctx: Context) => void;
48
+ onInboundTrackAdded?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
49
+ onInboundTrackRemoved?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
50
+ onInboundTrackUpdated?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
51
+ onInboundTrackMuted?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
52
+ onInboundTrackUnmuted?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
53
+ onOutboundTrackAdded?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
54
+ onOutboundTrackRemoved?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
55
+ onOutboundTrackUpdated?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
56
+ onOutboundTrackMuted?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
57
+ onOutboundTrackUnmuted?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
58
+ onInboundRtpAdded?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
59
+ onInboundRtpRemoved?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
60
+ onInboundRtpUpdated?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
61
+ onOutboundRtpAdded?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
62
+ onOutboundRtpRemoved?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
63
+ onOutboundRtpUpdated?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
64
+ onDataChannelAdded?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
65
+ onDataChannelRemoved?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
66
+ onDataChannelUpdated?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
67
+ onAddedIceTransport?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
68
+ onRemovedIceTransport?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
69
+ onIceTransportUpdated?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
70
+ onIceCandidateAdded?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
71
+ onIceCandidateRemoved?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
72
+ onIceCandidateUpdated?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
73
+ onAddedIceCandidatePair?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
74
+ onRemovedIceCandidatePair?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
75
+ onIceCandidatePairUpdated?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
76
+ onAddedMediaCodec?: (codec: ObservedCodec, ctx: Context) => void;
77
+ onRemovedMediaCodec?: (codec: ObservedCodec, ctx: Context) => void;
78
+ onMediaCodecUpdated?: (codec: ObservedCodec, ctx: Context) => void;
79
+ onAddedMediaPlayout?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
80
+ onRemovedMediaPlayout?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
81
+ onMediaPlayoutUpdated?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
82
+ onMediaSourceAdded?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
83
+ onMediaSourceRemoved?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
84
+ onMediaSourceUpdated?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
85
+ private _onCallAdded;
86
+ private _onClientAdded;
87
+ private _onClientRejoined;
88
+ private _onPeerConnconnectionAdded;
89
+ private _onPeerConnectionRemoved;
90
+ private _onCertificateAdded;
91
+ private _onCertificateRemoved;
92
+ private _onCertificateUpdated;
93
+ private _onInboundTrackAdded;
94
+ private _onInboundTrackRemoved;
95
+ private _onInboundTrackUpdated;
96
+ private _onOutboundTrackMuted;
97
+ private _onOutboundTrackUnmuted;
98
+ private _onOutboundTrackAdded;
99
+ private _onOutboundTrackRemoved;
100
+ private _onOutboundTrackUpdated;
101
+ private _onInboundTrackMuted;
102
+ private _onInboundTrackUnmuted;
103
+ private _onInboundRtpAdded;
104
+ private _onInboundRtpRemoved;
105
+ private _onInboundRtpUpdated;
106
+ private _onOutboundRtpAdded;
107
+ private _onOutboundRtpRemoved;
108
+ private _onOutboundRtpUpdated;
109
+ private _onDataChannelAdded;
110
+ private _onDataChannelRemoved;
111
+ private _onDataChannelUpdated;
112
+ private _onAddedIceTransport;
113
+ private _onRemovedIceTransport;
114
+ private _onIceTransportUpdated;
115
+ private _onIceCandidateAdded;
116
+ private _onIceCandidateRemoved;
117
+ private _onIceCandidateUpdated;
118
+ private _onAddedIceCandidatePair;
119
+ private _onRemovedIceCandidatePair;
120
+ private _onIceCandidatePairUpdated;
121
+ private _onAddedMediaCodec;
122
+ private _onRemovedMediaCodec;
123
+ private _onMediaCodecUpdated;
124
+ private _onAddedMediaPlayout;
125
+ private _onRemovedMediaPlayout;
126
+ private _onMediaPlayoutUpdated;
127
+ private _onMediaSourceAdded;
128
+ private _onMediaSourceRemoved;
129
+ private _onMediaSourceUpdated;
130
+ private _onClientIssue;
131
+ private _onClientMetadata;
132
+ private _onClientExtensionStats;
133
+ private _onClientJoined;
134
+ private _onClientLeft;
135
+ private _onUserMediaError;
136
+ private _onUsingTurn;
137
+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