@observertc/observer-js 0.42.9 → 1.0.1-24e14e5.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 (287) hide show
  1. package/.prettierrc +6 -6
  2. package/README.md +0 -104
  3. package/lib/ObservedCall.d.ts +61 -43
  4. package/lib/ObservedCall.d.ts.map +1 -1
  5. package/lib/ObservedCall.js +172 -108
  6. package/lib/ObservedCallSummary.d.ts +18 -0
  7. package/lib/ObservedCallSummary.d.ts.map +1 -0
  8. package/lib/ObservedCertificate.d.ts +19 -0
  9. package/lib/ObservedCertificate.d.ts.map +1 -0
  10. package/lib/ObservedCertificate.js +38 -0
  11. package/lib/ObservedClient.d.ts +79 -130
  12. package/lib/ObservedClient.d.ts.map +1 -1
  13. package/lib/ObservedClient.js +463 -744
  14. package/lib/ObservedClientEventMonitor.d.ts +89 -0
  15. package/lib/ObservedClientEventMonitor.d.ts.map +1 -0
  16. package/lib/ObservedClientEventMonitor.js +247 -0
  17. package/lib/ObservedClientSummary.d.ts +23 -0
  18. package/lib/ObservedClientSummary.d.ts.map +1 -0
  19. package/lib/ObservedClientSummary.js +2 -0
  20. package/lib/ObservedCodec.d.ts +22 -0
  21. package/lib/ObservedCodec.d.ts.map +1 -0
  22. package/lib/ObservedCodec.js +45 -0
  23. package/lib/ObservedDataChannel.d.ts +25 -69
  24. package/lib/ObservedDataChannel.d.ts.map +1 -1
  25. package/lib/ObservedDataChannel.js +69 -109
  26. package/lib/ObservedIceCandidate.d.ts +29 -0
  27. package/lib/ObservedIceCandidate.d.ts.map +1 -0
  28. package/lib/ObservedIceCandidate.js +59 -0
  29. package/lib/ObservedIceCandidatePair.d.ts +44 -0
  30. package/lib/ObservedIceCandidatePair.d.ts.map +1 -0
  31. package/lib/ObservedIceCandidatePair.js +111 -0
  32. package/lib/ObservedIceTransport.d.ts +36 -0
  33. package/lib/ObservedIceTransport.d.ts.map +1 -0
  34. package/lib/ObservedIceTransport.js +93 -0
  35. package/lib/ObservedInboundRtp.d.ts +92 -0
  36. package/lib/ObservedInboundRtp.d.ts.map +1 -0
  37. package/lib/ObservedInboundRtp.js +193 -0
  38. package/lib/ObservedInboundTrack.d.ts +31 -0
  39. package/lib/ObservedInboundTrack.d.ts.map +1 -0
  40. package/lib/ObservedInboundTrack.js +59 -0
  41. package/lib/ObservedMediaPlayout.d.ts +22 -0
  42. package/lib/ObservedMediaPlayout.d.ts.map +1 -0
  43. package/lib/ObservedMediaPlayout.js +42 -0
  44. package/lib/ObservedMediaSource.d.ts +28 -0
  45. package/lib/ObservedMediaSource.d.ts.map +1 -0
  46. package/lib/ObservedMediaSource.js +55 -0
  47. package/lib/ObservedOutboundRtp.d.ts +62 -0
  48. package/lib/ObservedOutboundRtp.d.ts.map +1 -0
  49. package/lib/ObservedOutboundRtp.js +144 -0
  50. package/lib/ObservedOutboundTrack.d.ts +31 -0
  51. package/lib/ObservedOutboundTrack.d.ts.map +1 -0
  52. package/lib/ObservedOutboundTrack.js +59 -0
  53. package/lib/ObservedPeerConnection.d.ts +132 -80
  54. package/lib/ObservedPeerConnection.d.ts.map +1 -1
  55. package/lib/ObservedPeerConnection.js +646 -357
  56. package/lib/ObservedPeerConnectionTransport.d.ts +17 -0
  57. package/lib/ObservedPeerConnectionTransport.d.ts.map +1 -0
  58. package/lib/ObservedPeerConnectionTransport.js +34 -0
  59. package/lib/ObservedRemoteInboundRtp.d.ts +30 -0
  60. package/lib/ObservedRemoteInboundRtp.d.ts.map +1 -0
  61. package/lib/ObservedRemoteInboundRtp.js +60 -0
  62. package/lib/ObservedRemoteOutboundRtp.d.ts +30 -0
  63. package/lib/ObservedRemoteOutboundRtp.d.ts.map +1 -0
  64. package/lib/ObservedRemoteOutboundRtp.js +60 -0
  65. package/lib/ObservedTURN.d.ts +31 -0
  66. package/lib/ObservedTURN.d.ts.map +1 -0
  67. package/lib/ObservedTURN.js +58 -0
  68. package/lib/ObservedTurnServer.d.ts +25 -0
  69. package/lib/ObservedTurnServer.d.ts.map +1 -0
  70. package/lib/ObservedTurnServer.js +59 -0
  71. package/lib/Observer.d.ts +44 -51
  72. package/lib/Observer.d.ts.map +1 -1
  73. package/lib/Observer.js +131 -226
  74. package/lib/ObserverEventMonitor.d.ts +104 -0
  75. package/lib/ObserverEventMonitor.d.ts.map +1 -0
  76. package/lib/ObserverEventMonitor.js +307 -0
  77. package/lib/ObserverSummary.d.ts +13 -0
  78. package/lib/ObserverSummary.d.ts.map +1 -0
  79. package/lib/ObserverSummary.js +2 -0
  80. package/lib/common/Middleware.d.ts +10 -1
  81. package/lib/common/Middleware.d.ts.map +1 -1
  82. package/lib/common/Middleware.js +55 -36
  83. package/lib/common/logger.d.ts +8 -4
  84. package/lib/common/logger.d.ts.map +1 -1
  85. package/lib/common/logger.js +44 -68
  86. package/lib/common/types.d.ts +0 -21
  87. package/lib/common/types.d.ts.map +1 -1
  88. package/lib/common/types.js +1 -0
  89. package/lib/common/utils.d.ts +3 -1
  90. package/lib/common/utils.d.ts.map +1 -1
  91. package/lib/common/utils.js +23 -3
  92. package/lib/detectors/Detector.d.ts +5 -0
  93. package/lib/detectors/Detector.d.ts.map +1 -0
  94. package/lib/detectors/Detector.js +3 -0
  95. package/lib/detectors/Detectors.d.ts +11 -0
  96. package/lib/detectors/Detectors.d.ts.map +1 -0
  97. package/lib/detectors/Detectors.js +34 -0
  98. package/lib/index.d.ts +25 -25
  99. package/lib/index.d.ts.map +1 -1
  100. package/lib/index.js +43 -41
  101. package/lib/monitors/TurnUsageMonitor.d.ts +0 -52
  102. package/lib/monitors/TurnUsageMonitor.d.ts.map +1 -1
  103. package/lib/monitors/TurnUsageMonitor.js +145 -120
  104. package/lib/schema/ClientEventTypes.d.ts +160 -0
  105. package/lib/schema/ClientEventTypes.d.ts.map +1 -0
  106. package/lib/schema/ClientEventTypes.js +38 -0
  107. package/lib/schema/ClientMetaTypes.d.ts +34 -0
  108. package/lib/schema/ClientMetaTypes.d.ts.map +1 -0
  109. package/lib/schema/ClientMetaTypes.js +16 -0
  110. package/lib/schema/ClientSample.d.ts +1333 -0
  111. package/lib/schema/ClientSample.d.ts.map +1 -0
  112. package/lib/schema/ClientSample.js +4 -0
  113. package/lib/scores/CalculatedScore.d.ts +6 -0
  114. package/lib/scores/CalculatedScore.d.ts.map +1 -0
  115. package/lib/scores/CalculatedScore.js +2 -0
  116. package/lib/scores/DefaultCallScoreCalculator.d.ts +7 -0
  117. package/lib/scores/DefaultCallScoreCalculator.d.ts.map +1 -0
  118. package/lib/scores/DefaultCallScoreCalculator.js +21 -0
  119. package/lib/scores/ScoreCalculator.d.ts +4 -0
  120. package/lib/scores/ScoreCalculator.d.ts.map +1 -0
  121. package/lib/scores/ScoreCalculator.js +2 -0
  122. package/lib/updaters/CallUpdater.d.ts +5 -0
  123. package/lib/updaters/CallUpdater.d.ts.map +1 -0
  124. package/lib/updaters/CallUpdater.js +2 -0
  125. package/lib/updaters/ObserverUpdater.d.ts +5 -0
  126. package/lib/updaters/ObserverUpdater.d.ts.map +1 -0
  127. package/lib/updaters/ObserverUpdater.js +2 -0
  128. package/lib/updaters/OnAllCallObserverUpdater_.d.ts +13 -0
  129. package/lib/updaters/OnAllCallObserverUpdater_.d.ts.map +1 -0
  130. package/lib/updaters/OnAllCallObserverUpdater_.js +38 -0
  131. package/lib/updaters/OnAllClientCallUpdater.d.ts +13 -0
  132. package/lib/updaters/OnAllClientCallUpdater.d.ts.map +1 -0
  133. package/lib/updaters/OnAllClientCallUpdater.js +37 -0
  134. package/lib/updaters/OnAnyCallObserverUpdater_.d.ts +11 -0
  135. package/lib/updaters/OnAnyCallObserverUpdater_.d.ts.map +1 -0
  136. package/lib/updaters/OnAnyCallObserverUpdater_.js +27 -0
  137. package/lib/updaters/OnAnyClientCallUpdater.d.ts +11 -0
  138. package/lib/updaters/OnAnyClientCallUpdater.d.ts.map +1 -0
  139. package/lib/updaters/OnAnyClientCallUpdater.js +27 -0
  140. package/lib/updaters/OnIntervalUpdater.d.ts +10 -0
  141. package/lib/updaters/OnIntervalUpdater.d.ts.map +1 -0
  142. package/lib/updaters/OnIntervalUpdater.js +17 -0
  143. package/lib/updaters/Updater.d.ts +6 -0
  144. package/lib/updaters/Updater.d.ts.map +1 -0
  145. package/lib/updaters/Updater.js +2 -0
  146. package/lib/utils/RemoteTrackResolver.d.ts +7 -0
  147. package/lib/utils/RemoteTrackResolver.d.ts.map +1 -0
  148. package/lib/utils/RemoteTrackResolver.js +2 -0
  149. package/package.json +4 -4
  150. package/src/ObservedCall.ts +262 -166
  151. package/src/ObservedCallSummary.ts +22 -0
  152. package/src/ObservedCertificate.ts +43 -0
  153. package/src/ObservedClient.ts +519 -1020
  154. package/src/ObservedClientEventMonitor.ts +301 -0
  155. package/src/ObservedClientSummary.ts +24 -0
  156. package/src/ObservedCodec.ts +49 -0
  157. package/src/ObservedDataChannel.ts +71 -181
  158. package/src/ObservedIceCandidate.ts +64 -0
  159. package/src/ObservedIceCandidatePair.ts +118 -0
  160. package/src/ObservedIceTransport.ts +99 -0
  161. package/src/ObservedInboundRtp.ts +205 -0
  162. package/src/ObservedInboundTrack.ts +73 -0
  163. package/src/ObservedMediaPlayout.ts +49 -0
  164. package/src/ObservedMediaSource.ts +60 -0
  165. package/src/ObservedOutboundRtp.ts +156 -0
  166. package/src/ObservedOutboundTrack.ts +72 -0
  167. package/src/ObservedPeerConnection.ts +854 -408
  168. package/src/ObservedPeerConnectionTransport.ts +38 -0
  169. package/src/ObservedRemoteInboundRtp.ts +64 -0
  170. package/src/ObservedRemoteOutboundRtp.ts +65 -0
  171. package/src/ObservedTURN.ts +86 -0
  172. package/src/ObservedTurnServer.ts +72 -0
  173. package/src/Observer.ts +176 -295
  174. package/src/ObserverEventMonitor.ts +385 -0
  175. package/src/ObserverSummary.ts +15 -0
  176. package/src/common/Middleware.ts +70 -42
  177. package/src/common/logger.ts +60 -69
  178. package/src/common/types.ts +0 -42
  179. package/src/common/utils.ts +24 -2
  180. package/src/detectors/Detector.ts +6 -0
  181. package/src/detectors/Detectors.ts +38 -0
  182. package/src/index.ts +25 -90
  183. package/src/monitors/TurnUsageMonitor.ts +164 -164
  184. package/src/schema/ClientEventTypes.ts +176 -0
  185. package/src/schema/ClientMetaTypes.ts +41 -0
  186. package/src/schema/ClientSample.ts +1682 -0
  187. package/src/scores/CalculatedScore.ts +6 -0
  188. package/src/scores/DefaultCallScoreCalculator.ts +23 -0
  189. package/src/scores/ScoreCalculator.ts +3 -0
  190. package/src/updaters/CallUpdater.ts +5 -0
  191. package/src/updaters/ObserverUpdater.ts +5 -0
  192. package/src/updaters/OnAllCallObserverUpdater_.ts +46 -0
  193. package/src/updaters/OnAllClientCallUpdater.ts +46 -0
  194. package/src/updaters/OnAnyCallObserverUpdater_.ts +32 -0
  195. package/src/updaters/OnAnyClientCallUpdater.ts +32 -0
  196. package/src/updaters/OnIntervalUpdater.ts +19 -0
  197. package/src/updaters/Updater.ts +5 -0
  198. package/src/utils/RemoteTrackResolver.ts +12 -0
  199. package/tsconfig.json +3 -3
  200. package/lib/ObservedICE.d.ts +0 -64
  201. package/lib/ObservedICE.d.ts.map +0 -1
  202. package/lib/ObservedICE.js +0 -141
  203. package/lib/ObservedInboundAudioTrack.d.ts +0 -96
  204. package/lib/ObservedInboundAudioTrack.d.ts.map +0 -1
  205. package/lib/ObservedInboundAudioTrack.js +0 -217
  206. package/lib/ObservedInboundVideoTrack.d.ts +0 -101
  207. package/lib/ObservedInboundVideoTrack.d.ts.map +0 -1
  208. package/lib/ObservedInboundVideoTrack.js +0 -232
  209. package/lib/ObservedOutboundAudioTrack.d.ts +0 -87
  210. package/lib/ObservedOutboundAudioTrack.d.ts.map +0 -1
  211. package/lib/ObservedOutboundAudioTrack.js +0 -186
  212. package/lib/ObservedOutboundVideoTrack.d.ts +0 -91
  213. package/lib/ObservedOutboundVideoTrack.d.ts.map +0 -1
  214. package/lib/ObservedOutboundVideoTrack.js +0 -193
  215. package/lib/ObservedSfu.d.ts +0 -59
  216. package/lib/ObservedSfu.d.ts.map +0 -1
  217. package/lib/ObservedSfu.js +0 -157
  218. package/lib/ObservedSfuInboundRtpPad.d.ts +0 -42
  219. package/lib/ObservedSfuInboundRtpPad.d.ts.map +0 -1
  220. package/lib/ObservedSfuInboundRtpPad.js +0 -71
  221. package/lib/ObservedSfuOutboundRtpPad.d.ts +0 -42
  222. package/lib/ObservedSfuOutboundRtpPad.d.ts.map +0 -1
  223. package/lib/ObservedSfuOutboundRtpPad.js +0 -72
  224. package/lib/ObservedSfuSctpChannel.d.ts +0 -42
  225. package/lib/ObservedSfuSctpChannel.d.ts.map +0 -1
  226. package/lib/ObservedSfuSctpChannel.js +0 -57
  227. package/lib/ObservedSfuTransport.d.ts +0 -58
  228. package/lib/ObservedSfuTransport.d.ts.map +0 -1
  229. package/lib/ObservedSfuTransport.js +0 -120
  230. package/lib/RemoteTrackAssigner.d.ts +0 -14
  231. package/lib/RemoteTrackAssigner.d.ts.map +0 -1
  232. package/lib/RemoteTrackAssigner.js +0 -52
  233. package/lib/ReportsCollector.d.ts +0 -109
  234. package/lib/ReportsCollector.d.ts.map +0 -1
  235. package/lib/ReportsCollector.js +0 -207
  236. package/lib/common/CalculatedScore.d.ts +0 -80
  237. package/lib/common/CalculatedScore.d.ts.map +0 -1
  238. package/lib/common/CalculatedScore.js +0 -162
  239. package/lib/common/CallEventType.d.ts +0 -63
  240. package/lib/common/CallEventType.d.ts.map +0 -1
  241. package/lib/common/CallEventType.js +0 -39
  242. package/lib/common/CallMetaReports.d.ts +0 -42
  243. package/lib/common/CallMetaReports.d.ts.map +0 -1
  244. package/lib/common/CallMetaReports.js +0 -36
  245. package/lib/common/QualityScoreUtils.d.ts +0 -1
  246. package/lib/common/QualityScoreUtils.d.ts.map +0 -1
  247. package/lib/common/QualityScoreUtils.js +0 -1
  248. package/lib/common/TypedEventEmitter.d.ts +0 -22
  249. package/lib/common/TypedEventEmitter.d.ts.map +0 -1
  250. package/lib/common/TypedEventEmitter.js +0 -11
  251. package/lib/common/callEventReports.d.ts +0 -10
  252. package/lib/common/callEventReports.d.ts.map +0 -1
  253. package/lib/common/callEventReports.js +0 -112
  254. package/lib/monitors/CallSummary.d.ts +0 -37
  255. package/lib/monitors/CallSummary.d.ts.map +0 -1
  256. package/lib/monitors/CallSummaryMonitor.d.ts +0 -32
  257. package/lib/monitors/CallSummaryMonitor.d.ts.map +0 -1
  258. package/lib/monitors/CallSummaryMonitor.js +0 -152
  259. package/lib/monitors/ClientIssueMonitor.d.ts +0 -32
  260. package/lib/monitors/ClientIssueMonitor.d.ts.map +0 -1
  261. package/lib/monitors/ClientIssueMonitor.js +0 -49
  262. package/lib/monitors/SfuServerMonitor.d.ts +0 -79
  263. package/lib/monitors/SfuServerMonitor.d.ts.map +0 -1
  264. package/lib/monitors/SfuServerMonitor.js +0 -198
  265. package/src/ObservedICE.ts +0 -237
  266. package/src/ObservedInboundAudioTrack.ts +0 -344
  267. package/src/ObservedInboundVideoTrack.ts +0 -361
  268. package/src/ObservedOutboundAudioTrack.ts +0 -307
  269. package/src/ObservedOutboundVideoTrack.ts +0 -319
  270. package/src/ObservedSfu.ts +0 -231
  271. package/src/ObservedSfuInboundRtpPad.ts +0 -106
  272. package/src/ObservedSfuOutboundRtpPad.ts +0 -107
  273. package/src/ObservedSfuSctpChannel.ts +0 -103
  274. package/src/ObservedSfuTransport.ts +0 -185
  275. package/src/RemoteTrackAssigner.ts +0 -68
  276. package/src/ReportsCollector.ts +0 -336
  277. package/src/common/CalculatedScore.ts +0 -188
  278. package/src/common/CallEventType.ts +0 -69
  279. package/src/common/CallMetaReports.ts +0 -82
  280. package/src/common/QualityScoreUtils.ts +0 -0
  281. package/src/common/TypedEventEmitter.ts +0 -32
  282. package/src/common/callEventReports.ts +0 -178
  283. package/src/monitors/CallSummary.ts +0 -38
  284. package/src/monitors/CallSummaryMonitor.ts +0 -192
  285. package/src/monitors/ClientIssueMonitor.ts +0 -88
  286. package/src/monitors/SfuServerMonitor.ts +0 -285
  287. /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");
