@observertc/observer-js 0.42.8 → 1.0.0-5f150eb.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 (303) hide show
  1. package/.prettierrc +6 -6
  2. package/README.md +493 -63
  3. package/lib/ObservedCall.d.ts +48 -43
  4. package/lib/ObservedCall.d.ts.map +1 -1
  5. package/lib/ObservedCall.js +164 -107
  6. package/lib/ObservedCallEventMonitor.d.ts +107 -0
  7. package/lib/ObservedCallEventMonitor.d.ts.map +1 -0
  8. package/lib/ObservedCallEventMonitor.js +321 -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 +78 -145
  15. package/lib/ObservedClient.d.ts.map +1 -1
  16. package/lib/ObservedClient.js +661 -746
  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 +34 -0
  42. package/lib/ObservedInboundTrack.d.ts.map +1 -0
  43. package/lib/ObservedInboundTrack.js +92 -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 +34 -0
  54. package/lib/ObservedOutboundTrack.d.ts.map +1 -0
  55. package/lib/ObservedOutboundTrack.js +65 -0
  56. package/lib/ObservedPeerConnection.d.ts +154 -80
  57. package/lib/ObservedPeerConnection.d.ts.map +1 -1
  58. package/lib/ObservedPeerConnection.js +724 -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 +46 -54
  75. package/lib/Observer.d.ts.map +1 -1
  76. package/lib/Observer.js +131 -226
  77. package/lib/ObserverEventMonitor.d.ts +141 -0
  78. package/lib/ObserverEventMonitor.d.ts.map +1 -0
  79. package/lib/ObserverEventMonitor.js +440 -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/Reports.d.ts +85 -0
  84. package/lib/Reports.d.ts.map +1 -0
  85. package/lib/Reports.js +2 -0
  86. package/lib/common/Middleware.d.ts +10 -1
  87. package/lib/common/Middleware.d.ts.map +1 -1
  88. package/lib/common/Middleware.js +55 -36
  89. package/lib/common/logger.d.ts +8 -4
  90. package/lib/common/logger.d.ts.map +1 -1
  91. package/lib/common/logger.js +44 -68
  92. package/lib/common/types.d.ts +0 -21
  93. package/lib/common/types.d.ts.map +1 -1
  94. package/lib/common/types.js +1 -0
  95. package/lib/common/utils.d.ts +3 -1
  96. package/lib/common/utils.d.ts.map +1 -1
  97. package/lib/common/utils.js +23 -3
  98. package/lib/detectors/Detector.d.ts +5 -0
  99. package/lib/detectors/Detector.d.ts.map +1 -0
  100. package/lib/detectors/Detector.js +3 -0
  101. package/lib/detectors/Detectors.d.ts +11 -0
  102. package/lib/detectors/Detectors.d.ts.map +1 -0
  103. package/lib/detectors/Detectors.js +34 -0
  104. package/lib/index.d.ts +27 -24
  105. package/lib/index.d.ts.map +1 -1
  106. package/lib/index.js +45 -41
  107. package/lib/mediasoup/ObservedMediaRouter.d.ts +10 -0
  108. package/lib/mediasoup/ObservedMediaRouter.d.ts.map +1 -0
  109. package/lib/mediasoup/ObservedMediaRouter.js +6 -0
  110. package/lib/monitors/TurnUsageMonitor.d.ts +0 -52
  111. package/lib/monitors/TurnUsageMonitor.d.ts.map +1 -1
  112. package/lib/monitors/TurnUsageMonitor.js +145 -120
  113. package/lib/schema/ClientEventTypes.d.ts +228 -0
  114. package/lib/schema/ClientEventTypes.d.ts.map +1 -0
  115. package/lib/schema/ClientEventTypes.js +41 -0
  116. package/lib/schema/ClientMetaTypes.d.ts +34 -0
  117. package/lib/schema/ClientMetaTypes.d.ts.map +1 -0
  118. package/lib/schema/ClientMetaTypes.js +16 -0
  119. package/lib/schema/ClientSample.d.ts +1333 -0
  120. package/lib/schema/ClientSample.d.ts.map +1 -0
  121. package/lib/schema/ClientSample.js +4 -0
  122. package/lib/scores/CalculatedScore.d.ts +6 -0
  123. package/lib/scores/CalculatedScore.d.ts.map +1 -0
  124. package/lib/scores/CalculatedScore.js +2 -0
  125. package/lib/scores/DefaultCallScoreCalculator.d.ts +7 -0
  126. package/lib/scores/DefaultCallScoreCalculator.d.ts.map +1 -0
  127. package/lib/scores/DefaultCallScoreCalculator.js +21 -0
  128. package/lib/scores/ScoreCalculator.d.ts +4 -0
  129. package/lib/scores/ScoreCalculator.d.ts.map +1 -0
  130. package/lib/scores/ScoreCalculator.js +2 -0
  131. package/lib/updaters/CallUpdater.d.ts +5 -0
  132. package/lib/updaters/CallUpdater.d.ts.map +1 -0
  133. package/lib/updaters/CallUpdater.js +2 -0
  134. package/lib/updaters/ObserverUpdater.d.ts +5 -0
  135. package/lib/updaters/ObserverUpdater.d.ts.map +1 -0
  136. package/lib/updaters/ObserverUpdater.js +2 -0
  137. package/lib/updaters/OnAllCallObserverUpdater.d.ts +15 -0
  138. package/lib/updaters/OnAllCallObserverUpdater.d.ts.map +1 -0
  139. package/lib/updaters/OnAllCallObserverUpdater.js +50 -0
  140. package/lib/updaters/OnAllClientCallUpdater.d.ts +15 -0
  141. package/lib/updaters/OnAllClientCallUpdater.d.ts.map +1 -0
  142. package/lib/updaters/OnAllClientCallUpdater.js +53 -0
  143. package/lib/updaters/OnAnyCallObserverUpdater.d.ts +12 -0
  144. package/lib/updaters/OnAnyCallObserverUpdater.d.ts.map +1 -0
  145. package/lib/updaters/OnAnyCallObserverUpdater.js +37 -0
  146. package/lib/updaters/OnAnyClientCallUpdater.d.ts +12 -0
  147. package/lib/updaters/OnAnyClientCallUpdater.d.ts.map +1 -0
  148. package/lib/updaters/OnAnyClientCallUpdater.js +36 -0
  149. package/lib/updaters/OnIntervalUpdater.d.ts +10 -0
  150. package/lib/updaters/OnIntervalUpdater.d.ts.map +1 -0
  151. package/lib/updaters/OnIntervalUpdater.js +17 -0
  152. package/lib/updaters/Updater.d.ts +6 -0
  153. package/lib/updaters/Updater.d.ts.map +1 -0
  154. package/lib/updaters/Updater.js +2 -0
  155. package/lib/utils/MediasoupRemoteTrackResolver.d.ts +25 -0
  156. package/lib/utils/MediasoupRemoteTrackResolver.d.ts.map +1 -0
  157. package/lib/utils/MediasoupRemoteTrackResolver.js +110 -0
  158. package/lib/utils/RemoteTrackResolver.d.ts +7 -0
  159. package/lib/utils/RemoteTrackResolver.d.ts.map +1 -0
  160. package/lib/utils/RemoteTrackResolver.js +2 -0
  161. package/package.json +4 -4
  162. package/src/ObservedCall.ts +243 -161
  163. package/src/ObservedCallEventMonitor.ts +402 -0
  164. package/src/ObservedCallSummary.ts +22 -0
  165. package/src/ObservedCertificate.ts +43 -0
  166. package/src/ObservedClient.ts +716 -1002
  167. package/src/ObservedClientEventMonitor.ts +309 -0
  168. package/src/ObservedClientSummary.ts +24 -0
  169. package/src/ObservedCodec.ts +49 -0
  170. package/src/ObservedDataChannel.ts +71 -181
  171. package/src/ObservedIceCandidate.ts +64 -0
  172. package/src/ObservedIceCandidatePair.ts +134 -0
  173. package/src/ObservedIceTransport.ts +99 -0
  174. package/src/ObservedInboundRtp.ts +205 -0
  175. package/src/ObservedInboundTrack.ts +105 -0
  176. package/src/ObservedMediaPlayout.ts +49 -0
  177. package/src/ObservedMediaSource.ts +60 -0
  178. package/src/ObservedOutboundRtp.ts +156 -0
  179. package/src/ObservedOutboundTrack.ts +82 -0
  180. package/src/ObservedPeerConnection.ts +933 -402
  181. package/src/ObservedPeerConnectionTransport.ts +38 -0
  182. package/src/ObservedRemoteInboundRtp.ts +64 -0
  183. package/src/ObservedRemoteOutboundRtp.ts +65 -0
  184. package/src/ObservedTURN.ts +86 -0
  185. package/src/ObservedTurnServer.ts +72 -0
  186. package/src/Observer.ts +183 -298
  187. package/src/ObserverEventMonitor.ts +561 -0
  188. package/src/ObserverSummary.ts +15 -0
  189. package/src/Reports.ts +87 -0
  190. package/src/common/Middleware.ts +70 -42
  191. package/src/common/logger.ts +60 -69
  192. package/src/common/types.ts +0 -42
  193. package/src/common/utils.ts +24 -2
  194. package/src/detectors/Detector.ts +6 -0
  195. package/src/detectors/Detectors.ts +38 -0
  196. package/src/index.ts +30 -88
  197. package/src/mediasoup/ObservedMediaRouter.ts +10 -0
  198. package/src/monitors/TurnUsageMonitor.ts +164 -164
  199. package/src/schema/ClientEventTypes.ts +280 -0
  200. package/src/schema/ClientMetaTypes.ts +41 -0
  201. package/src/schema/ClientSample.ts +1682 -0
  202. package/src/scores/CalculatedScore.ts +6 -0
  203. package/src/scores/DefaultCallScoreCalculator.ts +23 -0
  204. package/src/scores/ScoreCalculator.ts +3 -0
  205. package/src/updaters/CallUpdater.ts +5 -0
  206. package/src/updaters/ObserverUpdater.ts +5 -0
  207. package/src/updaters/OnAllCallObserverUpdater.ts +59 -0
  208. package/src/updaters/OnAllClientCallUpdater.ts +61 -0
  209. package/src/updaters/OnAnyCallObserverUpdater.ts +41 -0
  210. package/src/updaters/OnAnyClientCallUpdater.ts +39 -0
  211. package/src/updaters/OnIntervalUpdater.ts +19 -0
  212. package/src/updaters/Updater.ts +5 -0
  213. package/src/utils/MediasoupRemoteTrackResolver.ts +155 -0
  214. package/src/utils/RemoteTrackResolver.ts +12 -0
  215. package/tsconfig.json +3 -3
  216. package/lib/ObservedICE.d.ts +0 -64
  217. package/lib/ObservedICE.d.ts.map +0 -1
  218. package/lib/ObservedICE.js +0 -141
  219. package/lib/ObservedInboundAudioTrack.d.ts +0 -96
  220. package/lib/ObservedInboundAudioTrack.d.ts.map +0 -1
  221. package/lib/ObservedInboundAudioTrack.js +0 -217
  222. package/lib/ObservedInboundVideoTrack.d.ts +0 -101
  223. package/lib/ObservedInboundVideoTrack.d.ts.map +0 -1
  224. package/lib/ObservedInboundVideoTrack.js +0 -232
  225. package/lib/ObservedOutboundAudioTrack.d.ts +0 -87
  226. package/lib/ObservedOutboundAudioTrack.d.ts.map +0 -1
  227. package/lib/ObservedOutboundAudioTrack.js +0 -186
  228. package/lib/ObservedOutboundVideoTrack.d.ts +0 -91
  229. package/lib/ObservedOutboundVideoTrack.d.ts.map +0 -1
  230. package/lib/ObservedOutboundVideoTrack.js +0 -193
  231. package/lib/ObservedSfu.d.ts +0 -59
  232. package/lib/ObservedSfu.d.ts.map +0 -1
  233. package/lib/ObservedSfu.js +0 -157
  234. package/lib/ObservedSfuInboundRtpPad.d.ts +0 -42
  235. package/lib/ObservedSfuInboundRtpPad.d.ts.map +0 -1
  236. package/lib/ObservedSfuInboundRtpPad.js +0 -71
  237. package/lib/ObservedSfuOutboundRtpPad.d.ts +0 -42
  238. package/lib/ObservedSfuOutboundRtpPad.d.ts.map +0 -1
  239. package/lib/ObservedSfuOutboundRtpPad.js +0 -72
  240. package/lib/ObservedSfuSctpChannel.d.ts +0 -42
  241. package/lib/ObservedSfuSctpChannel.d.ts.map +0 -1
  242. package/lib/ObservedSfuSctpChannel.js +0 -57
  243. package/lib/ObservedSfuTransport.d.ts +0 -58
  244. package/lib/ObservedSfuTransport.d.ts.map +0 -1
  245. package/lib/ObservedSfuTransport.js +0 -120
  246. package/lib/RemoteTrackAssigner.d.ts +0 -14
  247. package/lib/RemoteTrackAssigner.d.ts.map +0 -1
  248. package/lib/RemoteTrackAssigner.js +0 -52
  249. package/lib/ReportsCollector.d.ts +0 -109
  250. package/lib/ReportsCollector.d.ts.map +0 -1
  251. package/lib/ReportsCollector.js +0 -207
  252. package/lib/common/CalculatedScore.d.ts +0 -80
  253. package/lib/common/CalculatedScore.d.ts.map +0 -1
  254. package/lib/common/CalculatedScore.js +0 -162
  255. package/lib/common/CallEventType.d.ts +0 -63
  256. package/lib/common/CallEventType.d.ts.map +0 -1
  257. package/lib/common/CallEventType.js +0 -39
  258. package/lib/common/CallMetaReports.d.ts +0 -42
  259. package/lib/common/CallMetaReports.d.ts.map +0 -1
  260. package/lib/common/CallMetaReports.js +0 -36
  261. package/lib/common/QualityScoreUtils.d.ts +0 -1
  262. package/lib/common/QualityScoreUtils.d.ts.map +0 -1
  263. package/lib/common/QualityScoreUtils.js +0 -1
  264. package/lib/common/TypedEventEmitter.d.ts +0 -22
  265. package/lib/common/TypedEventEmitter.d.ts.map +0 -1
  266. package/lib/common/TypedEventEmitter.js +0 -11
  267. package/lib/common/callEventReports.d.ts +0 -10
  268. package/lib/common/callEventReports.d.ts.map +0 -1
  269. package/lib/common/callEventReports.js +0 -112
  270. package/lib/monitors/CallSummary.d.ts +0 -37
  271. package/lib/monitors/CallSummary.d.ts.map +0 -1
  272. package/lib/monitors/CallSummaryMonitor.d.ts +0 -32
  273. package/lib/monitors/CallSummaryMonitor.d.ts.map +0 -1
  274. package/lib/monitors/CallSummaryMonitor.js +0 -152
  275. package/lib/monitors/ClientIssueMonitor.d.ts +0 -32
  276. package/lib/monitors/ClientIssueMonitor.d.ts.map +0 -1
  277. package/lib/monitors/ClientIssueMonitor.js +0 -49
  278. package/lib/monitors/SfuServerMonitor.d.ts +0 -79
  279. package/lib/monitors/SfuServerMonitor.d.ts.map +0 -1
  280. package/lib/monitors/SfuServerMonitor.js +0 -198
  281. package/src/ObservedICE.ts +0 -237
  282. package/src/ObservedInboundAudioTrack.ts +0 -344
  283. package/src/ObservedInboundVideoTrack.ts +0 -361
  284. package/src/ObservedOutboundAudioTrack.ts +0 -307
  285. package/src/ObservedOutboundVideoTrack.ts +0 -319
  286. package/src/ObservedSfu.ts +0 -231
  287. package/src/ObservedSfuInboundRtpPad.ts +0 -106
  288. package/src/ObservedSfuOutboundRtpPad.ts +0 -107
  289. package/src/ObservedSfuSctpChannel.ts +0 -103
  290. package/src/ObservedSfuTransport.ts +0 -185
  291. package/src/RemoteTrackAssigner.ts +0 -68
  292. package/src/ReportsCollector.ts +0 -336
  293. package/src/common/CalculatedScore.ts +0 -188
  294. package/src/common/CallEventType.ts +0 -69
  295. package/src/common/CallMetaReports.ts +0 -82
  296. package/src/common/QualityScoreUtils.ts +0 -0
  297. package/src/common/TypedEventEmitter.ts +0 -32
  298. package/src/common/callEventReports.ts +0 -178
  299. package/src/monitors/CallSummary.ts +0 -38
  300. package/src/monitors/CallSummaryMonitor.ts +0 -192
  301. package/src/monitors/ClientIssueMonitor.ts +0 -88
  302. package/src/monitors/SfuServerMonitor.ts +0 -285
  303. /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
