@webex/plugin-meetings 2.60.0 → 2.60.1-next.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.
- package/README.md +46 -8
- package/dist/annotation/annotation.types.d.ts +42 -0
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.d.ts +31 -0
- package/dist/annotation/constants.js +41 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.d.ts +117 -0
- package/dist/annotation/index.js +357 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.d.ts +8 -0
- package/dist/breakouts/breakout.js +215 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.d.ts +5 -0
- package/dist/breakouts/collection.js +22 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/breakouts/edit-lock-error.js +51 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.d.ts +8 -0
- package/dist/breakouts/events.js +44 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.d.ts +5 -0
- package/dist/breakouts/index.js +1047 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.d.ts +22 -0
- package/dist/breakouts/request.js +77 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.d.ts +15 -0
- package/dist/breakouts/utils.js +64 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/browser-detection.js +2 -3
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +3 -4
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +1 -2
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +1 -2
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +1 -2
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +1 -2
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +1 -2
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/common/errors/no-meeting-info.js +50 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/parameter.js +3 -4
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +1 -2
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +1 -2
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/{reclaim-host-role-error.js → reclaim-host-role-errors.js} +7 -11
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/reconnection-in-progress.js +1 -2
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +1 -2
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +1 -2
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.d.ts +20 -8
- package/dist/common/errors/webex-errors.js +48 -28
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +1 -2
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +1 -2
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +1 -2
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +1 -2
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +1 -2
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +1 -2
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +2 -3
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.d.ts +3 -1
- package/dist/common/logs/request.js +8 -5
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.d.ts +9 -7
- package/dist/common/queue.js +22 -9
- package/dist/common/queue.js.map +1 -1
- package/dist/config.d.ts +6 -7
- package/dist/config.js +8 -10
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +217 -97
- package/dist/constants.js +416 -441
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +3 -6
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.d.ts +11 -1
- package/dist/controls-options-manager/enums.js +15 -6
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.d.ts +17 -1
- package/dist/controls-options-manager/index.js +127 -38
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.d.ts +43 -0
- package/dist/controls-options-manager/types.js +7 -0
- package/dist/controls-options-manager/types.js.map +1 -0
- package/dist/controls-options-manager/util.d.ts +1 -7
- package/dist/controls-options-manager/util.js +309 -19
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.js +121 -5
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.d.ts +2 -0
- package/dist/interceptors/index.js +15 -0
- package/dist/interceptors/index.js.map +1 -0
- package/dist/interceptors/locusRetry.d.ts +27 -0
- package/dist/interceptors/locusRetry.js +94 -0
- package/dist/interceptors/locusRetry.js.map +1 -0
- package/dist/interpretation/collection.d.ts +5 -0
- package/dist/interpretation/collection.js +22 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.d.ts +5 -0
- package/dist/interpretation/index.js +365 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.d.ts +5 -0
- package/dist/interpretation/siLanguage.js +24 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +100 -11
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -4
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +1 -2
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +1 -2
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.d.ts +57 -4
- package/dist/locus-info/index.js +425 -84
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +13 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +58 -3
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.d.ts +66 -6
- package/dist/locus-info/parser.js +253 -80
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +97 -13
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.d.ts +2 -0
- package/dist/media/index.js +107 -319
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.d.ts +38 -53
- package/dist/media/properties.js +96 -153
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +1 -22
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.d.ts +234 -230
- package/dist/mediaQualityMetrics/config.js +302 -498
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.d.ts +88 -0
- package/dist/meeting/in-meeting-actions.js +94 -3
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.d.ts +591 -494
- package/dist/meeting/index.js +4732 -2990
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.d.ts +74 -0
- package/dist/meeting/locusMediaRequest.js +291 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.d.ts +93 -25
- package/dist/meeting/muteState.js +224 -133
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.d.ts +82 -47
- package/dist/meeting/request.js +297 -199
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.d.ts +11 -0
- package/dist/meeting/request.type.js +7 -0
- package/dist/meeting/request.type.js.map +1 -0
- package/dist/meeting/state.js +1 -2
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.d.ts +102 -1
- package/dist/meeting/util.js +605 -435
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +3 -4
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.d.ts +13 -1
- package/dist/meeting-info/index.js +74 -7
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.d.ts +31 -1
- package/dist/meeting-info/meeting-info-v2.js +200 -63
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -2
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +2 -3
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +39 -41
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.d.ts +17 -0
- package/dist/meetings/collection.js +42 -4
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.d.ts +93 -21
- package/dist/meetings/index.js +490 -127
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.d.ts +4 -0
- package/dist/meetings/meetings.types.js +7 -0
- package/dist/meetings/meetings.types.js.map +1 -0
- package/dist/meetings/request.js +4 -3
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +107 -6
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.d.ts +13 -1
- package/dist/member/index.js +45 -2
- package/dist/member/index.js.map +1 -1
- package/dist/member/member.types.js +3 -4
- package/dist/member/member.types.js.map +1 -1
- package/dist/member/types.d.ts +32 -0
- package/dist/member/types.js +23 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +120 -29
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.d.ts +5 -0
- package/dist/members/collection.js +11 -2
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.d.ts +56 -11
- package/dist/members/index.js +174 -47
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.d.ts +67 -11
- package/dist/members/request.js +102 -54
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +3 -4
- package/dist/members/types.js.map +1 -1
- package/dist/members/util.d.ts +214 -1
- package/dist/members/util.js +327 -284
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.d.ts +15 -6
- package/dist/metrics/constants.js +17 -9
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.d.ts +4 -111
- package/dist/metrics/index.js +4 -452
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.d.ts +118 -0
- package/dist/multistream/mediaRequestManager.js +344 -0
- package/dist/multistream/mediaRequestManager.js.map +1 -0
- package/dist/multistream/receiveSlot.d.ts +68 -0
- package/dist/multistream/receiveSlot.js +200 -0
- package/dist/multistream/receiveSlot.js.map +1 -0
- package/dist/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/multistream/receiveSlotManager.js +174 -0
- package/dist/multistream/receiveSlotManager.js.map +1 -0
- package/dist/multistream/remoteMedia.d.ts +72 -0
- package/dist/multistream/remoteMedia.js +268 -0
- package/dist/multistream/remoteMedia.js.map +1 -0
- package/dist/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/multistream/remoteMediaGroup.js +267 -0
- package/dist/multistream/remoteMediaGroup.js.map +1 -0
- package/dist/multistream/remoteMediaManager.d.ts +285 -0
- package/dist/multistream/remoteMediaManager.js +1211 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -0
- package/dist/multistream/sendSlotManager.d.ts +61 -0
- package/dist/multistream/sendSlotManager.js +236 -0
- package/dist/multistream/sendSlotManager.js.map +1 -0
- package/dist/networkQualityMonitor/index.js +5 -4
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +2 -3
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -3
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +1 -2
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.d.ts +109 -0
- package/dist/reachability/clusterReachability.js +357 -0
- package/dist/reachability/clusterReachability.js.map +1 -0
- package/dist/reachability/index.d.ts +61 -95
- package/dist/reachability/index.js +300 -393
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.d.ts +7 -3
- package/dist/reachability/request.js +18 -10
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.d.ts +8 -0
- package/dist/reachability/util.js +29 -0
- package/dist/reachability/util.js.map +1 -0
- package/dist/reactions/constants.d.ts +3 -0
- package/dist/reactions/constants.js +12 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.d.ts +2 -2
- package/dist/reactions/reactions.js +4 -6
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.d.ts +23 -3
- package/dist/reactions/reactions.type.js +21 -23
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.d.ts +32 -8
- package/dist/reconnection-manager/index.js +282 -231
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +4 -5
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.d.ts +15 -1
- package/dist/recording-controller/index.js +57 -46
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.d.ts +5 -4
- package/dist/recording-controller/util.js +10 -10
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.d.ts +9 -47
- package/dist/roap/index.js +101 -235
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.d.ts +18 -12
- package/dist/roap/request.js +126 -180
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.d.ts +27 -16
- package/dist/roap/turnDiscovery.js +115 -105
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.d.ts +4 -0
- package/dist/rtcMetrics/constants.js +11 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.d.ts +54 -0
- package/dist/rtcMetrics/index.js +140 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/global.d.ts +1 -83
- package/dist/statsAnalyzer/global.js +2 -85
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.d.ts +50 -30
- package/dist/statsAnalyzer/index.js +435 -510
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +8 -6
- package/dist/statsAnalyzer/mqaUtil.js +120 -83
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +1 -2
- package/dist/transcription/index.js.map +1 -1
- package/dist/webinar/collection.d.ts +16 -0
- package/dist/webinar/collection.js +43 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.d.ts +5 -0
- package/dist/webinar/index.js +68 -0
- package/dist/webinar/index.js.map +1 -0
- package/package.json +38 -26
- package/src/annotation/annotation.types.ts +50 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +328 -0
- package/src/breakouts/README.md +220 -0
- package/src/breakouts/breakout.ts +188 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +925 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/webex-errors.ts +36 -12
- package/src/common/logs/logger-proxy.ts +1 -1
- package/src/common/logs/request.ts +5 -1
- package/src/common/queue.ts +22 -8
- package/src/config.ts +6 -7
- package/src/constants.ts +244 -97
- package/src/controls-options-manager/enums.ts +12 -0
- package/src/controls-options-manager/index.ts +116 -21
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +294 -14
- package/src/index.ts +44 -0
- package/src/interceptors/index.ts +3 -0
- package/src/interceptors/locusRetry.ts +67 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +332 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +110 -0
- package/src/locus-info/index.ts +449 -61
- package/src/locus-info/infoUtils.ts +14 -2
- package/src/locus-info/mediaSharesUtils.ts +64 -0
- package/src/locus-info/parser.ts +258 -47
- package/src/locus-info/selfUtils.ts +85 -2
- package/src/media/index.ts +153 -370
- package/src/media/properties.ts +106 -136
- package/src/media/util.ts +0 -21
- package/src/mediaQualityMetrics/config.ts +244 -377
- package/src/meeting/in-meeting-actions.ts +176 -0
- package/src/meeting/index.ts +3944 -2489
- package/src/meeting/locusMediaRequest.ts +313 -0
- package/src/meeting/muteState.ts +224 -138
- package/src/meeting/request.ts +207 -127
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/util.ts +590 -423
- package/src/meeting-info/index.ts +81 -8
- package/src/meeting-info/meeting-info-v2.ts +163 -13
- package/src/meeting-info/util.ts +1 -1
- package/src/meeting-info/utilv2.ts +28 -28
- package/src/meetings/collection.ts +33 -0
- package/src/meetings/index.ts +487 -126
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/request.ts +2 -0
- package/src/meetings/util.ts +116 -5
- package/src/member/index.ts +43 -1
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +125 -28
- package/src/members/collection.ts +8 -0
- package/src/members/index.ts +187 -52
- package/src/members/request.ts +87 -27
- package/src/members/util.ts +332 -291
- package/src/metrics/constants.ts +15 -6
- package/src/metrics/index.ts +1 -471
- package/src/multistream/mediaRequestManager.ts +440 -0
- package/src/multistream/receiveSlot.ts +184 -0
- package/src/multistream/receiveSlotManager.ts +166 -0
- package/src/multistream/remoteMedia.ts +254 -0
- package/src/multistream/remoteMediaGroup.ts +284 -0
- package/src/multistream/remoteMediaManager.ts +1145 -0
- package/src/multistream/sendSlotManager.ts +170 -0
- package/src/networkQualityMonitor/index.ts +6 -6
- package/src/reachability/clusterReachability.ts +320 -0
- package/src/reachability/index.ts +243 -347
- package/src/reachability/request.ts +17 -8
- package/src/reachability/util.ts +24 -0
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +4 -4
- package/src/reactions/reactions.type.ts +30 -4
- package/src/reconnection-manager/index.ts +168 -156
- package/src/recording-controller/index.ts +20 -3
- package/src/recording-controller/util.ts +26 -9
- package/src/roap/index.ts +98 -241
- package/src/roap/request.ts +74 -148
- package/src/roap/turnDiscovery.ts +62 -56
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +124 -0
- package/src/statsAnalyzer/global.ts +1 -84
- package/src/statsAnalyzer/index.ts +477 -643
- package/src/statsAnalyzer/mqaUtil.ts +115 -114
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +320 -264
- package/test/integration/spec/space-meeting.js +77 -4
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +237 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +1790 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +163 -0
- package/test/unit/spec/controls-options-manager/util.js +576 -60
- package/test/unit/spec/fixture/locus.js +1 -0
- package/test/unit/spec/interceptors/locusRetry.ts +131 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +589 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +323 -30
- package/test/unit/spec/locus-info/index.js +1390 -16
- package/test/unit/spec/locus-info/infoUtils.js +54 -16
- package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
- package/test/unit/spec/locus-info/lib/selfConstant.js +48 -0
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +32 -0
- package/test/unit/spec/locus-info/parser.js +116 -35
- package/test/unit/spec/locus-info/selfUtils.js +275 -0
- package/test/unit/spec/media/index.ts +290 -0
- package/test/unit/spec/media/properties.ts +75 -84
- package/test/unit/spec/meeting/in-meeting-actions.ts +86 -0
- package/test/unit/spec/meeting/index.js +8187 -2769
- package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
- package/test/unit/spec/meeting/muteState.js +409 -213
- package/test/unit/spec/meeting/request.js +512 -42
- package/test/unit/spec/meeting/utils.js +741 -24
- package/test/unit/spec/meeting-info/index.js +300 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +527 -5
- package/test/unit/spec/meeting-info/utilv2.js +21 -0
- package/test/unit/spec/meetings/collection.js +26 -0
- package/test/unit/spec/meetings/index.js +1313 -243
- package/test/unit/spec/meetings/utils.js +202 -2
- package/test/unit/spec/member/index.js +32 -9
- package/test/unit/spec/member/util.js +499 -61
- package/test/unit/spec/members/index.js +394 -5
- package/test/unit/spec/members/request.js +206 -27
- package/test/unit/spec/members/utils.js +173 -38
- package/test/unit/spec/metrics/index.js +1 -50
- package/test/unit/spec/multistream/mediaRequestManager.ts +1418 -0
- package/test/unit/spec/multistream/receiveSlot.ts +163 -0
- package/test/unit/spec/multistream/receiveSlotManager.ts +203 -0
- package/test/unit/spec/multistream/remoteMedia.ts +255 -0
- package/test/unit/spec/multistream/remoteMediaGroup.ts +662 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +1924 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +242 -0
- package/test/unit/spec/networkQualityMonitor/index.js +4 -4
- package/test/unit/spec/reachability/clusterReachability.ts +279 -0
- package/test/unit/spec/reachability/index.ts +531 -24
- package/test/unit/spec/reachability/request.js +68 -0
- package/test/unit/spec/reachability/util.ts +40 -0
- package/test/unit/spec/reconnection-manager/index.js +162 -24
- package/test/unit/spec/recording-controller/index.js +293 -218
- package/test/unit/spec/recording-controller/util.js +223 -96
- package/test/unit/spec/roap/index.ts +200 -76
- package/test/unit/spec/roap/request.ts +255 -0
- package/test/unit/spec/roap/turnDiscovery.ts +86 -48
- package/test/unit/spec/rtcMetrics/index.ts +93 -0
- package/test/unit/spec/stats-analyzer/index.js +261 -167
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +0 -45
- package/test/utils/webex-config.js +4 -0
- package/test/utils/webex-test-users.js +7 -3
- package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
- package/dist/meeting/effectsState.d.ts +0 -42
- package/dist/meeting/effectsState.js +0 -260
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/metrics/config.d.ts +0 -169
- package/dist/metrics/config.js +0 -289
- package/dist/metrics/config.js.map +0 -1
- package/dist/peer-connection-manager/index.d.ts +0 -6
- package/dist/peer-connection-manager/index.js +0 -671
- package/dist/peer-connection-manager/index.js.map +0 -1
- package/dist/peer-connection-manager/util.d.ts +0 -6
- package/dist/peer-connection-manager/util.js +0 -110
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/dist/roap/collection.d.ts +0 -10
- package/dist/roap/collection.js +0 -63
- package/dist/roap/collection.js.map +0 -1
- package/dist/roap/handler.d.ts +0 -47
- package/dist/roap/handler.js +0 -279
- package/dist/roap/handler.js.map +0 -1
- package/dist/roap/state.d.ts +0 -9
- package/dist/roap/state.js +0 -127
- package/dist/roap/state.js.map +0 -1
- package/dist/roap/util.d.ts +0 -2
- package/dist/roap/util.js +0 -76
- package/dist/roap/util.js.map +0 -1
- package/src/index.js +0 -15
- package/src/meeting/effectsState.ts +0 -209
- package/src/metrics/config.ts +0 -485
- package/src/peer-connection-manager/index.ts +0 -847
- package/src/peer-connection-manager/util.ts +0 -119
- package/src/roap/collection.ts +0 -62
- package/src/roap/handler.ts +0 -294
- package/src/roap/state.ts +0 -156
- package/src/roap/util.ts +0 -100
- package/test/unit/spec/meeting/effectsState.js +0 -281
- package/test/unit/spec/peerconnection-manager/index.js +0 -218
- package/test/unit/spec/peerconnection-manager/utils.js +0 -49
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -388
- package/test/unit/spec/roap/util.js +0 -30
- /package/dist/common/errors/{reclaim-host-role-error.d.ts → reclaim-host-role-errors.d.ts} +0 -0
- /package/src/common/errors/{reclaim-host-role-error.ts → reclaim-host-role-errors.ts} +0 -0
|
@@ -7,6 +7,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
9
|
exports.StatsAnalyzer = exports.EVENTS = void 0;
|
|
10
|
+
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
10
11
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
11
12
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
12
13
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
@@ -16,25 +17,37 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/
|
|
|
16
17
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
17
18
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
18
19
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
19
|
-
var
|
|
20
|
+
var _lodash = require("lodash");
|
|
21
|
+
var _internalMediaCore = require("@webex/internal-media-core");
|
|
20
22
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
21
23
|
var _constants = require("../constants");
|
|
22
|
-
var _config =
|
|
24
|
+
var _config = require("../mediaQualityMetrics/config");
|
|
23
25
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
24
26
|
var _global = _interopRequireDefault(require("./global"));
|
|
25
27
|
var _mqaUtil = require("./mqaUtil");
|
|
26
28
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
27
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
28
|
-
var EVENTS = {
|
|
29
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable prefer-destructuring */
|
|
30
|
+
var EVENTS = exports.EVENTS = {
|
|
29
31
|
MEDIA_QUALITY: 'MEDIA_QUALITY',
|
|
30
|
-
NO_FRAMES_SENT: 'NO_FRAMES_SENT',
|
|
31
|
-
NO_VIDEO_ENCODED: 'NO_VIDEO_ENCODED',
|
|
32
32
|
LOCAL_MEDIA_STARTED: 'LOCAL_MEDIA_STARTED',
|
|
33
33
|
LOCAL_MEDIA_STOPPED: 'LOCAL_MEDIA_STOPPED',
|
|
34
34
|
REMOTE_MEDIA_STARTED: 'REMOTE_MEDIA_STARTED',
|
|
35
35
|
REMOTE_MEDIA_STOPPED: 'REMOTE_MEDIA_STOPPED'
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
var emptySender = {
|
|
38
|
+
trackLabel: '',
|
|
39
|
+
maxPacketLossRatio: 0,
|
|
40
|
+
availableBandwidth: 0,
|
|
41
|
+
bytesSent: 0,
|
|
42
|
+
meanRemoteJitter: [],
|
|
43
|
+
meanRoundTripTime: []
|
|
44
|
+
};
|
|
45
|
+
var emptyReceiver = {
|
|
46
|
+
availableBandwidth: 0,
|
|
47
|
+
bytesReceived: 0,
|
|
48
|
+
meanRtpJitter: [],
|
|
49
|
+
meanRoundTripTime: []
|
|
50
|
+
};
|
|
38
51
|
/**
|
|
39
52
|
* Stats Analyzer class that will emit events based on detected quality
|
|
40
53
|
*
|
|
@@ -42,8 +55,7 @@ var EVENTS = {
|
|
|
42
55
|
* @class StatsAnalyzer
|
|
43
56
|
* @extends {EventsScope}
|
|
44
57
|
*/
|
|
45
|
-
exports.
|
|
46
|
-
var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
58
|
+
var StatsAnalyzer = exports.StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
47
59
|
(0, _inherits2.default)(StatsAnalyzer, _EventsScope);
|
|
48
60
|
var _super = _createSuper(StatsAnalyzer);
|
|
49
61
|
/**
|
|
@@ -51,13 +63,17 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
51
63
|
* @constructor
|
|
52
64
|
* @public
|
|
53
65
|
* @param {Object} config SDK Configuration Object
|
|
66
|
+
* @param {Function} receiveSlotCallback Callback used to access receive slots.
|
|
54
67
|
* @param {Object} networkQualityMonitor class for assessing network characteristics (jitter, packetLoss, latency)
|
|
55
68
|
* @param {Object} statsResults Default properties for stats
|
|
56
69
|
*/
|
|
57
70
|
function StatsAnalyzer(config) {
|
|
58
71
|
var _this;
|
|
59
|
-
var
|
|
60
|
-
|
|
72
|
+
var receiveSlotCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
|
|
73
|
+
return undefined;
|
|
74
|
+
};
|
|
75
|
+
var networkQualityMonitor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
76
|
+
var statsResults = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _global.default;
|
|
61
77
|
(0, _classCallCheck2.default)(this, StatsAnalyzer);
|
|
62
78
|
_this = _super.call(this);
|
|
63
79
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "config", void 0);
|
|
@@ -65,15 +81,18 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
65
81
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastEmittedStartStopEvent", void 0);
|
|
66
82
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastMqaDataSent", void 0);
|
|
67
83
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastStatsResults", void 0);
|
|
68
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "localMQEStats", void 0);
|
|
69
84
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingMediaStatus", void 0);
|
|
70
85
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mqaInterval", void 0);
|
|
71
86
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mqaSentCount", void 0);
|
|
72
87
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "networkQualityMonitor", void 0);
|
|
73
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "
|
|
88
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaConnection", void 0);
|
|
74
89
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsInterval", void 0);
|
|
75
90
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsResults", void 0);
|
|
76
91
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsStarted", void 0);
|
|
92
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "successfulCandidatePair", void 0);
|
|
93
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "localIpAddress", void 0);
|
|
94
|
+
// Returns the local IP address for diagnostics. this is the local IP of the interface used for the current media connection a host can have many local Ip Addresses
|
|
95
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "receiveSlotCallback", void 0);
|
|
77
96
|
/**
|
|
78
97
|
* emits started/stopped events for local/remote media by checking
|
|
79
98
|
* if given values are increasing or not. The previousValue, currentValue
|
|
@@ -97,11 +116,14 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
97
116
|
if (previousValue === undefined) previousValue = 0;
|
|
98
117
|
// eslint-disable-next-line no-param-reassign
|
|
99
118
|
if (currentValue === undefined) currentValue = 0;
|
|
119
|
+
if (!_this.lastEmittedStartStopEvent[mediaType]) {
|
|
120
|
+
_this.lastEmittedStartStopEvent[mediaType] = {};
|
|
121
|
+
}
|
|
100
122
|
var lastEmittedEvent = isLocal ? _this.lastEmittedStartStopEvent[mediaType].local : _this.lastEmittedStartStopEvent[mediaType].remote;
|
|
101
123
|
var newEvent;
|
|
102
124
|
if (currentValue - previousValue > 0) {
|
|
103
125
|
newEvent = isLocal ? EVENTS.LOCAL_MEDIA_STARTED : EVENTS.REMOTE_MEDIA_STARTED;
|
|
104
|
-
} else if (currentValue === previousValue && currentValue
|
|
126
|
+
} else if (currentValue === previousValue && currentValue > 0) {
|
|
105
127
|
newEvent = isLocal ? EVENTS.LOCAL_MEDIA_STOPPED : EVENTS.REMOTE_MEDIA_STOPPED;
|
|
106
128
|
}
|
|
107
129
|
if (newEvent && lastEmittedEvent !== newEvent) {
|
|
@@ -118,6 +140,44 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
118
140
|
});
|
|
119
141
|
}
|
|
120
142
|
});
|
|
143
|
+
/**
|
|
144
|
+
* extracts the local Ip address from the statsResult object by looking at stats results candidates
|
|
145
|
+
* and matches that ID with the successful candidate pair. It looks at the type of local candidate it is
|
|
146
|
+
* and then extracts the IP address from the relatedAddress or address property based on conditions known in webrtc
|
|
147
|
+
* note, there are known incompatibilities and it is possible for this to set undefined, or for the IP address to be the public IP address
|
|
148
|
+
* for example, firefox does not set the relayProtocol, and if the user is behind a NAT it might be the public IP
|
|
149
|
+
* @private
|
|
150
|
+
* @param {string} successfulCandidatePairId - The ID of the successful candidate pair.
|
|
151
|
+
* @param {Object} candidates - the stats result candidates
|
|
152
|
+
* @returns {void}
|
|
153
|
+
*/
|
|
154
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "extractAndSetLocalIpAddressInfoForDiagnostics", function (successfulCandidatePairId, candidates) {
|
|
155
|
+
var newIpAddress = '';
|
|
156
|
+
if (successfulCandidatePairId && !(0, _lodash.isEmpty)(candidates)) {
|
|
157
|
+
var localCandidate = candidates[successfulCandidatePairId];
|
|
158
|
+
if (localCandidate) {
|
|
159
|
+
if (localCandidate.candidateType === 'host') {
|
|
160
|
+
// if it's a host candidate, use the address property - it will be the local IP
|
|
161
|
+
newIpAddress = "".concat(localCandidate.address);
|
|
162
|
+
} else if (localCandidate.candidateType === 'prflx') {
|
|
163
|
+
// if it's a peer reflexive candidate and we're not using a relay (there is no relayProtocol set)
|
|
164
|
+
// then look at the relatedAddress - it will be the local
|
|
165
|
+
//
|
|
166
|
+
// Firefox doesn't populate the relayProtocol property
|
|
167
|
+
if (!localCandidate.relayProtocol) {
|
|
168
|
+
newIpAddress = "".concat(localCandidate.relatedAddress);
|
|
169
|
+
} else {
|
|
170
|
+
// if it's a peer reflexive candidate and we are using a relay -
|
|
171
|
+
// in that case the relatedAddress will be the IP of the TURN server (Linus),
|
|
172
|
+
// so we can only look at the address, but it might be local IP or public IP,
|
|
173
|
+
// depending on if the user is behind a NAT or not
|
|
174
|
+
newIpAddress = "".concat(localCandidate.address);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
_this.localIpAddress = newIpAddress;
|
|
180
|
+
});
|
|
121
181
|
/**
|
|
122
182
|
* Processes remote and local candidate result and stores
|
|
123
183
|
* @private
|
|
@@ -129,56 +189,47 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
129
189
|
* @returns {void}
|
|
130
190
|
*/
|
|
131
191
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "parseCandidate", function (result, type, isSender, isRemote) {
|
|
192
|
+
var _this$successfulCandi;
|
|
132
193
|
if (!result || !result.id) {
|
|
133
194
|
return;
|
|
134
195
|
}
|
|
135
|
-
var RemoteCandidateType = {};
|
|
136
|
-
var RemoteTransport = {};
|
|
137
|
-
var RemoteIpAddress = {};
|
|
138
|
-
var RemoteNetworkType = {};
|
|
139
|
-
if (!result.id) return;
|
|
140
|
-
var sendRecvType = isSender ? _constants.STATS.SEND_DIRECTION : _constants.STATS.RECEIVE_DIRECTION;
|
|
141
|
-
var ipType = isRemote ? _constants.STATS.REMOTE : _constants.STATS.LOCAL;
|
|
142
|
-
if (!RemoteCandidateType[result.id]) {
|
|
143
|
-
RemoteCandidateType[result.id] = [];
|
|
144
|
-
}
|
|
145
|
-
if (!RemoteTransport[result.id]) {
|
|
146
|
-
RemoteTransport[result.id] = [];
|
|
147
|
-
}
|
|
148
|
-
if (!RemoteIpAddress[result.id]) {
|
|
149
|
-
RemoteIpAddress[result.id] = [];
|
|
150
|
-
}
|
|
151
|
-
if (!RemoteNetworkType[result.id]) {
|
|
152
|
-
RemoteNetworkType[result.id] = [];
|
|
153
|
-
}
|
|
154
|
-
if (result.candidateType && RemoteCandidateType[result.id].indexOf(result.candidateType) === -1) {
|
|
155
|
-
RemoteCandidateType[result.id].push(result.candidateType);
|
|
156
|
-
}
|
|
157
|
-
if (result.protocol && RemoteTransport[result.id].indexOf(result.protocol) === -1) {
|
|
158
|
-
RemoteTransport[result.id].push(result.protocol.toUpperCase());
|
|
159
|
-
}
|
|
160
|
-
if (result.ip && RemoteIpAddress[result.id].indexOf("".concat(result.ip, ":").concat(result.portNumber)) === -1) {
|
|
161
|
-
RemoteIpAddress[result.id].push("".concat(result.ip)); // TODO: Add ports
|
|
162
|
-
}
|
|
163
196
|
|
|
164
|
-
|
|
165
|
-
|
|
197
|
+
// We only care about the successful local candidate
|
|
198
|
+
if (((_this$successfulCandi = _this.successfulCandidatePair) === null || _this$successfulCandi === void 0 ? void 0 : _this$successfulCandi.localCandidateId) !== result.id) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
var transport;
|
|
202
|
+
if (result.relayProtocol) {
|
|
203
|
+
transport = result.relayProtocol.toUpperCase();
|
|
204
|
+
} else if (result.protocol) {
|
|
205
|
+
transport = result.protocol.toUpperCase();
|
|
166
206
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
207
|
+
var sendRecvType = isSender ? _constants.STATS.SEND_DIRECTION : _constants.STATS.RECEIVE_DIRECTION;
|
|
208
|
+
var ipType = isRemote ? _constants.STATS.REMOTE : _constants.STATS.LOCAL;
|
|
209
|
+
if (!_this.statsResults.candidates) {
|
|
210
|
+
_this.statsResults.candidates = {};
|
|
211
|
+
}
|
|
212
|
+
_this.statsResults.candidates[result.id] = {
|
|
213
|
+
candidateType: result.candidateType,
|
|
214
|
+
ipAddress: result.ip,
|
|
215
|
+
// TODO: add ports
|
|
216
|
+
relatedAddress: result.relatedAddress,
|
|
217
|
+
relatedPort: result.relatedPort,
|
|
218
|
+
relayProtocol: result.relayProtocol,
|
|
219
|
+
protocol: result.protocol,
|
|
220
|
+
address: result.address,
|
|
170
221
|
portNumber: result.port,
|
|
171
|
-
networkType:
|
|
222
|
+
networkType: result.networkType,
|
|
172
223
|
priority: result.priority,
|
|
173
|
-
transport:
|
|
224
|
+
transport: transport,
|
|
174
225
|
timestamp: result.time,
|
|
175
226
|
id: result.id,
|
|
176
227
|
type: result.type
|
|
177
228
|
};
|
|
178
|
-
_this.statsResults.connectionType[ipType].candidateType =
|
|
179
|
-
_this.statsResults.connectionType[ipType].ipAddress =
|
|
180
|
-
_this.statsResults.connectionType[ipType].networkType =
|
|
181
|
-
_this.statsResults.connectionType[ipType].transport =
|
|
229
|
+
_this.statsResults.connectionType[ipType].candidateType = result.candidateType;
|
|
230
|
+
_this.statsResults.connectionType[ipType].ipAddress = result.ipAddress;
|
|
231
|
+
_this.statsResults.connectionType[ipType].networkType = result.networkType === _constants.NETWORK_TYPE.VPN ? _constants.NETWORK_TYPE.UNKNOWN : result.networkType;
|
|
232
|
+
_this.statsResults.connectionType[ipType].transport = transport;
|
|
182
233
|
_this.statsResults[type][sendRecvType].totalRoundTripTime = result.totalRoundTripTime;
|
|
183
234
|
});
|
|
184
235
|
_this.statsStarted = false;
|
|
@@ -188,141 +239,34 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
188
239
|
_this.networkQualityMonitor = networkQualityMonitor;
|
|
189
240
|
_this.correlationId = config.correlationId;
|
|
190
241
|
_this.mqaSentCount = -1;
|
|
191
|
-
_this.lastMqaDataSent = {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
},
|
|
197
|
-
audio: {
|
|
198
|
-
send: {},
|
|
199
|
-
recv: {}
|
|
200
|
-
},
|
|
201
|
-
share: {
|
|
202
|
-
send: {},
|
|
203
|
-
recv: {}
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
video: {
|
|
207
|
-
send: {},
|
|
208
|
-
recv: {}
|
|
209
|
-
},
|
|
210
|
-
audio: {
|
|
211
|
-
send: {},
|
|
212
|
-
recv: {}
|
|
213
|
-
},
|
|
214
|
-
share: {
|
|
215
|
-
send: {},
|
|
216
|
-
recv: {}
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
_this.localMQEStats = {
|
|
220
|
-
audio: {
|
|
221
|
-
RX: {
|
|
222
|
-
packetsLost: [],
|
|
223
|
-
jitter: [],
|
|
224
|
-
latency: [],
|
|
225
|
-
bitRate: []
|
|
226
|
-
},
|
|
227
|
-
TX: {
|
|
228
|
-
packetsLost: [],
|
|
229
|
-
jitter: [],
|
|
230
|
-
latency: [],
|
|
231
|
-
bitRate: []
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
video: {
|
|
235
|
-
RX: {
|
|
236
|
-
packetsLost: [],
|
|
237
|
-
jitter: [],
|
|
238
|
-
latency: [],
|
|
239
|
-
bitRate: [],
|
|
240
|
-
frameRate: [],
|
|
241
|
-
resolutionWidth: [],
|
|
242
|
-
resolutionHeight: [],
|
|
243
|
-
requestedKeyFrame: [],
|
|
244
|
-
receivedKeyFrame: []
|
|
245
|
-
},
|
|
246
|
-
TX: {
|
|
247
|
-
packetsLost: [],
|
|
248
|
-
jitter: [],
|
|
249
|
-
latency: [],
|
|
250
|
-
bitRate: [],
|
|
251
|
-
frameRate: [],
|
|
252
|
-
resolutionWidth: [],
|
|
253
|
-
resolutionHeight: [],
|
|
254
|
-
requestedKeyFrame: [],
|
|
255
|
-
receivedKeyFrame: []
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
_this.lastEmittedStartStopEvent = {
|
|
260
|
-
audio: {
|
|
261
|
-
local: undefined,
|
|
262
|
-
remote: undefined
|
|
263
|
-
},
|
|
264
|
-
video: {
|
|
265
|
-
local: undefined,
|
|
266
|
-
remote: undefined
|
|
267
|
-
},
|
|
268
|
-
share: {
|
|
269
|
-
local: undefined,
|
|
270
|
-
remote: undefined
|
|
271
|
-
}
|
|
272
|
-
};
|
|
242
|
+
_this.lastMqaDataSent = {};
|
|
243
|
+
_this.lastEmittedStartStopEvent = {};
|
|
244
|
+
_this.receiveSlotCallback = receiveSlotCallback;
|
|
245
|
+
_this.successfulCandidatePair = {};
|
|
246
|
+
_this.localIpAddress = '';
|
|
273
247
|
return _this;
|
|
274
248
|
}
|
|
275
|
-
(0, _createClass2.default)(StatsAnalyzer, [{
|
|
276
|
-
key: "populateResults",
|
|
277
|
-
value: function populateResults(lastMqa) {
|
|
278
|
-
// Audio
|
|
279
|
-
|
|
280
|
-
this.localMQEStats.audio.RX.packetsLost.push(lastMqa.audioReceive[0].common.mediaHopByHopLost);
|
|
281
|
-
this.localMQEStats.audio.RX.jitter.push(lastMqa.audioReceive[0].streams[0].common.rtpJitter);
|
|
282
|
-
this.localMQEStats.audio.RX.latency.push(lastMqa.audioReceive[0].common.roundTripTime);
|
|
283
|
-
this.localMQEStats.audio.RX.bitRate.push(lastMqa.audioReceive[0].streams[0].common.receivedBitrate);
|
|
284
|
-
this.localMQEStats.audio.TX.packetsLost.push(lastMqa.audioTransmit[0].common.remoteLossRate);
|
|
285
|
-
this.localMQEStats.audio.TX.jitter.push(lastMqa.audioTransmit[0].common.remoteJitter);
|
|
286
|
-
this.localMQEStats.audio.TX.latency.push(lastMqa.audioTransmit[0].common.roundTripTime);
|
|
287
|
-
this.localMQEStats.audio.TX.bitRate.push(lastMqa.audioTransmit[0].streams[0].common.transmittedBitrate);
|
|
288
|
-
|
|
289
|
-
// Video
|
|
290
249
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
this.localMQEStats.video.RX.receivedKeyFrame.push();
|
|
300
|
-
this.localMQEStats.video.TX.packetsLost.push(lastMqa.videoTransmit[0].common.remoteLossRate);
|
|
301
|
-
this.localMQEStats.video.TX.jitter.push(lastMqa.videoTransmit[0].common.remoteJitter);
|
|
302
|
-
this.localMQEStats.video.TX.latency.push(lastMqa.videoTransmit[0].common.roundTripTime);
|
|
303
|
-
this.localMQEStats.video.TX.bitRate.push(lastMqa.videoTransmit[0].streams[0].common.transmittedBitrate);
|
|
304
|
-
this.localMQEStats.video.TX.frameRate.push(lastMqa.videoTransmit[0].streams[0].common.transmittedFrameRate);
|
|
305
|
-
this.localMQEStats.video.TX.resolutionWidth.push(lastMqa.videoTransmit[0].streams[0].transmittedWidth);
|
|
306
|
-
this.localMQEStats.video.TX.resolutionHeight.push(lastMqa.videoTransmit[0].streams[0].transmittedHeight);
|
|
307
|
-
this.localMQEStats.video.TX.requestedKeyFrame.push(lastMqa.videoTransmit[0].streams[0].requestedKeyFrames);
|
|
308
|
-
this.localMQEStats.video.TX.receivedKeyFrame.push();
|
|
309
|
-
}
|
|
310
|
-
}, {
|
|
250
|
+
/**
|
|
251
|
+
* Resets cumulative stats arrays.
|
|
252
|
+
*
|
|
253
|
+
* @public
|
|
254
|
+
* @memberof StatsAnalyzer
|
|
255
|
+
* @returns {void}
|
|
256
|
+
*/
|
|
257
|
+
(0, _createClass2.default)(StatsAnalyzer, [{
|
|
311
258
|
key: "resetStatsResults",
|
|
312
259
|
value: function resetStatsResults() {
|
|
313
|
-
|
|
314
|
-
this.statsResults.
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
this.statsResults.audio.send.meanRoundTripTime = [];
|
|
324
|
-
this.statsResults.video.send.meanRoundTripTime = [];
|
|
325
|
-
this.statsResults.share.send.meanRoundTripTime = [];
|
|
260
|
+
var _this2 = this;
|
|
261
|
+
(0, _keys.default)(this.statsResults).forEach(function (mediaType) {
|
|
262
|
+
if (mediaType.includes('recv')) {
|
|
263
|
+
_this2.statsResults[mediaType].recv.meanRtpJitter = [];
|
|
264
|
+
}
|
|
265
|
+
if (mediaType.includes('send')) {
|
|
266
|
+
_this2.statsResults[mediaType].send.meanRemoteJitter = [];
|
|
267
|
+
_this2.statsResults[mediaType].send.meanRoundTripTime = [];
|
|
268
|
+
}
|
|
269
|
+
});
|
|
326
270
|
}
|
|
327
271
|
|
|
328
272
|
/**
|
|
@@ -340,7 +284,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
340
284
|
}
|
|
341
285
|
|
|
342
286
|
/**
|
|
343
|
-
* captures MQA data from
|
|
287
|
+
* captures MQA data from media connection
|
|
344
288
|
*
|
|
345
289
|
* @public
|
|
346
290
|
* @memberof StatsAnalyzer
|
|
@@ -349,96 +293,117 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
349
293
|
}, {
|
|
350
294
|
key: "sendMqaData",
|
|
351
295
|
value: function sendMqaData() {
|
|
352
|
-
var
|
|
353
|
-
var
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
296
|
+
var _this3 = this;
|
|
297
|
+
var newMqa = (0, _lodash.cloneDeep)(_config.emptyMqaInterval);
|
|
298
|
+
(0, _keys.default)(this.statsResults).forEach(function (mediaType) {
|
|
299
|
+
if (!_this3.lastMqaDataSent[mediaType]) {
|
|
300
|
+
_this3.lastMqaDataSent[mediaType] = {};
|
|
301
|
+
}
|
|
302
|
+
if (!_this3.lastMqaDataSent[mediaType].send && mediaType.includes('-send')) {
|
|
303
|
+
_this3.lastMqaDataSent[mediaType].send = {};
|
|
304
|
+
}
|
|
305
|
+
if (!_this3.lastMqaDataSent[mediaType].recv && mediaType.includes('-recv')) {
|
|
306
|
+
_this3.lastMqaDataSent[mediaType].recv = {};
|
|
307
|
+
}
|
|
308
|
+
if (mediaType.includes('audio-send') || mediaType.includes('audio-share-send')) {
|
|
309
|
+
var audioSender = (0, _lodash.cloneDeep)(_config.emptyAudioTransmit);
|
|
310
|
+
(0, _mqaUtil.getAudioSenderMqa)({
|
|
311
|
+
audioSender: audioSender,
|
|
312
|
+
statsResults: _this3.statsResults,
|
|
313
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
314
|
+
mediaType: mediaType
|
|
315
|
+
});
|
|
316
|
+
newMqa.audioTransmit.push(audioSender);
|
|
317
|
+
_this3.lastMqaDataSent[mediaType].send = (0, _lodash.cloneDeep)(_this3.statsResults[mediaType].send);
|
|
318
|
+
} else if (mediaType.includes('audio-recv') || mediaType.includes('audio-share-recv')) {
|
|
319
|
+
var audioReceiver = (0, _lodash.cloneDeep)(_config.emptyAudioReceive);
|
|
320
|
+
(0, _mqaUtil.getAudioReceiverMqa)({
|
|
321
|
+
audioReceiver: audioReceiver,
|
|
322
|
+
statsResults: _this3.statsResults,
|
|
323
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
324
|
+
mediaType: mediaType
|
|
325
|
+
});
|
|
326
|
+
newMqa.audioReceive.push(audioReceiver);
|
|
327
|
+
_this3.lastMqaDataSent[mediaType].recv = (0, _lodash.cloneDeep)(_this3.statsResults[mediaType].recv);
|
|
328
|
+
} else if (mediaType.includes('video-send') || mediaType.includes('video-share-send')) {
|
|
329
|
+
var videoSender = (0, _lodash.cloneDeep)(_config.emptyVideoTransmit);
|
|
330
|
+
(0, _mqaUtil.getVideoSenderMqa)({
|
|
331
|
+
videoSender: videoSender,
|
|
332
|
+
statsResults: _this3.statsResults,
|
|
333
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
334
|
+
mediaType: mediaType
|
|
335
|
+
});
|
|
336
|
+
newMqa.videoTransmit.push(videoSender);
|
|
337
|
+
_this3.lastMqaDataSent[mediaType].send = (0, _lodash.cloneDeep)(_this3.statsResults[mediaType].send);
|
|
338
|
+
} else if (mediaType.includes('video-recv') || mediaType.includes('video-share-recv')) {
|
|
339
|
+
var videoReceiver = (0, _lodash.cloneDeep)(_config.emptyVideoReceive);
|
|
340
|
+
(0, _mqaUtil.getVideoReceiverMqa)({
|
|
341
|
+
videoReceiver: videoReceiver,
|
|
342
|
+
statsResults: _this3.statsResults,
|
|
343
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
344
|
+
mediaType: mediaType
|
|
345
|
+
});
|
|
346
|
+
newMqa.videoReceive.push(videoReceiver);
|
|
347
|
+
_this3.lastMqaDataSent[mediaType].recv = (0, _lodash.cloneDeep)(_this3.statsResults[mediaType].recv);
|
|
348
|
+
}
|
|
393
349
|
});
|
|
394
|
-
|
|
350
|
+
newMqa.intervalMetadata.peerReflexiveIP = this.statsResults.connectionType.local.ipAddress;
|
|
395
351
|
|
|
396
352
|
// Adding peripheral information
|
|
397
|
-
|
|
398
|
-
_config.default.intervals[0].intervalMetadata.peripherals.push({
|
|
353
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
399
354
|
information: _constants._UNKNOWN_,
|
|
400
355
|
name: _constants.MEDIA_DEVICES.SPEAKER
|
|
401
356
|
});
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
357
|
+
if (this.statsResults['audio-send']) {
|
|
358
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
359
|
+
information: this.statsResults['audio-send'].trackLabel || _constants._UNKNOWN_,
|
|
360
|
+
name: _constants.MEDIA_DEVICES.MICROPHONE
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
if (this.statsResults['video-send']) {
|
|
364
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
365
|
+
information: this.statsResults['video-send'].trackLabel || _constants._UNKNOWN_,
|
|
366
|
+
name: _constants.MEDIA_DEVICES.CAMERA
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
newMqa.networkType = this.statsResults.connectionType.local.networkType;
|
|
413
370
|
this.mqaSentCount += 1;
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
// DO Deep copy, for some reason it takes the reference all the time rather then old value set
|
|
417
|
-
this.lastMqaDataSent = (0, _cloneDeep2.default)(this.statsResults);
|
|
418
|
-
this.populateResults(_config.default.intervals[0]);
|
|
371
|
+
newMqa.intervalNumber = this.mqaSentCount;
|
|
419
372
|
this.resetStatsResults();
|
|
420
373
|
this.emit({
|
|
421
374
|
file: 'statsAnalyzer',
|
|
422
375
|
function: 'sendMqaData'
|
|
423
376
|
}, EVENTS.MEDIA_QUALITY, {
|
|
424
|
-
data:
|
|
377
|
+
data: newMqa,
|
|
425
378
|
// @ts-ignore
|
|
426
|
-
networkType:
|
|
379
|
+
networkType: newMqa.networkType
|
|
427
380
|
});
|
|
428
381
|
}
|
|
429
382
|
|
|
430
383
|
/**
|
|
431
|
-
* updated the
|
|
384
|
+
* updated the media connection when changed
|
|
432
385
|
*
|
|
433
386
|
* @private
|
|
434
|
-
* @memberof
|
|
435
|
-
* @param {
|
|
387
|
+
* @memberof StatsAnalyzer
|
|
388
|
+
* @param {RoapMediaConnection} mediaConnection
|
|
436
389
|
* @returns {void}
|
|
437
390
|
*/
|
|
438
391
|
}, {
|
|
439
|
-
key: "
|
|
440
|
-
value: function
|
|
441
|
-
this.
|
|
392
|
+
key: "updateMediaConnection",
|
|
393
|
+
value: function updateMediaConnection(mediaConnection) {
|
|
394
|
+
this.mediaConnection = mediaConnection;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Returns the local IP address for diagnostics.
|
|
399
|
+
* this is the local IP of the interface used for the current media connection
|
|
400
|
+
* a host can have many local Ip Addresses
|
|
401
|
+
* @returns {string | undefined} The local IP address.
|
|
402
|
+
*/
|
|
403
|
+
}, {
|
|
404
|
+
key: "getLocalIpAddress",
|
|
405
|
+
value: function getLocalIpAddress() {
|
|
406
|
+
return this.localIpAddress;
|
|
442
407
|
}
|
|
443
408
|
|
|
444
409
|
/**
|
|
@@ -446,24 +411,24 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
446
411
|
*
|
|
447
412
|
* @public
|
|
448
413
|
* @memberof StatsAnalyzer
|
|
449
|
-
* @param {
|
|
414
|
+
* @param {RoapMediaConnection} mediaConnection
|
|
450
415
|
* @returns {Promise}
|
|
451
416
|
*/
|
|
452
417
|
}, {
|
|
453
418
|
key: "startAnalyzer",
|
|
454
|
-
value: function startAnalyzer(
|
|
455
|
-
var
|
|
419
|
+
value: function startAnalyzer(mediaConnection) {
|
|
420
|
+
var _this4 = this;
|
|
456
421
|
if (!this.statsStarted) {
|
|
457
422
|
this.statsStarted = true;
|
|
458
|
-
this.
|
|
423
|
+
this.mediaConnection = mediaConnection;
|
|
459
424
|
return this.getStatsAndParse().then(function () {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
},
|
|
425
|
+
_this4.statsInterval = setInterval(function () {
|
|
426
|
+
_this4.getStatsAndParse();
|
|
427
|
+
}, _this4.config.analyzerInterval);
|
|
463
428
|
// Trigger initial fetch
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
429
|
+
_this4.sendMqaData();
|
|
430
|
+
_this4.mqaInterval = setInterval(function () {
|
|
431
|
+
_this4.sendMqaData();
|
|
467
432
|
}, _constants.MQA_INTEVAL);
|
|
468
433
|
});
|
|
469
434
|
}
|
|
@@ -480,7 +445,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
480
445
|
}, {
|
|
481
446
|
key: "stopAnalyzer",
|
|
482
447
|
value: function stopAnalyzer() {
|
|
483
|
-
var
|
|
448
|
+
var _this5 = this;
|
|
484
449
|
var sendOneLastMqa = this.mqaInterval && this.statsInterval;
|
|
485
450
|
if (this.statsInterval) {
|
|
486
451
|
clearInterval(this.statsInterval);
|
|
@@ -492,8 +457,8 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
492
457
|
}
|
|
493
458
|
if (sendOneLastMqa) {
|
|
494
459
|
return this.getStatsAndParse().then(function () {
|
|
495
|
-
|
|
496
|
-
|
|
460
|
+
_this5.sendMqaData();
|
|
461
|
+
_this5.mediaConnection = null;
|
|
497
462
|
});
|
|
498
463
|
}
|
|
499
464
|
return _promise.default.resolve();
|
|
@@ -515,6 +480,16 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
515
480
|
if (!getStatsResult) {
|
|
516
481
|
return;
|
|
517
482
|
}
|
|
483
|
+
|
|
484
|
+
// Generate empty stats results
|
|
485
|
+
if (!this.statsResults[type]) {
|
|
486
|
+
this.statsResults[type] = {};
|
|
487
|
+
}
|
|
488
|
+
if (isSender && !this.statsResults[type].send) {
|
|
489
|
+
this.statsResults[type].send = (0, _lodash.cloneDeep)(emptySender);
|
|
490
|
+
} else if (!isSender && !this.statsResults[type].recv) {
|
|
491
|
+
this.statsResults[type].recv = (0, _lodash.cloneDeep)(emptyReceiver);
|
|
492
|
+
}
|
|
518
493
|
switch (getStatsResult.type) {
|
|
519
494
|
case 'outbound-rtp':
|
|
520
495
|
this.processOutboundRTPResult(getStatsResult, type);
|
|
@@ -524,8 +499,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
524
499
|
break;
|
|
525
500
|
case 'remote-inbound-rtp':
|
|
526
501
|
case 'remote-outbound-rtp':
|
|
527
|
-
|
|
528
|
-
this.compareSentAndReceived(getStatsResult, type, isSender);
|
|
502
|
+
this.compareSentAndReceived(getStatsResult, type);
|
|
529
503
|
break;
|
|
530
504
|
case 'remotecandidate':
|
|
531
505
|
case 'remote-candidate':
|
|
@@ -546,21 +520,37 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
546
520
|
/**
|
|
547
521
|
* Filters the get stats results for types
|
|
548
522
|
* @private
|
|
549
|
-
* @param {Array}
|
|
523
|
+
* @param {Array} statsItem
|
|
550
524
|
* @param {String} type
|
|
551
525
|
* @param {boolean} isSender
|
|
552
526
|
* @returns {void}
|
|
553
527
|
*/
|
|
554
528
|
}, {
|
|
555
529
|
key: "filterAndParseGetStatsResults",
|
|
556
|
-
value: function filterAndParseGetStatsResults(
|
|
557
|
-
var
|
|
530
|
+
value: function filterAndParseGetStatsResults(statsItem, type, isSender) {
|
|
531
|
+
var _this6 = this;
|
|
558
532
|
var types = _constants.DEFAULT_GET_STATS_FILTER.types;
|
|
559
|
-
|
|
533
|
+
|
|
534
|
+
// get the successful candidate pair before parsing stats.
|
|
535
|
+
statsItem.report.forEach(function (report) {
|
|
536
|
+
if (report.type === 'candidate-pair' && report.state === 'succeeded') {
|
|
537
|
+
_this6.successfulCandidatePair = report;
|
|
538
|
+
}
|
|
539
|
+
});
|
|
540
|
+
statsItem.report.forEach(function (result) {
|
|
560
541
|
if (types.includes(result.type)) {
|
|
561
|
-
|
|
542
|
+
_this6.parseGetStatsResult(result, type, isSender);
|
|
562
543
|
}
|
|
563
544
|
});
|
|
545
|
+
if (this.statsResults[type]) {
|
|
546
|
+
var _this$successfulCandi2, _this$statsResults;
|
|
547
|
+
this.statsResults[type].direction = statsItem.currentDirection;
|
|
548
|
+
this.statsResults[type].trackLabel = statsItem.localTrackLabel;
|
|
549
|
+
this.statsResults[type].csi = statsItem.csi;
|
|
550
|
+
this.extractAndSetLocalIpAddressInfoForDiagnostics((_this$successfulCandi2 = this.successfulCandidatePair) === null || _this$successfulCandi2 === void 0 ? void 0 : _this$successfulCandi2.localCandidateId, (_this$statsResults = this.statsResults) === null || _this$statsResults === void 0 ? void 0 : _this$statsResults.candidates);
|
|
551
|
+
// reset the successful candidate pair.
|
|
552
|
+
this.successfulCandidatePair = {};
|
|
553
|
+
}
|
|
564
554
|
}
|
|
565
555
|
|
|
566
556
|
/**
|
|
@@ -575,7 +565,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
575
565
|
if (!result) {
|
|
576
566
|
return;
|
|
577
567
|
}
|
|
578
|
-
if (type
|
|
568
|
+
if (type.includes('audio-send')) {
|
|
579
569
|
this.statsResults[type].send.audioLevel = result.audioLevel;
|
|
580
570
|
this.statsResults[type].send.totalAudioEnergy = result.totalAudioEnergy;
|
|
581
571
|
}
|
|
@@ -591,144 +581,133 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
591
581
|
* @returns {void}
|
|
592
582
|
*/
|
|
593
583
|
function compareLastStatsResult() {
|
|
584
|
+
var _this7 = this;
|
|
594
585
|
if (this.lastStatsResults !== null && this.meetingMediaStatus) {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
586
|
+
var getCurrentStatsTotals = function getCurrentStatsTotals(keyPrefix, value) {
|
|
587
|
+
return (0, _keys.default)(_this7.statsResults).filter(function (key) {
|
|
588
|
+
return key.startsWith(keyPrefix);
|
|
589
|
+
}).reduce(function (prev, cur) {
|
|
590
|
+
var _this7$statsResults$c;
|
|
591
|
+
return prev + (((_this7$statsResults$c = _this7.statsResults[cur]) === null || _this7$statsResults$c === void 0 ? void 0 : _this7$statsResults$c.recv[value]) || 0);
|
|
592
|
+
}, 0);
|
|
593
|
+
};
|
|
594
|
+
var getPreviousStatsTotals = function getPreviousStatsTotals(keyPrefix, value) {
|
|
595
|
+
return (0, _keys.default)(_this7.statsResults).filter(function (key) {
|
|
596
|
+
return key.startsWith(keyPrefix);
|
|
597
|
+
}).reduce(function (prev, cur) {
|
|
598
|
+
var _this7$lastStatsResul;
|
|
599
|
+
return prev + (((_this7$lastStatsResul = _this7.lastStatsResults[cur]) === null || _this7$lastStatsResul === void 0 ? void 0 : _this7$lastStatsResul.recv[value]) || 0);
|
|
600
|
+
}, 0);
|
|
601
|
+
};
|
|
602
|
+
if (this.meetingMediaStatus.expected.sendAudio && this.lastStatsResults['audio-send']) {
|
|
603
|
+
// compare audio stats sent
|
|
604
|
+
// NOTE: relies on there being only one sender.
|
|
605
|
+
var currentStats = this.statsResults['audio-send'].send;
|
|
606
|
+
var previousStats = this.lastStatsResults['audio-send'].send;
|
|
602
607
|
if (currentStats.totalPacketsSent === previousStats.totalPacketsSent || currentStats.totalPacketsSent === 0) {
|
|
603
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
608
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio RTP packets sent", currentStats.totalPacketsSent);
|
|
604
609
|
} else {
|
|
605
610
|
if (currentStats.totalAudioEnergy === previousStats.totalAudioEnergy || currentStats.totalAudioEnergy === 0) {
|
|
606
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
611
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio Energy present", currentStats.totalAudioEnergy);
|
|
607
612
|
}
|
|
608
613
|
if (currentStats.audioLevel === 0) {
|
|
609
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
614
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> audio level is 0 for the user");
|
|
610
615
|
}
|
|
611
616
|
}
|
|
612
|
-
this.emitStartStopEvents(
|
|
617
|
+
this.emitStartStopEvents('audio', previousStats.totalPacketsSent, currentStats.totalPacketsSent, true);
|
|
613
618
|
}
|
|
614
619
|
if (this.meetingMediaStatus.expected.receiveAudio) {
|
|
615
620
|
// compare audio stats received
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
621
|
+
var currentPacketsReceived = getCurrentStatsTotals('audio-recv', 'totalPacketsReceived');
|
|
622
|
+
var previousPacketsReceived = getPreviousStatsTotals('audio-recv', 'totalPacketsReceived');
|
|
623
|
+
var currentSamplesReceived = getCurrentStatsTotals('audio-recv', 'totalSamplesReceived');
|
|
624
|
+
var previousSamplesReceived = getPreviousStatsTotals('audio-recv', 'totalSamplesReceived');
|
|
625
|
+
if (currentPacketsReceived === previousPacketsReceived || currentPacketsReceived === 0) {
|
|
626
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio RTP packets received", currentPacketsReceived);
|
|
627
|
+
} else if (currentSamplesReceived === previousSamplesReceived || currentSamplesReceived === 0) {
|
|
628
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio samples received", currentSamplesReceived);
|
|
622
629
|
}
|
|
623
|
-
this.emitStartStopEvents(
|
|
630
|
+
this.emitStartStopEvents('audio', previousPacketsReceived, currentPacketsReceived, false);
|
|
624
631
|
}
|
|
625
|
-
|
|
626
|
-
if (this.meetingMediaStatus.expected.sendVideo) {
|
|
632
|
+
if (this.meetingMediaStatus.expected.sendVideo && this.lastStatsResults['video-send']) {
|
|
627
633
|
// compare video stats sent
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
if (
|
|
631
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
632
|
-
} else
|
|
633
|
-
if (
|
|
634
|
-
|
|
635
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No ".concat(mediaType, " Frames Encoded"));
|
|
636
|
-
this.emit({
|
|
637
|
-
file: 'statsAnalyzer',
|
|
638
|
-
function: 'compareLastStatsResult'
|
|
639
|
-
}, EVENTS.NO_VIDEO_ENCODED, {
|
|
640
|
-
mediaType: mediaType
|
|
641
|
-
});
|
|
642
|
-
}
|
|
643
|
-
if (this.statsResults.resolutions[mediaType].send.framesSent === this.lastStatsResults.resolutions[mediaType].send.framesSent || this.statsResults.resolutions[mediaType].send.framesSent === 0) {
|
|
644
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No ".concat(mediaType, " Frames sent"));
|
|
634
|
+
var _currentStats = this.statsResults['video-send'].send;
|
|
635
|
+
var _previousStats = this.lastStatsResults['video-send'].send;
|
|
636
|
+
if (_currentStats.totalPacketsSent === _previousStats.totalPacketsSent || _currentStats.totalPacketsSent === 0) {
|
|
637
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video RTP packets sent", _currentStats.totalPacketsSent);
|
|
638
|
+
} else {
|
|
639
|
+
if (_currentStats.framesEncoded === _previousStats.framesEncoded || _currentStats.framesEncoded === 0) {
|
|
640
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video Frames Encoded", _currentStats.framesEncoded);
|
|
645
641
|
}
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
if (currentStats.framesEncoded !== previousStats.framesEncoded && (currentStats.framesSent === previousStats.framesSent || currentStats.framesSent === 0)) {
|
|
649
|
-
this.lastEmittedStartStopEvent[mediaType].local = EVENTS.NO_FRAMES_SENT;
|
|
650
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No ".concat(mediaType, " frames sent even though frames are encoded"));
|
|
651
|
-
this.emit({
|
|
652
|
-
file: 'statsAnalyzer',
|
|
653
|
-
function: 'compareLastStatsResult'
|
|
654
|
-
}, EVENTS.NO_FRAMES_SENT, {
|
|
655
|
-
mediaType: mediaType
|
|
656
|
-
});
|
|
642
|
+
if (this.statsResults['video-send'].send.framesSent === this.lastStatsResults['video-send'].send.framesSent || this.statsResults['video-send'].send.framesSent === 0) {
|
|
643
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video Frames sent", this.statsResults['video-send'].send.framesSent);
|
|
657
644
|
}
|
|
658
645
|
}
|
|
659
|
-
this.emitStartStopEvents(
|
|
646
|
+
this.emitStartStopEvents('video', _previousStats.framesSent, _currentStats.framesSent, true);
|
|
660
647
|
}
|
|
661
648
|
if (this.meetingMediaStatus.expected.receiveVideo) {
|
|
662
|
-
// compare video stats
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
649
|
+
// compare video stats received
|
|
650
|
+
var _currentPacketsReceived = getCurrentStatsTotals('video-recv', 'totalPacketsReceived');
|
|
651
|
+
var _previousPacketsReceived = getPreviousStatsTotals('video-recv', 'totalPacketsReceived');
|
|
652
|
+
var currentFramesReceived = getCurrentStatsTotals('video-recv', 'framesReceived');
|
|
653
|
+
var previousFramesReceived = getPreviousStatsTotals('video-recv', 'framesReceived');
|
|
654
|
+
var currentFramesDecoded = getCurrentStatsTotals('video-recv', 'framesDecoded');
|
|
655
|
+
var previousFramesDecoded = getPreviousStatsTotals('video-recv', 'framesDecoded');
|
|
656
|
+
var currentFramesDropped = getCurrentStatsTotals('video-recv', 'framesDropped');
|
|
657
|
+
var previousFramesDropped = getPreviousStatsTotals('video-recv', 'framesDropped');
|
|
658
|
+
if (_currentPacketsReceived === _previousPacketsReceived || _currentPacketsReceived === 0) {
|
|
659
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video RTP packets received", _currentPacketsReceived);
|
|
668
660
|
} else {
|
|
669
|
-
if (
|
|
670
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
661
|
+
if (currentFramesReceived === previousFramesReceived || currentFramesReceived === 0) {
|
|
662
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video frames received", currentFramesReceived);
|
|
671
663
|
}
|
|
672
|
-
if (
|
|
673
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
664
|
+
if (currentFramesDecoded === previousFramesDecoded || currentFramesDecoded === 0) {
|
|
665
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video frames decoded", currentFramesDecoded);
|
|
674
666
|
}
|
|
675
|
-
if (
|
|
676
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
667
|
+
if (currentFramesDropped - previousFramesDropped > 10) {
|
|
668
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> video frames are getting dropped", currentFramesDropped - previousFramesDropped);
|
|
677
669
|
}
|
|
678
670
|
}
|
|
679
|
-
this.emitStartStopEvents(
|
|
671
|
+
this.emitStartStopEvents('video', previousFramesDecoded, currentFramesDecoded, false);
|
|
680
672
|
}
|
|
681
|
-
|
|
682
|
-
if (this.meetingMediaStatus.expected.sendShare) {
|
|
673
|
+
if (this.meetingMediaStatus.expected.sendShare && this.lastStatsResults['video-share-send']) {
|
|
683
674
|
// compare share stats sent
|
|
684
675
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
if (
|
|
688
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
689
|
-
} else
|
|
690
|
-
if (
|
|
691
|
-
|
|
692
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No ".concat(mediaType, " frames getting encoded"));
|
|
693
|
-
this.emit({
|
|
694
|
-
file: 'statsAnalyzer',
|
|
695
|
-
function: 'compareLastStatsResult'
|
|
696
|
-
}, EVENTS.NO_VIDEO_ENCODED, {
|
|
697
|
-
mediaType: mediaType
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
if (this.statsResults.resolutions[mediaType].send.framesSent === this.lastStatsResults.resolutions[mediaType].send.framesSent || this.statsResults.resolutions[mediaType].send.framesSent === 0) {
|
|
701
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No ".concat(mediaType, " frames sent"));
|
|
676
|
+
var _currentStats2 = this.statsResults['video-share-send'].send;
|
|
677
|
+
var _previousStats2 = this.lastStatsResults['video-share-send'].send;
|
|
678
|
+
if (_currentStats2.totalPacketsSent === _previousStats2.totalPacketsSent || _currentStats2.totalPacketsSent === 0) {
|
|
679
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share RTP packets sent", _currentStats2.totalPacketsSent);
|
|
680
|
+
} else {
|
|
681
|
+
if (_currentStats2.framesEncoded === _previousStats2.framesEncoded || _currentStats2.framesEncoded === 0) {
|
|
682
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames getting encoded", _currentStats2.framesEncoded);
|
|
702
683
|
}
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
if (currentStats.framesEncoded !== previousStats.framesEncoded && (currentStats.framesSent === previousStats.framesSent || currentStats.framesSent === 0)) {
|
|
706
|
-
this.lastEmittedStartStopEvent[mediaType].local = EVENTS.NO_FRAMES_SENT;
|
|
707
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No ".concat(mediaType, " Frames sent even though frames are being encoded"));
|
|
708
|
-
this.emit({
|
|
709
|
-
file: 'statsAnalyzer',
|
|
710
|
-
function: 'compareLastStatsResult'
|
|
711
|
-
}, EVENTS.NO_FRAMES_SENT, {
|
|
712
|
-
mediaType: mediaType
|
|
713
|
-
});
|
|
684
|
+
if (this.statsResults['video-share-send'].send.framesSent === this.lastStatsResults['video-share-send'].send.framesSent || this.statsResults['video-share-send'].send.framesSent === 0) {
|
|
685
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames sent", this.statsResults['video-share-send'].send.framesSent);
|
|
714
686
|
}
|
|
715
687
|
}
|
|
716
|
-
|
|
688
|
+
}
|
|
689
|
+
if (this.meetingMediaStatus.expected.sendShare) {
|
|
717
690
|
// TODO:need to check receive share value
|
|
718
|
-
// compare share stats
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
691
|
+
// compare share stats received
|
|
692
|
+
var _currentPacketsReceived2 = getCurrentStatsTotals('video-share-recv', 'totalPacketsReceived');
|
|
693
|
+
var _previousPacketsReceived2 = getPreviousStatsTotals('video-share-recv', 'totalPacketsReceived');
|
|
694
|
+
var _currentFramesReceived = getCurrentStatsTotals('video-share-recv', 'framesReceived');
|
|
695
|
+
var _previousFramesReceived = getPreviousStatsTotals('video-share-recv', 'framesReceived');
|
|
696
|
+
var _currentFramesDecoded = getCurrentStatsTotals('video-share-recv', 'framesDecoded');
|
|
697
|
+
var _previousFramesDecoded = getPreviousStatsTotals('video-share-recv', 'framesDecoded');
|
|
698
|
+
var _currentFramesDropped = getCurrentStatsTotals('video-share-recv', 'framesDropped');
|
|
699
|
+
var _previousFramesDropped = getPreviousStatsTotals('video-share-recv', 'framesDropped');
|
|
700
|
+
if (_currentPacketsReceived2 === _previousPacketsReceived2 || _currentPacketsReceived2 === 0) {
|
|
701
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share RTP packets received", _currentPacketsReceived2);
|
|
723
702
|
} else {
|
|
724
|
-
if (
|
|
725
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
703
|
+
if (_currentFramesReceived === _previousFramesReceived || _currentFramesReceived === 0) {
|
|
704
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames received", _currentFramesReceived);
|
|
726
705
|
}
|
|
727
|
-
if (
|
|
728
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
706
|
+
if (_currentFramesDecoded === _previousFramesDecoded || _currentFramesDecoded === 0) {
|
|
707
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames decoded", _currentFramesDecoded);
|
|
729
708
|
}
|
|
730
|
-
if (
|
|
731
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
709
|
+
if (_currentFramesDropped - _previousFramesDropped > 10) {
|
|
710
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> share frames are getting dropped", _currentFramesDropped - _previousFramesDropped);
|
|
732
711
|
}
|
|
733
712
|
}
|
|
734
713
|
|
|
@@ -749,39 +728,57 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
749
728
|
}, {
|
|
750
729
|
key: "getStatsAndParse",
|
|
751
730
|
value: function getStatsAndParse() {
|
|
752
|
-
var
|
|
753
|
-
if (!this.
|
|
731
|
+
var _this8 = this;
|
|
732
|
+
if (!this.mediaConnection) {
|
|
754
733
|
return _promise.default.resolve();
|
|
755
734
|
}
|
|
756
|
-
if (this.
|
|
757
|
-
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse -->
|
|
735
|
+
if (this.mediaConnection && this.mediaConnection.getConnectionState() === _internalMediaCore.ConnectionState.Failed) {
|
|
736
|
+
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> media connection is in failed state');
|
|
758
737
|
return _promise.default.resolve();
|
|
759
738
|
}
|
|
760
739
|
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> Collecting Stats');
|
|
761
|
-
return
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
740
|
+
return this.mediaConnection.getTransceiverStats().then(function (transceiverStats) {
|
|
741
|
+
transceiverStats.video.receivers.forEach(function (receiver, i) {
|
|
742
|
+
return _this8.filterAndParseGetStatsResults(receiver, "video-recv-".concat(i), false);
|
|
743
|
+
});
|
|
744
|
+
transceiverStats.audio.receivers.forEach(function (receiver, i) {
|
|
745
|
+
return _this8.filterAndParseGetStatsResults(receiver, "audio-recv-".concat(i), false);
|
|
746
|
+
});
|
|
747
|
+
transceiverStats.screenShareVideo.receivers.forEach(function (receiver, i) {
|
|
748
|
+
return _this8.filterAndParseGetStatsResults(receiver, "video-share-recv-".concat(i), false);
|
|
749
|
+
});
|
|
750
|
+
transceiverStats.screenShareAudio.receivers.forEach(function (receiver, i) {
|
|
751
|
+
return _this8.filterAndParseGetStatsResults(receiver, "audio-share-recv-".concat(i), false);
|
|
752
|
+
});
|
|
753
|
+
transceiverStats.video.senders.forEach(function (sender, i) {
|
|
754
|
+
if (i > 0) {
|
|
755
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
756
|
+
}
|
|
757
|
+
_this8.filterAndParseGetStatsResults(sender, 'video-send', true);
|
|
758
|
+
});
|
|
759
|
+
transceiverStats.audio.senders.forEach(function (sender, i) {
|
|
760
|
+
if (i > 0) {
|
|
761
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
762
|
+
}
|
|
763
|
+
_this8.filterAndParseGetStatsResults(sender, 'audio-send', true);
|
|
764
|
+
});
|
|
765
|
+
transceiverStats.screenShareVideo.senders.forEach(function (sender, i) {
|
|
766
|
+
if (i > 0) {
|
|
767
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
768
|
+
}
|
|
769
|
+
_this8.filterAndParseGetStatsResults(sender, 'video-share-send', true);
|
|
770
|
+
});
|
|
771
|
+
transceiverStats.screenShareAudio.senders.forEach(function (sender, i) {
|
|
772
|
+
if (i > 0) {
|
|
773
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
774
|
+
}
|
|
775
|
+
_this8.filterAndParseGetStatsResults(sender, 'audio-share-send', true);
|
|
776
|
+
});
|
|
777
|
+
_this8.compareLastStatsResult();
|
|
782
778
|
|
|
783
779
|
// Save the last results to compare with the current
|
|
784
|
-
|
|
780
|
+
// DO Deep copy, for some reason it takes the reference all the time rather then old value set
|
|
781
|
+
_this8.lastStatsResults = JSON.parse((0, _stringify.default)(_this8.statsResults));
|
|
785
782
|
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> Finished Collecting Stats');
|
|
786
783
|
});
|
|
787
784
|
}
|
|
@@ -790,39 +787,25 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
790
787
|
* Processes OutboundRTP stats result and stores
|
|
791
788
|
* @private
|
|
792
789
|
* @param {*} result
|
|
793
|
-
* @param {*}
|
|
790
|
+
* @param {*} mediaType
|
|
794
791
|
* @returns {void}
|
|
795
792
|
*/
|
|
796
793
|
}, {
|
|
797
794
|
key: "processOutboundRTPResult",
|
|
798
|
-
value: function processOutboundRTPResult(result,
|
|
799
|
-
var mediaType = type || _constants.STATS.AUDIO_CORRELATE;
|
|
795
|
+
value: function processOutboundRTPResult(result, mediaType) {
|
|
800
796
|
var sendrecvType = _constants.STATS.SEND_DIRECTION;
|
|
801
|
-
this.processTrackResult(result, type, sendrecvType);
|
|
802
797
|
if (result.bytesSent) {
|
|
803
798
|
var kilobytes = 0;
|
|
804
|
-
if (
|
|
805
|
-
this.statsResults
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
this.statsResults
|
|
809
|
-
}
|
|
810
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].keyFramesEncoded) {
|
|
811
|
-
this.statsResults.internal[mediaType][sendrecvType].keyFramesEncoded = result.keyFramesEncoded;
|
|
799
|
+
if (result.frameWidth && result.frameHeight) {
|
|
800
|
+
this.statsResults[mediaType][sendrecvType].width = result.frameWidth;
|
|
801
|
+
this.statsResults[mediaType][sendrecvType].height = result.frameHeight;
|
|
802
|
+
this.statsResults[mediaType][sendrecvType].framesSent = result.framesSent;
|
|
803
|
+
this.statsResults[mediaType][sendrecvType].hugeFramesSent = result.hugeFramesSent;
|
|
812
804
|
}
|
|
813
|
-
var bytes = result.bytesSent - this.statsResults.internal[mediaType][sendrecvType].prevBytesSent;
|
|
814
|
-
this.statsResults.internal[mediaType][sendrecvType].prevBytesSent = result.bytesSent;
|
|
815
|
-
kilobytes = bytes / 1024;
|
|
816
805
|
this.statsResults[mediaType][sendrecvType].availableBandwidth = kilobytes.toFixed(1);
|
|
817
|
-
this.statsResults[mediaType].
|
|
818
|
-
this.statsResults[mediaType][sendrecvType].
|
|
819
|
-
this.statsResults[mediaType][sendrecvType].
|
|
820
|
-
this.statsResults.internal[mediaType].outboundRtpId = result.id;
|
|
821
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].packetsSent) {
|
|
822
|
-
this.statsResults.internal[mediaType][sendrecvType].packetsSent = result.packetsSent;
|
|
823
|
-
}
|
|
824
|
-
this.statsResults[mediaType][sendrecvType].packetsSent = result.packetsSent - this.statsResults.internal[mediaType][sendrecvType].packetsSent;
|
|
825
|
-
this.statsResults.internal[mediaType][sendrecvType].packetsSent = result.packetsSent;
|
|
806
|
+
this.statsResults[mediaType][sendrecvType].framesEncoded = result.framesEncoded;
|
|
807
|
+
this.statsResults[mediaType][sendrecvType].keyFramesEncoded = result.keyFramesEncoded;
|
|
808
|
+
this.statsResults[mediaType][sendrecvType].packetsSent = result.packetsSent;
|
|
826
809
|
|
|
827
810
|
// Data saved to send MQA metrics
|
|
828
811
|
|
|
@@ -847,52 +830,41 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
847
830
|
* Processes InboundRTP stats result and stores
|
|
848
831
|
* @private
|
|
849
832
|
* @param {*} result
|
|
850
|
-
* @param {*}
|
|
833
|
+
* @param {*} mediaType
|
|
851
834
|
* @returns {void}
|
|
852
835
|
*/
|
|
853
836
|
}, {
|
|
854
837
|
key: "processInboundRTPResult",
|
|
855
|
-
value: function processInboundRTPResult(result,
|
|
856
|
-
var mediaType = type || _constants.STATS.AUDIO_CORRELATE;
|
|
838
|
+
value: function processInboundRTPResult(result, mediaType) {
|
|
857
839
|
var sendrecvType = _constants.STATS.RECEIVE_DIRECTION;
|
|
858
|
-
this.processTrackResult(result, type, sendrecvType);
|
|
859
840
|
if (result.bytesReceived) {
|
|
860
841
|
var kilobytes = 0;
|
|
861
|
-
|
|
862
|
-
|
|
842
|
+
var receiveSlot = this.receiveSlotCallback(result.ssrc);
|
|
843
|
+
var idAndCsi = receiveSlot ? "id: \"".concat(receiveSlot.id || '', "\"").concat(receiveSlot.csi ? " and csi: ".concat(receiveSlot.csi) : '') : '';
|
|
844
|
+
if (result.frameWidth && result.frameHeight) {
|
|
845
|
+
this.statsResults[mediaType][sendrecvType].width = result.frameWidth;
|
|
846
|
+
this.statsResults[mediaType][sendrecvType].height = result.frameHeight;
|
|
847
|
+
this.statsResults[mediaType][sendrecvType].framesReceived = result.framesReceived;
|
|
863
848
|
}
|
|
864
|
-
|
|
865
|
-
this.statsResults.internal[mediaType][sendrecvType].pliCount = result.pliCount;
|
|
866
|
-
}
|
|
867
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].packetsLost) {
|
|
868
|
-
this.statsResults.internal[mediaType][sendrecvType].packetsLost = result.packetsLost;
|
|
869
|
-
}
|
|
870
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].totalPacketsReceived) {
|
|
871
|
-
this.statsResults.internal[mediaType][sendrecvType].totalPacketsReceived = result.packetsReceived;
|
|
872
|
-
}
|
|
873
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].lastPacketReceivedTimestamp) {
|
|
874
|
-
this.statsResults.internal[mediaType][sendrecvType].lastPacketReceivedTimestamp = result.lastPacketReceivedTimestamp;
|
|
875
|
-
}
|
|
876
|
-
var bytes = result.bytesReceived - this.statsResults.internal[mediaType][sendrecvType].prevBytesReceived;
|
|
877
|
-
this.statsResults.internal[mediaType][sendrecvType].prevBytesReceived = result.bytesReceived;
|
|
849
|
+
var bytes = result.bytesReceived - this.statsResults[mediaType][sendrecvType].totalBytesReceived;
|
|
878
850
|
kilobytes = bytes / 1024;
|
|
879
851
|
this.statsResults[mediaType][sendrecvType].availableBandwidth = kilobytes.toFixed(1);
|
|
880
|
-
this.statsResults[mediaType].
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
if (this.statsResults[mediaType][sendrecvType].currentPacketsLost < 0) {
|
|
884
|
-
this.statsResults[mediaType][sendrecvType].currentPacketsLost = 0;
|
|
852
|
+
var currentPacketsLost = result.packetsLost - this.statsResults[mediaType][sendrecvType].totalPacketsLost;
|
|
853
|
+
if (currentPacketsLost < 0) {
|
|
854
|
+
currentPacketsLost = 0;
|
|
885
855
|
}
|
|
886
|
-
|
|
887
|
-
this.statsResults
|
|
888
|
-
if (
|
|
889
|
-
|
|
856
|
+
var currentPacketsReceived = result.packetsReceived - this.statsResults[mediaType][sendrecvType].totalPacketsReceived;
|
|
857
|
+
this.statsResults[mediaType][sendrecvType].totalPacketsReceived = result.packetsReceived;
|
|
858
|
+
if (currentPacketsReceived === 0) {
|
|
859
|
+
if (receiveSlot) {
|
|
860
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#processInboundRTPResult --> No packets received for receive slot ".concat(idAndCsi), currentPacketsReceived);
|
|
861
|
+
}
|
|
890
862
|
}
|
|
891
863
|
|
|
892
864
|
// Check the over all packet Lost ratio
|
|
893
|
-
this.statsResults[mediaType][sendrecvType].currentPacketLossRatio =
|
|
865
|
+
this.statsResults[mediaType][sendrecvType].currentPacketLossRatio = currentPacketsLost > 0 ? currentPacketsLost / (currentPacketsReceived + currentPacketsLost) : 0;
|
|
894
866
|
if (this.statsResults[mediaType][sendrecvType].currentPacketLossRatio > 3) {
|
|
895
|
-
_loggerProxy.default.logger.info(
|
|
867
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#processInboundRTPResult --> Packets getting lost from the receiver with slot ".concat(idAndCsi), this.statsResults[mediaType][sendrecvType].currentPacketLossRatio);
|
|
896
868
|
}
|
|
897
869
|
|
|
898
870
|
// TODO: check the packet loss value is negative values here
|
|
@@ -927,49 +899,8 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
927
899
|
}
|
|
928
900
|
}
|
|
929
901
|
}, {
|
|
930
|
-
key: "
|
|
902
|
+
key: "compareSentAndReceived",
|
|
931
903
|
value:
|
|
932
|
-
/**
|
|
933
|
-
* Process Track results
|
|
934
|
-
*
|
|
935
|
-
* @private
|
|
936
|
-
* @param {*} result
|
|
937
|
-
* @param {*} mediaType
|
|
938
|
-
* @param {*} sendrecvType
|
|
939
|
-
* @returns {void}
|
|
940
|
-
* @memberof StatsAnalyzer
|
|
941
|
-
*/
|
|
942
|
-
function processTrackResult(result, mediaType, sendrecvType) {
|
|
943
|
-
if (!result || mediaType === _constants.STATS.AUDIO_CORRELATE) {
|
|
944
|
-
return;
|
|
945
|
-
}
|
|
946
|
-
if (result.type !== 'inbound-rtp' && result.type !== 'outbound-rtp') {
|
|
947
|
-
return;
|
|
948
|
-
}
|
|
949
|
-
if (result.frameWidth && result.frameHeight) {
|
|
950
|
-
this.statsResults.resolutions[mediaType][sendrecvType].width = result.frameWidth;
|
|
951
|
-
this.statsResults.resolutions[mediaType][sendrecvType].height = result.frameHeight;
|
|
952
|
-
}
|
|
953
|
-
if (sendrecvType === _constants.STATS.RECEIVE_DIRECTION) {
|
|
954
|
-
this.statsResults.resolutions[mediaType][sendrecvType].framesReceived = result.framesReceived;
|
|
955
|
-
this.statsResults.resolutions[mediaType][sendrecvType].framesDecoded = result.framesDecoded;
|
|
956
|
-
this.statsResults.resolutions[mediaType][sendrecvType].framesDropped = result.framesDropped;
|
|
957
|
-
} else if (sendrecvType === _constants.STATS.SEND_DIRECTION) {
|
|
958
|
-
this.statsResults.resolutions[mediaType][sendrecvType].framesSent = result.framesSent;
|
|
959
|
-
this.statsResults.resolutions[mediaType][sendrecvType].hugeFramesSent = result.hugeFramesSent;
|
|
960
|
-
}
|
|
961
|
-
if (result.trackIdentifier && mediaType !== _constants.STATS.AUDIO_CORRELATE) {
|
|
962
|
-
this.statsResults.resolutions[mediaType][sendrecvType].trackIdentifier = result.trackIdentifier;
|
|
963
|
-
var jitterBufferDelay = result && result.jitterBufferDelay;
|
|
964
|
-
var jitterBufferEmittedCount = result && result.jitterBufferEmittedCount;
|
|
965
|
-
this.statsResults.resolutions[mediaType][sendrecvType].avgJitterDelay = jitterBufferEmittedCount && +jitterBufferDelay / +jitterBufferEmittedCount;
|
|
966
|
-
|
|
967
|
-
// Used to calculate the jitter
|
|
968
|
-
this.statsResults.resolutions[mediaType][sendrecvType].jitterBufferDelay = result.jitterBufferDelay;
|
|
969
|
-
this.statsResults.resolutions[mediaType][sendrecvType].jitterBufferEmittedCount = result.jitterBufferEmittedCount;
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
|
|
973
904
|
/**
|
|
974
905
|
*
|
|
975
906
|
* @private
|
|
@@ -978,18 +909,13 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
978
909
|
* @returns {void}
|
|
979
910
|
* @memberof StatsAnalyzer
|
|
980
911
|
*/
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
if (!type) {
|
|
912
|
+
function compareSentAndReceived(result, type) {
|
|
913
|
+
// Don't compare on transceivers without a sender.
|
|
914
|
+
if (!type || !this.statsResults[type].send) {
|
|
985
915
|
return;
|
|
986
916
|
}
|
|
987
917
|
var mediaType = type;
|
|
988
|
-
|
|
989
|
-
this.statsResults.internal[mediaType].send.totalPacketsLostOnReceiver = result.packetsLost;
|
|
990
|
-
}
|
|
991
|
-
var currentPacketLoss = result.packetsLost - this.statsResults.internal[mediaType].send.totalPacketsLostOnReceiver;
|
|
992
|
-
this.statsResults.internal[mediaType].send.totalPacketsLostOnReceiver = result.packetsLost;
|
|
918
|
+
var currentPacketLoss = result.packetsLost - this.statsResults[mediaType].send.totalPacketsLostOnReceiver;
|
|
993
919
|
this.statsResults[mediaType].send.packetsLostOnReceiver = currentPacketLoss;
|
|
994
920
|
this.statsResults[mediaType].send.totalPacketsLostOnReceiver = result.packetsLost;
|
|
995
921
|
this.statsResults[mediaType].send.meanRemoteJitter.push(result.jitter);
|
|
@@ -1015,5 +941,4 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
1015
941
|
}]);
|
|
1016
942
|
return StatsAnalyzer;
|
|
1017
943
|
}(_eventsScope.default);
|
|
1018
|
-
exports.StatsAnalyzer = StatsAnalyzer;
|
|
1019
944
|
//# sourceMappingURL=index.js.map
|