25
13
  const logger = (0, logger_1.createLogger)('Observer');
26
14
  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);
15
+ config;
16
+ detectors;
17
+ observedTURN = new ObservedTURN_1.ObservedTURN();
18
+ observedCalls = new Map();
19
+ updater;
20
+ closed = false;
21
+ totalAddedCall = 0;
22
+ totalRemovedCall = 0;
23
+ totalRttLt50Measurements = 0;
24
+ totalRttLt150Measurements = 0;
25
+ totalRttLt300Measurements = 0;
26
+ totalRttGtOrEq300Measurements = 0;
27
+ totalClientIssues = 0;
28
+ numberOfClientsUsingTurn = 0;
29
+ numberOfClients = 0;
30
+ numberOfInboundRtpStreams = 0;
31
+ numberOfOutboundRtpStreams = 0;
32
+ numberOfDataChannels = 0;
33
+ numberOfPeerConnections = 0;
34
+ get numberOfCalls() {
35
+ return this.observedCalls.size;
39
36
  }
40
- constructor(config) {
37
+ _timer;
38
+ constructor(config = {
39
+ updatePolicy: 'update-when-all-call-updated',
40
+ updateIntervalInMs: undefined,
41
+ }) {
41
42
  super();
42
43
  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
44
  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();
45
+ this.update = this.update.bind(this);
46
+ if (this.config.updateIntervalInMs) {
47
+ if (this.config.updatePolicy && this.config.updatePolicy !== 'update-on-interval') {
48
+ throw new Error('update policy must be update-on-interval if updateIntervalInMs is set in config');
56
49
  }
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');
50
+ this._timer = setInterval(this.update.bind(this), this.config.updateIntervalInMs);
69
51
  }
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;
85
- }
86
- createObservedSfu(model, appData) {
87
- if (this._closed) {
88
- throw new Error('Attempted to create an sfu source on a closed observer');
52
+ if (this.config.updateIntervalInMs) {
53
+ if (this.config.updatePolicy !== 'update-on-interval') {
54
+ throw new Error('updatePolicy must be update-on-interval if updateIntervalInMs is set in config');
55
+ }
89
56
  }
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;
101
- }
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;
57
+ switch (this.config.updatePolicy) {
58
+ case 'update-on-any-call-updated':
59
+ this.updater = new OnAllCallObserverUpdater_1.OnAllCallObserverUpdater(this);
60
+ break;
61
+ case 'update-when-all-call-updated':
62
+ this.updater = new OnAnyCallObserverUpdater_1.OnAnyCallObserverUpdater(this);
63
+ break;
64
+ case 'update-on-interval':
65
+ if (!this.config.updateIntervalInMs) {
66
+ throw new Error('updateIntervalInMs setting in config must be set if updatePolicy is update-on-interval');
67
+ }
68
+ this.updater = new OnIntervalUpdater_1.OnIntervalUpdater(this.config.updateIntervalInMs, this.update.bind(this));
69
+ break;
70
+ }
71
+ this.detectors = new Detectors_1.Detectors();
129
72
  }
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;
73
+ getObservedCall(callId) {
74
+ if (this.closed || !this.observedCalls.has(callId))
75
+ return;
76
+ return this.observedCalls.get(callId);
168
77
  }
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;
204
- }
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();
78
+ createObservedCall(settings) {
79
+ if (this.closed) {
80
+ throw new Error('Attempted to create a call source on a closed observer');
81
+ }
82
+ if (!settings.updatePolicy) {
83
+ settings.updatePolicy = this.config.defaultCallUpdatePolicy;
84
+ settings.updateIntervalInMs = this.config.defaultCallUpdateIntervalInMs;
85
+ }
86
+ const observedCall = new ObservedCall_1.ObservedCall(settings, this);
87
+ const onCallUpdated = () => this._onObservedCallUpdated(observedCall);
88
+ if (this.observedCalls.has(observedCall.callId))
89
+ throw new Error(`Observed Call with id ${observedCall.callId} already exists`);
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,104 @@
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 { ClientIssue, ClientMetaData, 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
+ onPeerConnectionAdded?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
38
+ onPeerConnectionRemoved?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
39
+ onSelectedCandidatePairChanged?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
40
+ onIceGatheringStateChange?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
41
+ onIceConnectionStateChange?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
42
+ onConnectionStateChange?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
43
+ onCertificateAdded?: (certificate: ObservedCertificate, ctx: Context) => void;
44
+ onCertificateRemoved?: (certificate: ObservedCertificate, ctx: Context) => void;
45
+ onInboundTrackAdded?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
46
+ onInboundTrackRemoved?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
47
+ onOutboundTrackAdded?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
48
+ onOutboundTrackRemoved?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
49
+ onInboundRtpAdded?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
50
+ onInboundRtpRemoved?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
51
+ onOutboundRtpAdded?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
52
+ onOutboundRtpRemoved?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
53
+ onDataChannelAdded?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
54
+ onDataChannelRemoved?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
55
+ onAddedIceTransport?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
56
+ onRemovedIceTransport?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
57
+ onIceCandidateAdded?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
58
+ onIceCandidateRemoved?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
59
+ onAddedIceCandidatePair?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
60
+ onRemovedIceCandidatePair?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
61
+ onAddedMediaCodec?: (codec: ObservedCodec, ctx: Context) => void;
62
+ onRemovedMediaCodec?: (codec: ObservedCodec, ctx: Context) => void;
63
+ onAddedMediaPlayout?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
64
+ onRemovedMediaPlayout?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
65
+ onMediaSourceAdded?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
66
+ onMediaSourceRemoved?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
67
+ private _onCallAdded;
68
+ private _onClientAdded;
69
+ private _onClientRejoined;
70
+ private _onPeerConnconnectionAdded;
71
+ private _onPeerConnectionRemoved;
72
+ private _onCertificateAdded;
73
+ private _onCertificateRemoved;
74
+ private _onInboundTrackAdded;
75
+ private _onInboundTrackRemoved;
76
+ private _onOutboundTrackAdded;
77
+ private _onOutboundTrackRemoved;
78
+ private _onInboundRtpAdded;
79
+ private _onInboundRtpRemoved;
80
+ private _onOutboundRtpAdded;
81
+ private _onOutboundRtpRemoved;
82
+ private _onDataChannelAdded;
83
+ private _onDataChannelRemoved;
84
+ private _onAddedIceTransport;
85
+ private _onRemovedIceTransport;
86
+ private _onIceCandidateAdded;
87
+ private _onIceCandidateRemoved;
88
+ private _onAddedIceCandidatePair;
89
+ private _onRemovedIceCandidatePair;
90
+ private _onAddedMediaCodec;
91
+ private _onRemovedMediaCodec;
92
+ private _onAddedMediaPlayout;
93
+ private _onRemovedMediaPlayout;
94
+ private _onMediaSourceAdded;
95
+ private _onMediaSourceRemoved;
96
+ private _onClientIssue;
97
+ private _onClientMetadata;
98
+ private _onClientExtensionStats;
99
+ private _onClientJoined;
100
+ private _onClientLeft;
101
+ private _onUserMediaError;
102
+ private _onUsingTurn;
103
+ }
104
+ //# sourceMappingURL=ObserverEventMonitor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObserverEventMonitor.d.ts","sourceRoot":"","sources":["../src/ObserverEventMonitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MA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