@webex/plugin-meetings 2.59.8 → 2.60.0-next.10
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-errors.d.ts +60 -0
- package/dist/common/errors/reclaim-host-role-errors.js +154 -0
- 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 +5 -7
- package/dist/config.js +8 -11
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +243 -97
- package/dist/constants.js +437 -435
- 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 +116 -4
- package/dist/index.js.map +1 -1
- 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 +4728 -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 +103 -21
- package/dist/meetings/index.js +486 -124
- 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 +14 -1
- package/dist/member/index.js +54 -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 +131 -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 +57 -2
- package/dist/members/index.js +174 -10
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.d.ts +73 -9
- package/dist/members/request.js +108 -41
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.d.ts +25 -0
- package/dist/members/types.js +14 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.d.ts +214 -1
- package/dist/members/util.js +327 -234
- 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/index.d.ts +62 -7
- package/dist/reachability/index.js +265 -72
- 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/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 +28 -30
- package/dist/statsAnalyzer/index.js +374 -509
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +8 -6
- package/dist/statsAnalyzer/mqaUtil.js +116 -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 +35 -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/reclaim-host-role-errors.ts +134 -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 +5 -7
- package/src/constants.ts +271 -93
- 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 +40 -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 +3895 -2448
- 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 +486 -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 +52 -1
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +139 -28
- package/src/members/collection.ts +8 -0
- package/src/members/index.ts +196 -7
- package/src/members/request.ts +97 -17
- package/src/members/types.ts +29 -0
- package/src/members/util.ts +333 -240
- 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/index.ts +238 -45
- package/src/reachability/request.ts +17 -8
- 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 +413 -642
- package/src/statsAnalyzer/mqaUtil.ts +111 -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/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 +8181 -2770
- 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 +1284 -217
- package/test/unit/spec/meetings/utils.js +202 -2
- package/test/unit/spec/member/index.js +38 -8
- package/test/unit/spec/member/util.js +499 -29
- package/test/unit/spec/members/index.js +597 -3
- package/test/unit/spec/members/request.js +206 -27
- package/test/unit/spec/members/utils.js +210 -0
- 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/index.ts +598 -24
- package/test/unit/spec/reachability/request.js +68 -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 +232 -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 +188 -174
- 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/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
|
@@ -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,16 @@ 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), "receiveSlotCallback", void 0);
|
|
77
94
|
/**
|
|
78
95
|
* emits started/stopped events for local/remote media by checking
|
|
79
96
|
* if given values are increasing or not. The previousValue, currentValue
|
|
@@ -97,11 +114,14 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
97
114
|
if (previousValue === undefined) previousValue = 0;
|
|
98
115
|
// eslint-disable-next-line no-param-reassign
|
|
99
116
|
if (currentValue === undefined) currentValue = 0;
|
|
117
|
+
if (!_this.lastEmittedStartStopEvent[mediaType]) {
|
|
118
|
+
_this.lastEmittedStartStopEvent[mediaType] = {};
|
|
119
|
+
}
|
|
100
120
|
var lastEmittedEvent = isLocal ? _this.lastEmittedStartStopEvent[mediaType].local : _this.lastEmittedStartStopEvent[mediaType].remote;
|
|
101
121
|
var newEvent;
|
|
102
122
|
if (currentValue - previousValue > 0) {
|
|
103
123
|
newEvent = isLocal ? EVENTS.LOCAL_MEDIA_STARTED : EVENTS.REMOTE_MEDIA_STARTED;
|
|
104
|
-
} else if (currentValue === previousValue && currentValue
|
|
124
|
+
} else if (currentValue === previousValue && currentValue > 0) {
|
|
105
125
|
newEvent = isLocal ? EVENTS.LOCAL_MEDIA_STOPPED : EVENTS.REMOTE_MEDIA_STOPPED;
|
|
106
126
|
}
|
|
107
127
|
if (newEvent && lastEmittedEvent !== newEvent) {
|
|
@@ -129,56 +149,42 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
129
149
|
* @returns {void}
|
|
130
150
|
*/
|
|
131
151
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "parseCandidate", function (result, type, isSender, isRemote) {
|
|
152
|
+
var _this$successfulCandi;
|
|
132
153
|
if (!result || !result.id) {
|
|
133
154
|
return;
|
|
134
155
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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());
|
|
156
|
+
|
|
157
|
+
// We only care about the successful local candidate
|
|
158
|
+
if (((_this$successfulCandi = _this.successfulCandidatePair) === null || _this$successfulCandi === void 0 ? void 0 : _this$successfulCandi.localCandidateId) !== result.id) {
|
|
159
|
+
return;
|
|
159
160
|
}
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
var transport;
|
|
162
|
+
if (result.relayProtocol) {
|
|
163
|
+
transport = result.relayProtocol.toUpperCase();
|
|
164
|
+
} else if (result.protocol) {
|
|
165
|
+
transport = result.protocol.toUpperCase();
|
|
162
166
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
167
|
+
var sendRecvType = isSender ? _constants.STATS.SEND_DIRECTION : _constants.STATS.RECEIVE_DIRECTION;
|
|
168
|
+
var ipType = isRemote ? _constants.STATS.REMOTE : _constants.STATS.LOCAL;
|
|
169
|
+
if (!_this.statsResults.candidates) {
|
|
170
|
+
_this.statsResults.candidates = {};
|
|
166
171
|
}
|
|
167
|
-
_this.statsResults.
|
|
168
|
-
candidateType:
|
|
169
|
-
ipAddress:
|
|
172
|
+
_this.statsResults.candidates[result.id] = {
|
|
173
|
+
candidateType: result.candidateType,
|
|
174
|
+
ipAddress: result.ip,
|
|
175
|
+
// TODO: add ports
|
|
170
176
|
portNumber: result.port,
|
|
171
|
-
networkType:
|
|
177
|
+
networkType: result.networkType,
|
|
172
178
|
priority: result.priority,
|
|
173
|
-
transport:
|
|
179
|
+
transport: transport,
|
|
174
180
|
timestamp: result.time,
|
|
175
181
|
id: result.id,
|
|
176
182
|
type: result.type
|
|
177
183
|
};
|
|
178
|
-
_this.statsResults.connectionType[ipType].candidateType =
|
|
179
|
-
_this.statsResults.connectionType[ipType].ipAddress =
|
|
180
|
-
_this.statsResults.connectionType[ipType].networkType =
|
|
181
|
-
_this.statsResults.connectionType[ipType].transport =
|
|
184
|
+
_this.statsResults.connectionType[ipType].candidateType = result.candidateType;
|
|
185
|
+
_this.statsResults.connectionType[ipType].ipAddress = result.ipAddress;
|
|
186
|
+
_this.statsResults.connectionType[ipType].networkType = result.networkType === _constants.NETWORK_TYPE.VPN ? _constants.NETWORK_TYPE.UNKNOWN : result.networkType;
|
|
187
|
+
_this.statsResults.connectionType[ipType].transport = transport;
|
|
182
188
|
_this.statsResults[type][sendRecvType].totalRoundTripTime = result.totalRoundTripTime;
|
|
183
189
|
});
|
|
184
190
|
_this.statsStarted = false;
|
|
@@ -188,141 +194,33 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
188
194
|
_this.networkQualityMonitor = networkQualityMonitor;
|
|
189
195
|
_this.correlationId = config.correlationId;
|
|
190
196
|
_this.mqaSentCount = -1;
|
|
191
|
-
_this.lastMqaDataSent = {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
recv: {}
|
|
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
|
-
};
|
|
197
|
+
_this.lastMqaDataSent = {};
|
|
198
|
+
_this.lastEmittedStartStopEvent = {};
|
|
199
|
+
_this.receiveSlotCallback = receiveSlotCallback;
|
|
200
|
+
_this.successfulCandidatePair = {};
|
|
273
201
|
return _this;
|
|
274
202
|
}
|
|
275
|
-
(0, _createClass2.default)(StatsAnalyzer, [{
|
|
276
|
-
key: "populateResults",
|
|
277
|
-
value: function populateResults(lastMqa) {
|
|
278
|
-
// Audio
|
|
279
203
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
// Video
|
|
290
|
-
|
|
291
|
-
this.localMQEStats.video.RX.packetsLost.push(lastMqa.videoReceive[0].common.mediaHopByHopLost);
|
|
292
|
-
this.localMQEStats.video.RX.jitter.push(lastMqa.videoReceive[0].streams[0].common.rtpJitter);
|
|
293
|
-
this.localMQEStats.video.RX.latency.push(lastMqa.videoReceive[0].streams[0].common.roundTripTime);
|
|
294
|
-
this.localMQEStats.video.RX.bitRate.push(lastMqa.videoReceive[0].streams[0].common.receivedBitrate);
|
|
295
|
-
this.localMQEStats.video.RX.frameRate.push(lastMqa.videoReceive[0].streams[0].common.receivedFrameRate);
|
|
296
|
-
this.localMQEStats.video.RX.resolutionWidth.push(lastMqa.videoReceive[0].streams[0].receivedWidth);
|
|
297
|
-
this.localMQEStats.video.RX.resolutionHeight.push(lastMqa.videoReceive[0].streams[0].receivedHeight);
|
|
298
|
-
this.localMQEStats.video.RX.requestedKeyFrame.push();
|
|
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
|
-
}, {
|
|
204
|
+
/**
|
|
205
|
+
* Resets cumulative stats arrays.
|
|
206
|
+
*
|
|
207
|
+
* @public
|
|
208
|
+
* @memberof StatsAnalyzer
|
|
209
|
+
* @returns {void}
|
|
210
|
+
*/
|
|
211
|
+
(0, _createClass2.default)(StatsAnalyzer, [{
|
|
311
212
|
key: "resetStatsResults",
|
|
312
213
|
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 = [];
|
|
214
|
+
var _this2 = this;
|
|
215
|
+
(0, _keys.default)(this.statsResults).forEach(function (mediaType) {
|
|
216
|
+
if (mediaType.includes('recv')) {
|
|
217
|
+
_this2.statsResults[mediaType].recv.meanRtpJitter = [];
|
|
218
|
+
}
|
|
219
|
+
if (mediaType.includes('send')) {
|
|
220
|
+
_this2.statsResults[mediaType].send.meanRemoteJitter = [];
|
|
221
|
+
_this2.statsResults[mediaType].send.meanRoundTripTime = [];
|
|
222
|
+
}
|
|
223
|
+
});
|
|
326
224
|
}
|
|
327
225
|
|
|
328
226
|
/**
|
|
@@ -340,7 +238,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
340
238
|
}
|
|
341
239
|
|
|
342
240
|
/**
|
|
343
|
-
* captures MQA data from
|
|
241
|
+
* captures MQA data from media connection
|
|
344
242
|
*
|
|
345
243
|
* @public
|
|
346
244
|
* @memberof StatsAnalyzer
|
|
@@ -349,96 +247,105 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
349
247
|
}, {
|
|
350
248
|
key: "sendMqaData",
|
|
351
249
|
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
|
-
|
|
250
|
+
var _this3 = this;
|
|
251
|
+
var newMqa = (0, _lodash.cloneDeep)(_config.emptyMqaInterval);
|
|
252
|
+
(0, _keys.default)(this.statsResults).forEach(function (mediaType) {
|
|
253
|
+
if (!_this3.lastMqaDataSent[mediaType]) {
|
|
254
|
+
_this3.lastMqaDataSent[mediaType] = {};
|
|
255
|
+
}
|
|
256
|
+
if (!_this3.lastMqaDataSent[mediaType].send && mediaType.includes('-send')) {
|
|
257
|
+
_this3.lastMqaDataSent[mediaType].send = {};
|
|
258
|
+
}
|
|
259
|
+
if (!_this3.lastMqaDataSent[mediaType].recv && mediaType.includes('-recv')) {
|
|
260
|
+
_this3.lastMqaDataSent[mediaType].recv = {};
|
|
261
|
+
}
|
|
262
|
+
if (mediaType.includes('audio-send') || mediaType.includes('audio-share-send')) {
|
|
263
|
+
var audioSender = (0, _lodash.cloneDeep)(_config.emptyAudioTransmit);
|
|
264
|
+
(0, _mqaUtil.getAudioSenderMqa)({
|
|
265
|
+
audioSender: audioSender,
|
|
266
|
+
statsResults: _this3.statsResults,
|
|
267
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
268
|
+
mediaType: mediaType
|
|
269
|
+
});
|
|
270
|
+
newMqa.audioTransmit.push(audioSender);
|
|
271
|
+
_this3.lastMqaDataSent[mediaType].send = (0, _lodash.cloneDeep)(_this3.statsResults[mediaType].send);
|
|
272
|
+
} else if (mediaType.includes('audio-recv') || mediaType.includes('audio-share-recv')) {
|
|
273
|
+
var audioReceiver = (0, _lodash.cloneDeep)(_config.emptyAudioReceive);
|
|
274
|
+
(0, _mqaUtil.getAudioReceiverMqa)({
|
|
275
|
+
audioReceiver: audioReceiver,
|
|
276
|
+
statsResults: _this3.statsResults,
|
|
277
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
278
|
+
mediaType: mediaType
|
|
279
|
+
});
|
|
280
|
+
newMqa.audioReceive.push(audioReceiver);
|
|
281
|
+
_this3.lastMqaDataSent[mediaType].recv = (0, _lodash.cloneDeep)(_this3.statsResults[mediaType].recv);
|
|
282
|
+
} else if (mediaType.includes('video-send') || mediaType.includes('video-share-send')) {
|
|
283
|
+
var videoSender = (0, _lodash.cloneDeep)(_config.emptyVideoTransmit);
|
|
284
|
+
(0, _mqaUtil.getVideoSenderMqa)({
|
|
285
|
+
videoSender: videoSender,
|
|
286
|
+
statsResults: _this3.statsResults,
|
|
287
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
288
|
+
mediaType: mediaType
|
|
289
|
+
});
|
|
290
|
+
newMqa.videoTransmit.push(videoSender);
|
|
291
|
+
_this3.lastMqaDataSent[mediaType].send = (0, _lodash.cloneDeep)(_this3.statsResults[mediaType].send);
|
|
292
|
+
} else if (mediaType.includes('video-recv') || mediaType.includes('video-share-recv')) {
|
|
293
|
+
var videoReceiver = (0, _lodash.cloneDeep)(_config.emptyVideoReceive);
|
|
294
|
+
(0, _mqaUtil.getVideoReceiverMqa)({
|
|
295
|
+
videoReceiver: videoReceiver,
|
|
296
|
+
statsResults: _this3.statsResults,
|
|
297
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
298
|
+
mediaType: mediaType
|
|
299
|
+
});
|
|
300
|
+
newMqa.videoReceive.push(videoReceiver);
|
|
301
|
+
_this3.lastMqaDataSent[mediaType].recv = (0, _lodash.cloneDeep)(_this3.statsResults[mediaType].recv);
|
|
302
|
+
}
|
|
393
303
|
});
|
|
394
|
-
|
|
304
|
+
newMqa.intervalMetadata.peerReflexiveIP = this.statsResults.connectionType.local.ipAddress;
|
|
395
305
|
|
|
396
306
|
// Adding peripheral information
|
|
397
|
-
|
|
398
|
-
_config.default.intervals[0].intervalMetadata.peripherals.push({
|
|
307
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
399
308
|
information: _constants._UNKNOWN_,
|
|
400
309
|
name: _constants.MEDIA_DEVICES.SPEAKER
|
|
401
310
|
});
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
311
|
+
if (this.statsResults['audio-send']) {
|
|
312
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
313
|
+
information: this.statsResults['audio-send'].trackLabel || _constants._UNKNOWN_,
|
|
314
|
+
name: _constants.MEDIA_DEVICES.MICROPHONE
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
if (this.statsResults['video-send']) {
|
|
318
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
319
|
+
information: this.statsResults['video-send'].trackLabel || _constants._UNKNOWN_,
|
|
320
|
+
name: _constants.MEDIA_DEVICES.CAMERA
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
newMqa.networkType = this.statsResults.connectionType.local.networkType;
|
|
413
324
|
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]);
|
|
325
|
+
newMqa.intervalNumber = this.mqaSentCount;
|
|
419
326
|
this.resetStatsResults();
|
|
420
327
|
this.emit({
|
|
421
328
|
file: 'statsAnalyzer',
|
|
422
329
|
function: 'sendMqaData'
|
|
423
330
|
}, EVENTS.MEDIA_QUALITY, {
|
|
424
|
-
data:
|
|
331
|
+
data: newMqa,
|
|
425
332
|
// @ts-ignore
|
|
426
|
-
networkType:
|
|
333
|
+
networkType: newMqa.networkType
|
|
427
334
|
});
|
|
428
335
|
}
|
|
429
336
|
|
|
430
337
|
/**
|
|
431
|
-
* updated the
|
|
338
|
+
* updated the media connection when changed
|
|
432
339
|
*
|
|
433
340
|
* @private
|
|
434
|
-
* @memberof
|
|
435
|
-
* @param {
|
|
341
|
+
* @memberof StatsAnalyzer
|
|
342
|
+
* @param {RoapMediaConnection} mediaConnection
|
|
436
343
|
* @returns {void}
|
|
437
344
|
*/
|
|
438
345
|
}, {
|
|
439
|
-
key: "
|
|
440
|
-
value: function
|
|
441
|
-
this.
|
|
346
|
+
key: "updateMediaConnection",
|
|
347
|
+
value: function updateMediaConnection(mediaConnection) {
|
|
348
|
+
this.mediaConnection = mediaConnection;
|
|
442
349
|
}
|
|
443
350
|
|
|
444
351
|
/**
|
|
@@ -446,24 +353,24 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
446
353
|
*
|
|
447
354
|
* @public
|
|
448
355
|
* @memberof StatsAnalyzer
|
|
449
|
-
* @param {
|
|
356
|
+
* @param {RoapMediaConnection} mediaConnection
|
|
450
357
|
* @returns {Promise}
|
|
451
358
|
*/
|
|
452
359
|
}, {
|
|
453
360
|
key: "startAnalyzer",
|
|
454
|
-
value: function startAnalyzer(
|
|
455
|
-
var
|
|
361
|
+
value: function startAnalyzer(mediaConnection) {
|
|
362
|
+
var _this4 = this;
|
|
456
363
|
if (!this.statsStarted) {
|
|
457
364
|
this.statsStarted = true;
|
|
458
|
-
this.
|
|
365
|
+
this.mediaConnection = mediaConnection;
|
|
459
366
|
return this.getStatsAndParse().then(function () {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
},
|
|
367
|
+
_this4.statsInterval = setInterval(function () {
|
|
368
|
+
_this4.getStatsAndParse();
|
|
369
|
+
}, _this4.config.analyzerInterval);
|
|
463
370
|
// Trigger initial fetch
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
371
|
+
_this4.sendMqaData();
|
|
372
|
+
_this4.mqaInterval = setInterval(function () {
|
|
373
|
+
_this4.sendMqaData();
|
|
467
374
|
}, _constants.MQA_INTEVAL);
|
|
468
375
|
});
|
|
469
376
|
}
|
|
@@ -480,7 +387,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
480
387
|
}, {
|
|
481
388
|
key: "stopAnalyzer",
|
|
482
389
|
value: function stopAnalyzer() {
|
|
483
|
-
var
|
|
390
|
+
var _this5 = this;
|
|
484
391
|
var sendOneLastMqa = this.mqaInterval && this.statsInterval;
|
|
485
392
|
if (this.statsInterval) {
|
|
486
393
|
clearInterval(this.statsInterval);
|
|
@@ -492,8 +399,8 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
492
399
|
}
|
|
493
400
|
if (sendOneLastMqa) {
|
|
494
401
|
return this.getStatsAndParse().then(function () {
|
|
495
|
-
|
|
496
|
-
|
|
402
|
+
_this5.sendMqaData();
|
|
403
|
+
_this5.mediaConnection = null;
|
|
497
404
|
});
|
|
498
405
|
}
|
|
499
406
|
return _promise.default.resolve();
|
|
@@ -515,6 +422,16 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
515
422
|
if (!getStatsResult) {
|
|
516
423
|
return;
|
|
517
424
|
}
|
|
425
|
+
|
|
426
|
+
// Generate empty stats results
|
|
427
|
+
if (!this.statsResults[type]) {
|
|
428
|
+
this.statsResults[type] = {};
|
|
429
|
+
}
|
|
430
|
+
if (isSender && !this.statsResults[type].send) {
|
|
431
|
+
this.statsResults[type].send = (0, _lodash.cloneDeep)(emptySender);
|
|
432
|
+
} else if (!isSender && !this.statsResults[type].recv) {
|
|
433
|
+
this.statsResults[type].recv = (0, _lodash.cloneDeep)(emptyReceiver);
|
|
434
|
+
}
|
|
518
435
|
switch (getStatsResult.type) {
|
|
519
436
|
case 'outbound-rtp':
|
|
520
437
|
this.processOutboundRTPResult(getStatsResult, type);
|
|
@@ -524,8 +441,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
524
441
|
break;
|
|
525
442
|
case 'remote-inbound-rtp':
|
|
526
443
|
case 'remote-outbound-rtp':
|
|
527
|
-
|
|
528
|
-
this.compareSentAndReceived(getStatsResult, type, isSender);
|
|
444
|
+
this.compareSentAndReceived(getStatsResult, type);
|
|
529
445
|
break;
|
|
530
446
|
case 'remotecandidate':
|
|
531
447
|
case 'remote-candidate':
|
|
@@ -546,21 +462,35 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
546
462
|
/**
|
|
547
463
|
* Filters the get stats results for types
|
|
548
464
|
* @private
|
|
549
|
-
* @param {Array}
|
|
465
|
+
* @param {Array} statsItem
|
|
550
466
|
* @param {String} type
|
|
551
467
|
* @param {boolean} isSender
|
|
552
468
|
* @returns {void}
|
|
553
469
|
*/
|
|
554
470
|
}, {
|
|
555
471
|
key: "filterAndParseGetStatsResults",
|
|
556
|
-
value: function filterAndParseGetStatsResults(
|
|
557
|
-
var
|
|
472
|
+
value: function filterAndParseGetStatsResults(statsItem, type, isSender) {
|
|
473
|
+
var _this6 = this;
|
|
558
474
|
var types = _constants.DEFAULT_GET_STATS_FILTER.types;
|
|
559
|
-
|
|
475
|
+
|
|
476
|
+
// get the successful candidate pair before parsing stats.
|
|
477
|
+
statsItem.report.forEach(function (report) {
|
|
478
|
+
if (report.type === 'candidate-pair' && report.state === 'succeeded') {
|
|
479
|
+
_this6.successfulCandidatePair = report;
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
statsItem.report.forEach(function (result) {
|
|
560
483
|
if (types.includes(result.type)) {
|
|
561
|
-
|
|
484
|
+
_this6.parseGetStatsResult(result, type, isSender);
|
|
562
485
|
}
|
|
563
486
|
});
|
|
487
|
+
if (this.statsResults[type]) {
|
|
488
|
+
this.statsResults[type].direction = statsItem.currentDirection;
|
|
489
|
+
this.statsResults[type].trackLabel = statsItem.localTrackLabel;
|
|
490
|
+
this.statsResults[type].csi = statsItem.csi;
|
|
491
|
+
// reset the successful candidate pair.
|
|
492
|
+
this.successfulCandidatePair = {};
|
|
493
|
+
}
|
|
564
494
|
}
|
|
565
495
|
|
|
566
496
|
/**
|
|
@@ -575,7 +505,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
575
505
|
if (!result) {
|
|
576
506
|
return;
|
|
577
507
|
}
|
|
578
|
-
if (type
|
|
508
|
+
if (type.includes('audio-send')) {
|
|
579
509
|
this.statsResults[type].send.audioLevel = result.audioLevel;
|
|
580
510
|
this.statsResults[type].send.totalAudioEnergy = result.totalAudioEnergy;
|
|
581
511
|
}
|
|
@@ -591,144 +521,133 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
591
521
|
* @returns {void}
|
|
592
522
|
*/
|
|
593
523
|
function compareLastStatsResult() {
|
|
524
|
+
var _this7 = this;
|
|
594
525
|
if (this.lastStatsResults !== null && this.meetingMediaStatus) {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
526
|
+
var getCurrentStatsTotals = function getCurrentStatsTotals(keyPrefix, value) {
|
|
527
|
+
return (0, _keys.default)(_this7.statsResults).filter(function (key) {
|
|
528
|
+
return key.startsWith(keyPrefix);
|
|
529
|
+
}).reduce(function (prev, cur) {
|
|
530
|
+
var _this7$statsResults$c;
|
|
531
|
+
return prev + (((_this7$statsResults$c = _this7.statsResults[cur]) === null || _this7$statsResults$c === void 0 ? void 0 : _this7$statsResults$c.recv[value]) || 0);
|
|
532
|
+
}, 0);
|
|
533
|
+
};
|
|
534
|
+
var getPreviousStatsTotals = function getPreviousStatsTotals(keyPrefix, value) {
|
|
535
|
+
return (0, _keys.default)(_this7.statsResults).filter(function (key) {
|
|
536
|
+
return key.startsWith(keyPrefix);
|
|
537
|
+
}).reduce(function (prev, cur) {
|
|
538
|
+
var _this7$lastStatsResul;
|
|
539
|
+
return prev + (((_this7$lastStatsResul = _this7.lastStatsResults[cur]) === null || _this7$lastStatsResul === void 0 ? void 0 : _this7$lastStatsResul.recv[value]) || 0);
|
|
540
|
+
}, 0);
|
|
541
|
+
};
|
|
542
|
+
if (this.meetingMediaStatus.expected.sendAudio && this.lastStatsResults['audio-send']) {
|
|
543
|
+
// compare audio stats sent
|
|
544
|
+
// NOTE: relies on there being only one sender.
|
|
545
|
+
var currentStats = this.statsResults['audio-send'].send;
|
|
546
|
+
var previousStats = this.lastStatsResults['audio-send'].send;
|
|
602
547
|
if (currentStats.totalPacketsSent === previousStats.totalPacketsSent || currentStats.totalPacketsSent === 0) {
|
|
603
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
548
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio RTP packets sent", currentStats.totalPacketsSent);
|
|
604
549
|
} else {
|
|
605
550
|
if (currentStats.totalAudioEnergy === previousStats.totalAudioEnergy || currentStats.totalAudioEnergy === 0) {
|
|
606
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
551
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio Energy present", currentStats.totalAudioEnergy);
|
|
607
552
|
}
|
|
608
553
|
if (currentStats.audioLevel === 0) {
|
|
609
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
554
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> audio level is 0 for the user");
|
|
610
555
|
}
|
|
611
556
|
}
|
|
612
|
-
this.emitStartStopEvents(
|
|
557
|
+
this.emitStartStopEvents('audio', previousStats.totalPacketsSent, currentStats.totalPacketsSent, true);
|
|
613
558
|
}
|
|
614
559
|
if (this.meetingMediaStatus.expected.receiveAudio) {
|
|
615
560
|
// compare audio stats received
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
561
|
+
var currentPacketsReceived = getCurrentStatsTotals('audio-recv', 'totalPacketsReceived');
|
|
562
|
+
var previousPacketsReceived = getPreviousStatsTotals('audio-recv', 'totalPacketsReceived');
|
|
563
|
+
var currentSamplesReceived = getCurrentStatsTotals('audio-recv', 'totalSamplesReceived');
|
|
564
|
+
var previousSamplesReceived = getPreviousStatsTotals('audio-recv', 'totalSamplesReceived');
|
|
565
|
+
if (currentPacketsReceived === previousPacketsReceived || currentPacketsReceived === 0) {
|
|
566
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio RTP packets received", currentPacketsReceived);
|
|
567
|
+
} else if (currentSamplesReceived === previousSamplesReceived || currentSamplesReceived === 0) {
|
|
568
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio samples received", currentSamplesReceived);
|
|
622
569
|
}
|
|
623
|
-
this.emitStartStopEvents(
|
|
570
|
+
this.emitStartStopEvents('audio', previousPacketsReceived, currentPacketsReceived, false);
|
|
624
571
|
}
|
|
625
|
-
|
|
626
|
-
if (this.meetingMediaStatus.expected.sendVideo) {
|
|
572
|
+
if (this.meetingMediaStatus.expected.sendVideo && this.lastStatsResults['video-send']) {
|
|
627
573
|
// 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"));
|
|
574
|
+
var _currentStats = this.statsResults['video-send'].send;
|
|
575
|
+
var _previousStats = this.lastStatsResults['video-send'].send;
|
|
576
|
+
if (_currentStats.totalPacketsSent === _previousStats.totalPacketsSent || _currentStats.totalPacketsSent === 0) {
|
|
577
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video RTP packets sent", _currentStats.totalPacketsSent);
|
|
578
|
+
} else {
|
|
579
|
+
if (_currentStats.framesEncoded === _previousStats.framesEncoded || _currentStats.framesEncoded === 0) {
|
|
580
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video Frames Encoded", _currentStats.framesEncoded);
|
|
645
581
|
}
|
|
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
|
-
});
|
|
582
|
+
if (this.statsResults['video-send'].send.framesSent === this.lastStatsResults['video-send'].send.framesSent || this.statsResults['video-send'].send.framesSent === 0) {
|
|
583
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video Frames sent", this.statsResults['video-send'].send.framesSent);
|
|
657
584
|
}
|
|
658
585
|
}
|
|
659
|
-
this.emitStartStopEvents(
|
|
586
|
+
this.emitStartStopEvents('video', _previousStats.framesSent, _currentStats.framesSent, true);
|
|
660
587
|
}
|
|
661
588
|
if (this.meetingMediaStatus.expected.receiveVideo) {
|
|
662
|
-
// compare video stats
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
589
|
+
// compare video stats received
|
|
590
|
+
var _currentPacketsReceived = getCurrentStatsTotals('video-recv', 'totalPacketsReceived');
|
|
591
|
+
var _previousPacketsReceived = getPreviousStatsTotals('video-recv', 'totalPacketsReceived');
|
|
592
|
+
var currentFramesReceived = getCurrentStatsTotals('video-recv', 'framesReceived');
|
|
593
|
+
var previousFramesReceived = getPreviousStatsTotals('video-recv', 'framesReceived');
|
|
594
|
+
var currentFramesDecoded = getCurrentStatsTotals('video-recv', 'framesDecoded');
|
|
595
|
+
var previousFramesDecoded = getPreviousStatsTotals('video-recv', 'framesDecoded');
|
|
596
|
+
var currentFramesDropped = getCurrentStatsTotals('video-recv', 'framesDropped');
|
|
597
|
+
var previousFramesDropped = getPreviousStatsTotals('video-recv', 'framesDropped');
|
|
598
|
+
if (_currentPacketsReceived === _previousPacketsReceived || _currentPacketsReceived === 0) {
|
|
599
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video RTP packets received", _currentPacketsReceived);
|
|
668
600
|
} else {
|
|
669
|
-
if (
|
|
670
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
601
|
+
if (currentFramesReceived === previousFramesReceived || currentFramesReceived === 0) {
|
|
602
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video frames received", currentFramesReceived);
|
|
671
603
|
}
|
|
672
|
-
if (
|
|
673
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
604
|
+
if (currentFramesDecoded === previousFramesDecoded || currentFramesDecoded === 0) {
|
|
605
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video frames decoded", currentFramesDecoded);
|
|
674
606
|
}
|
|
675
|
-
if (
|
|
676
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
607
|
+
if (currentFramesDropped - previousFramesDropped > 10) {
|
|
608
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> video frames are getting dropped", currentFramesDropped - previousFramesDropped);
|
|
677
609
|
}
|
|
678
610
|
}
|
|
679
|
-
this.emitStartStopEvents(
|
|
611
|
+
this.emitStartStopEvents('video', previousFramesDecoded, currentFramesDecoded, false);
|
|
680
612
|
}
|
|
681
|
-
|
|
682
|
-
if (this.meetingMediaStatus.expected.sendShare) {
|
|
613
|
+
if (this.meetingMediaStatus.expected.sendShare && this.lastStatsResults['video-share-send']) {
|
|
683
614
|
// compare share stats sent
|
|
684
615
|
|
|
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
|
-
});
|
|
616
|
+
var _currentStats2 = this.statsResults['video-share-send'].send;
|
|
617
|
+
var _previousStats2 = this.lastStatsResults['video-share-send'].send;
|
|
618
|
+
if (_currentStats2.totalPacketsSent === _previousStats2.totalPacketsSent || _currentStats2.totalPacketsSent === 0) {
|
|
619
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share RTP packets sent", _currentStats2.totalPacketsSent);
|
|
620
|
+
} else {
|
|
621
|
+
if (_currentStats2.framesEncoded === _previousStats2.framesEncoded || _currentStats2.framesEncoded === 0) {
|
|
622
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames getting encoded", _currentStats2.framesEncoded);
|
|
699
623
|
}
|
|
700
|
-
if (this.statsResults
|
|
701
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
// Share video is encoded but frames are not sent
|
|
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
|
-
});
|
|
624
|
+
if (this.statsResults['video-share-send'].send.framesSent === this.lastStatsResults['video-share-send'].send.framesSent || this.statsResults['video-share-send'].send.framesSent === 0) {
|
|
625
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames sent", this.statsResults['video-share-send'].send.framesSent);
|
|
714
626
|
}
|
|
715
627
|
}
|
|
716
|
-
|
|
628
|
+
}
|
|
629
|
+
if (this.meetingMediaStatus.expected.sendShare) {
|
|
717
630
|
// TODO:need to check receive share value
|
|
718
|
-
// compare share stats
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
631
|
+
// compare share stats received
|
|
632
|
+
var _currentPacketsReceived2 = getCurrentStatsTotals('video-share-recv', 'totalPacketsReceived');
|
|
633
|
+
var _previousPacketsReceived2 = getPreviousStatsTotals('video-share-recv', 'totalPacketsReceived');
|
|
634
|
+
var _currentFramesReceived = getCurrentStatsTotals('video-share-recv', 'framesReceived');
|
|
635
|
+
var _previousFramesReceived = getPreviousStatsTotals('video-share-recv', 'framesReceived');
|
|
636
|
+
var _currentFramesDecoded = getCurrentStatsTotals('video-share-recv', 'framesDecoded');
|
|
637
|
+
var _previousFramesDecoded = getPreviousStatsTotals('video-share-recv', 'framesDecoded');
|
|
638
|
+
var _currentFramesDropped = getCurrentStatsTotals('video-share-recv', 'framesDropped');
|
|
639
|
+
var _previousFramesDropped = getPreviousStatsTotals('video-share-recv', 'framesDropped');
|
|
640
|
+
if (_currentPacketsReceived2 === _previousPacketsReceived2 || _currentPacketsReceived2 === 0) {
|
|
641
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share RTP packets received", _currentPacketsReceived2);
|
|
723
642
|
} else {
|
|
724
|
-
if (
|
|
725
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
643
|
+
if (_currentFramesReceived === _previousFramesReceived || _currentFramesReceived === 0) {
|
|
644
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames received", _currentFramesReceived);
|
|
726
645
|
}
|
|
727
|
-
if (
|
|
728
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
646
|
+
if (_currentFramesDecoded === _previousFramesDecoded || _currentFramesDecoded === 0) {
|
|
647
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames decoded", _currentFramesDecoded);
|
|
729
648
|
}
|
|
730
|
-
if (
|
|
731
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
649
|
+
if (_currentFramesDropped - _previousFramesDropped > 10) {
|
|
650
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> share frames are getting dropped", _currentFramesDropped - _previousFramesDropped);
|
|
732
651
|
}
|
|
733
652
|
}
|
|
734
653
|
|
|
@@ -749,39 +668,57 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
749
668
|
}, {
|
|
750
669
|
key: "getStatsAndParse",
|
|
751
670
|
value: function getStatsAndParse() {
|
|
752
|
-
var
|
|
753
|
-
if (!this.
|
|
671
|
+
var _this8 = this;
|
|
672
|
+
if (!this.mediaConnection) {
|
|
754
673
|
return _promise.default.resolve();
|
|
755
674
|
}
|
|
756
|
-
if (this.
|
|
757
|
-
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse -->
|
|
675
|
+
if (this.mediaConnection && this.mediaConnection.getConnectionState() === _internalMediaCore.ConnectionState.Failed) {
|
|
676
|
+
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> media connection is in failed state');
|
|
758
677
|
return _promise.default.resolve();
|
|
759
678
|
}
|
|
760
679
|
_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
|
-
|
|
680
|
+
return this.mediaConnection.getTransceiverStats().then(function (transceiverStats) {
|
|
681
|
+
transceiverStats.video.receivers.forEach(function (receiver, i) {
|
|
682
|
+
return _this8.filterAndParseGetStatsResults(receiver, "video-recv-".concat(i), false);
|
|
683
|
+
});
|
|
684
|
+
transceiverStats.audio.receivers.forEach(function (receiver, i) {
|
|
685
|
+
return _this8.filterAndParseGetStatsResults(receiver, "audio-recv-".concat(i), false);
|
|
686
|
+
});
|
|
687
|
+
transceiverStats.screenShareVideo.receivers.forEach(function (receiver, i) {
|
|
688
|
+
return _this8.filterAndParseGetStatsResults(receiver, "video-share-recv-".concat(i), false);
|
|
689
|
+
});
|
|
690
|
+
transceiverStats.screenShareAudio.receivers.forEach(function (receiver, i) {
|
|
691
|
+
return _this8.filterAndParseGetStatsResults(receiver, "audio-share-recv-".concat(i), false);
|
|
692
|
+
});
|
|
693
|
+
transceiverStats.video.senders.forEach(function (sender, i) {
|
|
694
|
+
if (i > 0) {
|
|
695
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
696
|
+
}
|
|
697
|
+
_this8.filterAndParseGetStatsResults(sender, 'video-send', true);
|
|
698
|
+
});
|
|
699
|
+
transceiverStats.audio.senders.forEach(function (sender, i) {
|
|
700
|
+
if (i > 0) {
|
|
701
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
702
|
+
}
|
|
703
|
+
_this8.filterAndParseGetStatsResults(sender, 'audio-send', true);
|
|
704
|
+
});
|
|
705
|
+
transceiverStats.screenShareVideo.senders.forEach(function (sender, i) {
|
|
706
|
+
if (i > 0) {
|
|
707
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
708
|
+
}
|
|
709
|
+
_this8.filterAndParseGetStatsResults(sender, 'video-share-send', true);
|
|
710
|
+
});
|
|
711
|
+
transceiverStats.screenShareAudio.senders.forEach(function (sender, i) {
|
|
712
|
+
if (i > 0) {
|
|
713
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
714
|
+
}
|
|
715
|
+
_this8.filterAndParseGetStatsResults(sender, 'audio-share-send', true);
|
|
716
|
+
});
|
|
717
|
+
_this8.compareLastStatsResult();
|
|
782
718
|
|
|
783
719
|
// Save the last results to compare with the current
|
|
784
|
-
|
|
720
|
+
// DO Deep copy, for some reason it takes the reference all the time rather then old value set
|
|
721
|
+
_this8.lastStatsResults = JSON.parse((0, _stringify.default)(_this8.statsResults));
|
|
785
722
|
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> Finished Collecting Stats');
|
|
786
723
|
});
|
|
787
724
|
}
|
|
@@ -790,39 +727,25 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
790
727
|
* Processes OutboundRTP stats result and stores
|
|
791
728
|
* @private
|
|
792
729
|
* @param {*} result
|
|
793
|
-
* @param {*}
|
|
730
|
+
* @param {*} mediaType
|
|
794
731
|
* @returns {void}
|
|
795
732
|
*/
|
|
796
733
|
}, {
|
|
797
734
|
key: "processOutboundRTPResult",
|
|
798
|
-
value: function processOutboundRTPResult(result,
|
|
799
|
-
var mediaType = type || _constants.STATS.AUDIO_CORRELATE;
|
|
735
|
+
value: function processOutboundRTPResult(result, mediaType) {
|
|
800
736
|
var sendrecvType = _constants.STATS.SEND_DIRECTION;
|
|
801
|
-
this.processTrackResult(result, type, sendrecvType);
|
|
802
737
|
if (result.bytesSent) {
|
|
803
738
|
var kilobytes = 0;
|
|
804
|
-
if (
|
|
805
|
-
this.statsResults
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
this.statsResults
|
|
739
|
+
if (result.frameWidth && result.frameHeight) {
|
|
740
|
+
this.statsResults[mediaType][sendrecvType].width = result.frameWidth;
|
|
741
|
+
this.statsResults[mediaType][sendrecvType].height = result.frameHeight;
|
|
742
|
+
this.statsResults[mediaType][sendrecvType].framesSent = result.framesSent;
|
|
743
|
+
this.statsResults[mediaType][sendrecvType].hugeFramesSent = result.hugeFramesSent;
|
|
809
744
|
}
|
|
810
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].keyFramesEncoded) {
|
|
811
|
-
this.statsResults.internal[mediaType][sendrecvType].keyFramesEncoded = result.keyFramesEncoded;
|
|
812
|
-
}
|
|
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
745
|
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;
|
|
746
|
+
this.statsResults[mediaType][sendrecvType].framesEncoded = result.framesEncoded;
|
|
747
|
+
this.statsResults[mediaType][sendrecvType].keyFramesEncoded = result.keyFramesEncoded;
|
|
748
|
+
this.statsResults[mediaType][sendrecvType].packetsSent = result.packetsSent;
|
|
826
749
|
|
|
827
750
|
// Data saved to send MQA metrics
|
|
828
751
|
|
|
@@ -847,52 +770,41 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
847
770
|
* Processes InboundRTP stats result and stores
|
|
848
771
|
* @private
|
|
849
772
|
* @param {*} result
|
|
850
|
-
* @param {*}
|
|
773
|
+
* @param {*} mediaType
|
|
851
774
|
* @returns {void}
|
|
852
775
|
*/
|
|
853
776
|
}, {
|
|
854
777
|
key: "processInboundRTPResult",
|
|
855
|
-
value: function processInboundRTPResult(result,
|
|
856
|
-
var mediaType = type || _constants.STATS.AUDIO_CORRELATE;
|
|
778
|
+
value: function processInboundRTPResult(result, mediaType) {
|
|
857
779
|
var sendrecvType = _constants.STATS.RECEIVE_DIRECTION;
|
|
858
|
-
this.processTrackResult(result, type, sendrecvType);
|
|
859
780
|
if (result.bytesReceived) {
|
|
860
781
|
var kilobytes = 0;
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
this.statsResults
|
|
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;
|
|
782
|
+
var receiveSlot = this.receiveSlotCallback(result.ssrc);
|
|
783
|
+
var idAndCsi = receiveSlot ? "id: \"".concat(receiveSlot.id || '', "\"").concat(receiveSlot.csi ? " and csi: ".concat(receiveSlot.csi) : '') : '';
|
|
784
|
+
if (result.frameWidth && result.frameHeight) {
|
|
785
|
+
this.statsResults[mediaType][sendrecvType].width = result.frameWidth;
|
|
786
|
+
this.statsResults[mediaType][sendrecvType].height = result.frameHeight;
|
|
787
|
+
this.statsResults[mediaType][sendrecvType].framesReceived = result.framesReceived;
|
|
872
788
|
}
|
|
873
|
-
|
|
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;
|
|
789
|
+
var bytes = result.bytesReceived - this.statsResults[mediaType][sendrecvType].totalBytesReceived;
|
|
878
790
|
kilobytes = bytes / 1024;
|
|
879
791
|
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;
|
|
792
|
+
var currentPacketsLost = result.packetsLost - this.statsResults[mediaType][sendrecvType].totalPacketsLost;
|
|
793
|
+
if (currentPacketsLost < 0) {
|
|
794
|
+
currentPacketsLost = 0;
|
|
885
795
|
}
|
|
886
|
-
|
|
887
|
-
this.statsResults
|
|
888
|
-
if (
|
|
889
|
-
|
|
796
|
+
var currentPacketsReceived = result.packetsReceived - this.statsResults[mediaType][sendrecvType].totalPacketsReceived;
|
|
797
|
+
this.statsResults[mediaType][sendrecvType].totalPacketsReceived = result.packetsReceived;
|
|
798
|
+
if (currentPacketsReceived === 0) {
|
|
799
|
+
if (receiveSlot) {
|
|
800
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#processInboundRTPResult --> No packets received for receive slot ".concat(idAndCsi), currentPacketsReceived);
|
|
801
|
+
}
|
|
890
802
|
}
|
|
891
803
|
|
|
892
804
|
// Check the over all packet Lost ratio
|
|
893
|
-
this.statsResults[mediaType][sendrecvType].currentPacketLossRatio =
|
|
805
|
+
this.statsResults[mediaType][sendrecvType].currentPacketLossRatio = currentPacketsLost > 0 ? currentPacketsLost / (currentPacketsReceived + currentPacketsLost) : 0;
|
|
894
806
|
if (this.statsResults[mediaType][sendrecvType].currentPacketLossRatio > 3) {
|
|
895
|
-
_loggerProxy.default.logger.info(
|
|
807
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#processInboundRTPResult --> Packets getting lost from the receiver with slot ".concat(idAndCsi), this.statsResults[mediaType][sendrecvType].currentPacketLossRatio);
|
|
896
808
|
}
|
|
897
809
|
|
|
898
810
|
// TODO: check the packet loss value is negative values here
|
|
@@ -927,49 +839,8 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
927
839
|
}
|
|
928
840
|
}
|
|
929
841
|
}, {
|
|
930
|
-
key: "
|
|
842
|
+
key: "compareSentAndReceived",
|
|
931
843
|
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
844
|
/**
|
|
974
845
|
*
|
|
975
846
|
* @private
|
|
@@ -978,18 +849,13 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
978
849
|
* @returns {void}
|
|
979
850
|
* @memberof StatsAnalyzer
|
|
980
851
|
*/
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
if (!type) {
|
|
852
|
+
function compareSentAndReceived(result, type) {
|
|
853
|
+
// Don't compare on transceivers without a sender.
|
|
854
|
+
if (!type || !this.statsResults[type].send) {
|
|
985
855
|
return;
|
|
986
856
|
}
|
|
987
857
|
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;
|
|
858
|
+
var currentPacketLoss = result.packetsLost - this.statsResults[mediaType].send.totalPacketsLostOnReceiver;
|
|
993
859
|
this.statsResults[mediaType].send.packetsLostOnReceiver = currentPacketLoss;
|
|
994
860
|
this.statsResults[mediaType].send.totalPacketsLostOnReceiver = result.packetsLost;
|
|
995
861
|
this.statsResults[mediaType].send.meanRemoteJitter.push(result.jitter);
|
|
@@ -1015,5 +881,4 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
1015
881
|
}]);
|
|
1016
882
|
return StatsAnalyzer;
|
|
1017
883
|
}(_eventsScope.default);
|
|
1018
|
-
exports.StatsAnalyzer = StatsAnalyzer;
|
|
1019
884
|
//# sourceMappingURL=index.js.map
|