+ numberOfClientsUsingTurn = 0;
25
+ numberOfClients = 0;
26
+ numberOfInboundRtpStreams = 0;
27
+ numberOfOutboundRtpStreams = 0;
28
+ numberOfDataChannels = 0;
29
+ numberOfPeerConnections = 0;
30
+ get numberOfCalls() {
31
+ return this.observedCalls.size;
39
32
  }
40
- constructor(config) {
33
+ _timer;
34
+ constructor(config = {
35
+ updatePolicy: 'update-when-all-call-updated',
36
+ updateIntervalInMs: undefined,
37
+ appData: {},
38
+ }) {
41
39
  super();
42
40
  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
41
  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();
42
+ this.update = this.update.bind(this);
43
+ const currentUpdatePolicy = (config?.updatePolicy) ?? 'update-when-all-call-updated';
44
+ switch (currentUpdatePolicy) {
45
+ case 'update-on-any-call-updated':
46
+ this.updater = new OnAnyCallObserverUpdater_1.OnAnyCallObserverUpdater(this);
47
+ break;
48
+ case 'update-when-all-call-updated':
49
+ this.updater = new OnAllCallObserverUpdater_1.OnAllCallObserverUpdater(this);
50
+ break;
51
+ case 'update-on-interval': {
52
+ const interval = config?.updateIntervalInMs;
53
+ if (!interval) {
54
+ throw new Error('updateIntervalInMs setting in config must be set if updatePolicy is update-on-interval');
55
+ }
56
+ this.updater = new OnIntervalUpdater_1.OnIntervalUpdater(interval, this.update.bind(this));
57
+ break;
56
58
  }
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
59
  }
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;
60
+ this.detectors = new Detectors_1.Detectors();
85
61
  }
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;
62
+ get appData() {
63
+ return this.config.appData;
101
64
  }
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;
65
+ getObservedCall(callId) {
66
+ if (this.closed || !this.observedCalls.has(callId))
67
+ return;
68
+ return this.observedCalls.get(callId);
204
69
  }
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();
70
+ createObservedCall(settings) {
71
+ if (this.closed) {
72
+ throw new Error('Attempted to create a call source on a closed observer');
73
+ }
74
+ if (!settings.updatePolicy) {
75
+ settings.updatePolicy = this.config.defaultCallUpdatePolicy;
76
+ settings.updateIntervalInMs = this.config.defaultCallUpdateIntervalInMs;
77
+ }
78
+ if (!settings.closeCallIfEmptyForMs) {
79
+ settings.closeCallIfEmptyForMs = this.config.closeCallIfEmptyForMs;
80
+ }
81
+ const observedCall = new ObservedCall_1.ObservedCall(settings, this);
82
+ const onCallUpdated = () => this._onObservedCallUpdated(observedCall);
83
+ if (this.observedCalls.has(observedCall.callId))
84
+ throw new Error(`Observed Call with id ${observedCall.callId} already exists`);
85
+ if (settings.remoteTrackResolvePolicy === 'mediasoup-sfu') {
86
+ observedCall.remoteTrackResolver = new MediasoupRemoteTrackResolver_1.MediasoupRemoteTrackResolver(observedCall);
87
+ }
88
+ else if (settings.remoteTrackResolvePolicy === 'p2p') {
89
+ // For future implementation
90
+ }
91
+ else if (settings.remoteTrackResolvePolicy === 'none' || !settings.remoteTrackResolvePolicy) {
92
+ // do nothing
93
+ }
94
+ observedCall.once('close', () => {
95
+ this.observedCalls.delete(observedCall.callId);
96
+ observedCall.off('update', onCallUpdated);
97
+ ++this.totalRemovedCall;
221
98
  });
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;
99
+ this.observedCalls.set(observedCall.callId, observedCall);
100
+ observedCall.on('update', onCallUpdated);
101
+ ++this.totalAddedCall;
102
+ this.emit('newcall', observedCall);
103
+ return observedCall;
232
104
  }
233
105
  close() {
234
- if (this._closed) {
106
+ if (this.closed) {
235
107
  return logger.debug('Attempted to close twice');
236
108
  }
237
- this._closed = true;
238
- this._observedCalls.forEach((call) => call.close());
109
+ this.closed = true;
110
+ clearInterval(this._timer);
111
+ this._timer = undefined;
112
+ this.observedCalls.forEach((call) => call.close());
239
113
  this.emit('close');
240
114
  }
241
- _emitReports() {
242
- if (this._reportTimer) {
243
- clearTimeout(this._reportTimer);
244
- this._reportTimer = undefined;
115
+ accept(sample) {
116
+ if (this.closed)
117
+ return;
118
+ if (!sample.callId)
119
+ return logger.warn('Received sample without callId. %o', sample);
120
+ if (!sample.clientId)
121
+ return logger.warn('Received sample without clientId %o', sample);
122
+ const call = this.getObservedCall(sample.callId) ?? this.createObservedCall({
123
+ callId: sample.callId,
124
+ updateIntervalInMs: this.config.defaultCallUpdateIntervalInMs,
125
+ updatePolicy: this.config.defaultCallUpdatePolicy,
126
+ });
127
+ const client = call.getObservedClient(sample.clientId) ?? call.createObservedClient({
128
+ clientId: sample.clientId,
129
+ });
130
+ client.accept(sample);
131
+ }
132
+ update() {
133
+ if (this.closed) {
134
+ return;
245
135
  }
246
- this.reports.emit();
247
- if (this.config.maxCollectingTimeInMs) {
248
- this._reportTimer = setTimeout(() => {
249
- this._reportTimer = undefined;
250
- this._emitReports();
251
- }, this.config.maxCollectingTimeInMs);
136
+ this.numberOfInboundRtpStreams = 0;
137
+ this.numberOfOutboundRtpStreams = 0;
138
+ this.numberOfPeerConnections = 0;
139
+ this.numberOfDataChannels = 0;
140
+ this.numberOfClients = 0;
141
+ this.numberOfClientsUsingTurn = 0;
142
+ for (const call of this.observedCalls.values()) {
143
+ this.numberOfInboundRtpStreams += call.numberOfInboundRtpStreams;
144
+ this.numberOfOutboundRtpStreams += call.numberOfOutboundRtpStreams;
145
+ this.numberOfPeerConnections += call.numberOfPeerConnections;
146
+ this.numberOfDataChannels += call.numberOfDataChannels;
147
+ this.numberOfClients += call.numberOfClients;
148
+ this.numberOfClientsUsingTurn += call.clientsUsedTurn.size;
252
149
  }
150
+ this.observedTURN.update();
151
+ this.emit('update');
152
+ }
153
+ _onObservedCallUpdated(call) {
154
+ call;
155
+ }
156
+ createEventMonitor(ctx) {
157
+ return new ObserverEventMonitor_1.ObserverEventMonitor(this, ctx ?? {});
253
158
  }
254
159
  }
255
160
  exports.Observer = Observer;
@@ -0,0 +1,141 @@
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 { TrackReport } from './Reports';
18
+ import { ClientEvent, ClientIssue, ClientMetaData, ClientSample, ExtensionStat } from './schema/ClientSample';
19
+ export declare class ObserverEventMonitor<Context> {
20
+ readonly observer: Observer;
21
+ readonly context: Context;
22
+ constructor(observer: Observer, context: Context);
23
+ onCallAdded?: (call: ObservedCall, ctx: Context) => void;
24
+ onCallRemoved?: (call: ObservedCall, ctx: Context) => void;
25
+ onCallEmpty?: (call: ObservedCall, ctx: Context) => void;
26
+ onCallNotEmpty?: (call: ObservedCall, ctx: Context) => void;
27
+ onCallUpdated?: (call: ObservedCall, ctx: Context) => void;
28
+ onClientAdded?: (client: ObservedClient, ctx: Context) => void;
29
+ onClientClosed?: (client: ObservedClient, ctx: Context) => void;
30
+ onClientRejoined?: (client: ObservedClient, ctx: Context) => void;
31
+ onClientIssue?: (observedClent: ObservedClient, issue: ClientIssue, ctx: Context) => void;
32
+ onClientMetadata?: (observedClient: ObservedClient, metadata: ClientMetaData, ctx: Context) => void;
33
+ onClientExtensionStats?: (observedClient: ObservedClient, extensionStats: ExtensionStat, ctx: Context) => void;
34
+ onClientJoined?: (client: ObservedClient, ctx: Context) => void;
35
+ onClientLeft?: (client: ObservedClient, ctx: Context) => void;
36
+ onClientUserMediaError?: (observedClient: ObservedClient, error: string, ctx: Context) => void;
37
+ onClientUsingTurn?: (client: ObservedClient, usingTurn: boolean, ctx: Context) => void;
38
+ onClientUpdated?: (client: ObservedClient, sample: ClientSample, ctx: Context) => void;
39
+ onClientEvent?: (client: ObservedClient, event: ClientEvent, ctx: Context) => void;
40
+ onPeerConnectionAdded?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
41
+ onPeerConnectionRemoved?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
42
+ onSelectedCandidatePairChanged?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
43
+ onIceGatheringStateChange?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
44
+ onIceConnectionStateChange?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
45
+ onConnectionStateChange?: (peerConnection: ObservedPeerConnection, ctx: Context) => void;
46
+ onCertificateAdded?: (certificate: ObservedCertificate, ctx: Context) => void;
47
+ onCertificateRemoved?: (certificate: ObservedCertificate, ctx: Context) => void;
48
+ onCertificateUpdated?: (certificate: ObservedCertificate, ctx: Context) => void;
49
+ onInboundTrackAdded?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
50
+ onInboundTrackRemoved?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
51
+ onInboundTrackUpdated?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
52
+ onInboundTrackMuted?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
53
+ onInboundTrackUnmuted?: (inboundTrack: ObservedInboundTrack, ctx: Context) => void;
54
+ onOutboundTrackAdded?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
55
+ onOutboundTrackRemoved?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
56
+ onOutboundTrackUpdated?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
57
+ onOutboundTrackMuted?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
58
+ onOutboundTrackUnmuted?: (outboundTrack: ObservedOutboundTrack, ctx: Context) => void;
59
+ onInboundRtpAdded?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
60
+ onInboundRtpRemoved?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
61
+ onInboundRtpUpdated?: (inboundRtp: ObservedInboundRtp, ctx: Context) => void;
62
+ onOutboundRtpAdded?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
63
+ onOutboundRtpRemoved?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
64
+ onOutboundRtpUpdated?: (outboundRtp: ObservedOutboundRtp, ctx: Context) => void;
65
+ onDataChannelAdded?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
66
+ onDataChannelRemoved?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
67
+ onDataChannelUpdated?: (dataChannel: ObservedDataChannel, ctx: Context) => void;
68
+ onAddedIceTransport?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
69
+ onRemovedIceTransport?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
70
+ onIceTransportUpdated?: (iceTransport: ObservedIceTransport, ctx: Context) => void;
71
+ onIceCandidateAdded?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
72
+ onIceCandidateRemoved?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
73
+ onIceCandidateUpdated?: (iceCandidate: ObservedIceCandidate, ctx: Context) => void;
74
+ onAddedIceCandidatePair?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
75
+ onRemovedIceCandidatePair?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
76
+ onIceCandidatePairUpdated?: (candidatePair: ObservedIceCandidatePair, ctx: Context) => void;
77
+ onAddedMediaCodec?: (codec: ObservedCodec, ctx: Context) => void;
78
+ onRemovedMediaCodec?: (codec: ObservedCodec, ctx: Context) => void;
79
+ onMediaCodecUpdated?: (codec: ObservedCodec, ctx: Context) => void;
80
+ onAddedMediaPlayout?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
81
+ onRemovedMediaPlayout?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
82
+ onMediaPlayoutUpdated?: (mediaPlayout: ObservedMediaPlayout, ctx: Context) => void;
83
+ onMediaSourceAdded?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
84
+ onMediaSourceRemoved?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
85
+ onMediaSourceUpdated?: (mediaSource: ObservedMediaSource, ctx: Context) => void;
86
+ onTrackReport?: (report: TrackReport, observedClient: ObservedClient, ctx: Context) => void;
87
+ private _onCallAdded;
88
+ private _onClientAdded;
89
+ private _onClientRejoined;
90
+ private _onPeerConnconnectionAdded;
91
+ private _onPeerConnectionRemoved;
92
+ private _onCertificateAdded;
93
+ private _onCertificateRemoved;
94
+ private _onCertificateUpdated;
95
+ private _onInboundTrackAdded;
96
+ private _onInboundTrackRemoved;
97
+ private _onInboundTrackUpdated;
98
+ private _onOutboundTrackMuted;
99
+ private _onOutboundTrackUnmuted;
100
+ private _onOutboundTrackAdded;
101
+ private _onOutboundTrackRemoved;
102
+ private _onOutboundTrackUpdated;
103
+ private _onInboundTrackMuted;
104
+ private _onInboundTrackUnmuted;
105
+ private _onInboundRtpAdded;
106
+ private _onInboundRtpRemoved;
107
+ private _onInboundRtpUpdated;
108
+ private _onOutboundRtpAdded;
109
+ private _onOutboundRtpRemoved;
110
+ private _onOutboundRtpUpdated;
111
+ private _onDataChannelAdded;
112
+ private _onDataChannelRemoved;
113
+ private _onDataChannelUpdated;
114
+ private _onAddedIceTransport;
115
+ private _onRemovedIceTransport;
116
+ private _onIceTransportUpdated;
117
+ private _onIceCandidateAdded;
118
+ private _onIceCandidateRemoved;
119
+ private _onIceCandidateUpdated;
120
+ private _onAddedIceCandidatePair;
121
+ private _onRemovedIceCandidatePair;
122
+ private _onIceCandidatePairUpdated;
123
+ private _onAddedMediaCodec;
124
+ private _onRemovedMediaCodec;
125
+ private _onMediaCodecUpdated;
126
+ private _onAddedMediaPlayout;
127
+ private _onRemovedMediaPlayout;
128
+ private _onMediaPlayoutUpdated;
129
+ private _onMediaSourceAdded;
130
+ private _onMediaSourceRemoved;
131
+ private _onMediaSourceUpdated;
132
+ private _onClientIssue;
133
+ private _onClientMetadata;
134
+ private _onClientExtensionStats;
135
+ private _onClientJoined;
136
+ private _onClientLeft;
137
+ private _onUserMediaError;
138
+ private _onUsingTurn;
139
+ private _onTrackReport;
140
+ }
141
+ //# 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,EAAwB,MAAM,kBAAkB,CAAC;AACxE,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,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uB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