@webex/plugin-meetings 3.0.0-beta.16 → 3.0.0-beta.161
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 +45 -1
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +359 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +212 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +43 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1046 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/errors/webex-errors.js +3 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/config.js +6 -8
- package/dist/config.js.map +1 -1
- package/dist/constants.js +175 -26
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +27 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +297 -0
- package/dist/controls-options-manager/index.js.map +1 -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.js +300 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +77 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +214 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +92 -2
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +317 -24
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +43 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +2 -1
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +97 -14
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +39 -134
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +19 -97
- package/dist/media/properties.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -493
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +79 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2349 -2178
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +291 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +229 -124
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +191 -167
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +444 -443
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +157 -49
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +20 -5
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +22 -0
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +365 -73
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +7 -0
- package/dist/meetings/meetings.types.js.map +1 -0
- package/dist/meetings/request.js +16 -12
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +88 -1
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +43 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +15 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +97 -3
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +10 -0
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +94 -11
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +109 -39
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +316 -233
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +50 -14
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +3 -5
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +48 -29
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +265 -36
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +52 -19
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +53 -33
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +44 -18
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +60 -3
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +322 -103
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +4 -2
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/reachability/index.js +117 -60
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +12 -5
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +2 -2
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +18 -18
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +190 -145
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +343 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +63 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +21 -29
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +127 -92
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +135 -53
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +1 -93
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +329 -314
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +103 -54
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +43 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +124 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +2 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +69 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +34 -0
- package/dist/types/common/queue.d.ts +32 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +987 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +315 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +212 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +86 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +149 -0
- package/dist/types/meeting/index.d.ts +1524 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +70 -0
- package/dist/types/meeting/muteState.d.ts +184 -0
- package/dist/types/meeting/request.d.ts +270 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +75 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +57 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +122 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +31 -0
- package/dist/types/meetings/index.d.ts +364 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +158 -0
- package/dist/types/member/types.d.ts +21 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +24 -0
- package/dist/types/members/util.d.ts +210 -0
- package/dist/types/metrics/config.d.ts +195 -0
- package/dist/types/metrics/constants.d.ts +55 -0
- package/dist/types/metrics/index.d.ts +169 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +118 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +277 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/index.d.ts +152 -0
- package/dist/types/reachability/request.d.ts +37 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +193 -0
- package/dist/types/recording-controller/util.d.ts +13 -0
- package/dist/types/roap/index.d.ts +77 -0
- package/dist/types/roap/request.d.ts +36 -0
- package/dist/types/roap/turnDiscovery.d.ts +91 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +200 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/package.json +28 -21
- package/src/annotation/annotation.types.ts +52 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +343 -0
- package/src/breakouts/README.md +220 -0
- package/src/breakouts/breakout.ts +180 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +37 -0
- package/src/breakouts/index.ts +921 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/errors/webex-errors.ts +6 -2
- package/src/common/logs/logger-proxy.ts +1 -1
- package/src/config.ts +5 -7
- package/src/constants.ts +165 -20
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +18 -0
- package/src/controls-options-manager/index.ts +278 -0
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +286 -0
- package/src/index.ts +34 -0
- package/src/interpretation/README.md +51 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +182 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +110 -0
- package/src/locus-info/index.ts +339 -21
- package/src/locus-info/mediaSharesUtils.ts +48 -0
- package/src/locus-info/parser.ts +2 -1
- package/src/locus-info/selfUtils.ts +86 -2
- package/src/media/index.ts +70 -142
- package/src/media/properties.ts +41 -104
- package/src/mediaQualityMetrics/config.ts +379 -377
- package/src/meeting/in-meeting-actions.ts +156 -0
- package/src/meeting/index.ts +1779 -1741
- package/src/meeting/locusMediaRequest.ts +309 -0
- package/src/meeting/muteState.ts +228 -132
- package/src/meeting/request.ts +100 -91
- package/src/meeting/request.type.ts +2 -0
- package/src/meeting/util.ts +422 -421
- package/src/meeting-info/meeting-info-v2.ts +134 -13
- package/src/meeting-info/utilv2.ts +13 -3
- package/src/meetings/collection.ts +20 -0
- package/src/meetings/index.ts +385 -83
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/request.ts +3 -1
- package/src/meetings/util.ts +103 -4
- package/src/member/index.ts +42 -0
- package/src/member/types.ts +24 -0
- package/src/member/util.ts +95 -1
- package/src/members/collection.ts +8 -0
- package/src/members/index.ts +108 -6
- package/src/members/request.ts +98 -17
- package/src/members/types.ts +28 -0
- package/src/members/util.ts +319 -240
- package/src/metrics/config.ts +49 -10
- package/src/metrics/constants.ts +2 -4
- package/src/metrics/index.ts +43 -27
- package/src/multistream/mediaRequestManager.ts +337 -63
- package/src/multistream/receiveSlot.ts +68 -26
- package/src/multistream/receiveSlotManager.ts +61 -38
- package/src/multistream/remoteMedia.ts +29 -3
- package/src/multistream/remoteMediaGroup.ts +61 -2
- package/src/multistream/remoteMediaManager.ts +260 -66
- package/src/networkQualityMonitor/index.ts +6 -6
- package/src/reachability/index.ts +75 -25
- package/src/reachability/request.ts +10 -5
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +4 -4
- package/src/reactions/reactions.type.ts +28 -3
- package/src/reconnection-manager/index.ts +53 -32
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +315 -0
- package/src/recording-controller/util.ts +58 -0
- package/src/roap/index.ts +21 -30
- package/src/roap/request.ts +51 -52
- package/src/roap/turnDiscovery.ts +51 -27
- package/src/statsAnalyzer/global.ts +1 -94
- package/src/statsAnalyzer/index.ts +380 -390
- package/src/statsAnalyzer/mqaUtil.ts +106 -99
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +331 -254
- package/test/integration/spec/space-meeting.js +77 -4
- package/test/unit/spec/annotation/index.ts +436 -0
- package/test/unit/spec/breakouts/breakout.ts +233 -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 +77 -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/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +518 -0
- 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 +329 -0
- package/test/unit/spec/interpretation/siLanguage.ts +26 -0
- package/test/unit/spec/locus-info/controlsUtils.js +323 -30
- package/test/unit/spec/locus-info/index.js +680 -4
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
- package/test/unit/spec/locus-info/selfConstant.js +48 -0
- package/test/unit/spec/locus-info/selfUtils.js +275 -0
- package/test/unit/spec/media/index.ts +118 -22
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +76 -0
- package/test/unit/spec/meeting/index.js +2695 -1513
- package/test/unit/spec/meeting/locusMediaRequest.ts +436 -0
- package/test/unit/spec/meeting/muteState.js +370 -208
- package/test/unit/spec/meeting/request.js +354 -42
- package/test/unit/spec/meeting/utils.js +270 -156
- package/test/unit/spec/meeting-info/meetinginfov2.js +383 -5
- package/test/unit/spec/meeting-info/utilv2.js +21 -0
- package/test/unit/spec/meetings/collection.js +14 -0
- package/test/unit/spec/meetings/index.js +866 -120
- package/test/unit/spec/meetings/utils.js +206 -2
- package/test/unit/spec/member/index.js +31 -0
- package/test/unit/spec/member/util.js +408 -32
- package/test/unit/spec/members/index.js +320 -1
- package/test/unit/spec/members/request.js +206 -27
- package/test/unit/spec/members/utils.js +184 -0
- package/test/unit/spec/metrics/index.js +98 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +1012 -109
- package/test/unit/spec/multistream/receiveSlot.ts +77 -18
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +32 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +271 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +672 -65
- package/test/unit/spec/networkQualityMonitor/index.js +4 -4
- package/test/unit/spec/reachability/index.ts +176 -25
- package/test/unit/spec/reachability/request.js +66 -0
- package/test/unit/spec/reconnection-manager/index.js +46 -13
- package/test/unit/spec/recording-controller/index.js +231 -0
- package/test/unit/spec/recording-controller/util.js +102 -0
- package/test/unit/spec/roap/index.ts +21 -51
- package/test/unit/spec/roap/request.ts +187 -0
- package/test/unit/spec/roap/turnDiscovery.ts +73 -34
- package/test/unit/spec/stats-analyzer/index.js +94 -43
- 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/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -18
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -262
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -106
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/src/index.js +0 -15
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/meeting/effectsState.ts +0 -211
- package/src/multistream/multistreamMedia.ts +0 -93
- package/test/unit/spec/meeting/effectsState.js +0 -281
|
@@ -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"));
|
|
@@ -20,7 +21,7 @@ var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
|
20
21
|
var _internalMediaCore = require("@webex/internal-media-core");
|
|
21
22
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
22
23
|
var _constants = require("../constants");
|
|
23
|
-
var _config =
|
|
24
|
+
var _config = require("../mediaQualityMetrics/config");
|
|
24
25
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
25
26
|
var _global = _interopRequireDefault(require("./global"));
|
|
26
27
|
var _mqaUtil = require("./mqaUtil");
|
|
@@ -33,7 +34,21 @@ var EVENTS = {
|
|
|
33
34
|
REMOTE_MEDIA_STARTED: 'REMOTE_MEDIA_STARTED',
|
|
34
35
|
REMOTE_MEDIA_STOPPED: 'REMOTE_MEDIA_STOPPED'
|
|
35
36
|
};
|
|
36
|
-
|
|
37
|
+
exports.EVENTS = EVENTS;
|
|
38
|
+
var emptySender = {
|
|
39
|
+
trackLabel: '',
|
|
40
|
+
maxPacketLossRatio: 0,
|
|
41
|
+
availableBandwidth: 0,
|
|
42
|
+
bytesSent: 0,
|
|
43
|
+
meanRemoteJitter: [],
|
|
44
|
+
meanRoundTripTime: []
|
|
45
|
+
};
|
|
46
|
+
var emptyReceiver = {
|
|
47
|
+
availableBandwidth: 0,
|
|
48
|
+
bytesReceived: 0,
|
|
49
|
+
meanRtpJitter: [],
|
|
50
|
+
meanRoundTripTime: []
|
|
51
|
+
};
|
|
37
52
|
/**
|
|
38
53
|
* Stats Analyzer class that will emit events based on detected quality
|
|
39
54
|
*
|
|
@@ -41,7 +56,6 @@ var EVENTS = {
|
|
|
41
56
|
* @class StatsAnalyzer
|
|
42
57
|
* @extends {EventsScope}
|
|
43
58
|
*/
|
|
44
|
-
exports.EVENTS = EVENTS;
|
|
45
59
|
var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
46
60
|
(0, _inherits2.default)(StatsAnalyzer, _EventsScope);
|
|
47
61
|
var _super = _createSuper(StatsAnalyzer);
|
|
@@ -50,13 +64,17 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
50
64
|
* @constructor
|
|
51
65
|
* @public
|
|
52
66
|
* @param {Object} config SDK Configuration Object
|
|
67
|
+
* @param {Function} receiveSlotCallback Callback used to access receive slots.
|
|
53
68
|
* @param {Object} networkQualityMonitor class for assessing network characteristics (jitter, packetLoss, latency)
|
|
54
69
|
* @param {Object} statsResults Default properties for stats
|
|
55
70
|
*/
|
|
56
71
|
function StatsAnalyzer(config) {
|
|
57
72
|
var _this;
|
|
58
|
-
var
|
|
59
|
-
|
|
73
|
+
var receiveSlotCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
|
|
74
|
+
return undefined;
|
|
75
|
+
};
|
|
76
|
+
var networkQualityMonitor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
77
|
+
var statsResults = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _global.default;
|
|
60
78
|
(0, _classCallCheck2.default)(this, StatsAnalyzer);
|
|
61
79
|
_this = _super.call(this);
|
|
62
80
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "config", void 0);
|
|
@@ -64,7 +82,6 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
64
82
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastEmittedStartStopEvent", void 0);
|
|
65
83
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastMqaDataSent", void 0);
|
|
66
84
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastStatsResults", void 0);
|
|
67
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "localMQEStats", void 0);
|
|
68
85
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingMediaStatus", void 0);
|
|
69
86
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mqaInterval", void 0);
|
|
70
87
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mqaSentCount", void 0);
|
|
@@ -73,6 +90,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
73
90
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsInterval", void 0);
|
|
74
91
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsResults", void 0);
|
|
75
92
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsStarted", void 0);
|
|
93
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "receiveSlotCallback", void 0);
|
|
76
94
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "emitStartStopEvents", function (mediaType, previousValue, currentValue, isLocal) {
|
|
77
95
|
if (mediaType !== 'audio' && mediaType !== 'video' && mediaType !== 'share') {
|
|
78
96
|
throw new Error("Unsupported mediaType: ".concat(mediaType));
|
|
@@ -82,6 +100,9 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
82
100
|
if (previousValue === undefined) previousValue = 0;
|
|
83
101
|
// eslint-disable-next-line no-param-reassign
|
|
84
102
|
if (currentValue === undefined) currentValue = 0;
|
|
103
|
+
if (!_this.lastEmittedStartStopEvent[mediaType]) {
|
|
104
|
+
_this.lastEmittedStartStopEvent[mediaType] = {};
|
|
105
|
+
}
|
|
85
106
|
var lastEmittedEvent = isLocal ? _this.lastEmittedStartStopEvent[mediaType].local : _this.lastEmittedStartStopEvent[mediaType].remote;
|
|
86
107
|
var newEvent;
|
|
87
108
|
if (currentValue - previousValue > 0) {
|
|
@@ -163,141 +184,32 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
163
184
|
_this.networkQualityMonitor = networkQualityMonitor;
|
|
164
185
|
_this.correlationId = config.correlationId;
|
|
165
186
|
_this.mqaSentCount = -1;
|
|
166
|
-
_this.lastMqaDataSent = {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
send: {},
|
|
170
|
-
recv: {}
|
|
171
|
-
},
|
|
172
|
-
audio: {
|
|
173
|
-
send: {},
|
|
174
|
-
recv: {}
|
|
175
|
-
},
|
|
176
|
-
share: {
|
|
177
|
-
send: {},
|
|
178
|
-
recv: {}
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
video: {
|
|
182
|
-
send: {},
|
|
183
|
-
recv: {}
|
|
184
|
-
},
|
|
185
|
-
audio: {
|
|
186
|
-
send: {},
|
|
187
|
-
recv: {}
|
|
188
|
-
},
|
|
189
|
-
share: {
|
|
190
|
-
send: {},
|
|
191
|
-
recv: {}
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
_this.localMQEStats = {
|
|
195
|
-
audio: {
|
|
196
|
-
RX: {
|
|
197
|
-
packetsLost: [],
|
|
198
|
-
jitter: [],
|
|
199
|
-
latency: [],
|
|
200
|
-
bitRate: []
|
|
201
|
-
},
|
|
202
|
-
TX: {
|
|
203
|
-
packetsLost: [],
|
|
204
|
-
jitter: [],
|
|
205
|
-
latency: [],
|
|
206
|
-
bitRate: []
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
video: {
|
|
210
|
-
RX: {
|
|
211
|
-
packetsLost: [],
|
|
212
|
-
jitter: [],
|
|
213
|
-
latency: [],
|
|
214
|
-
bitRate: [],
|
|
215
|
-
frameRate: [],
|
|
216
|
-
resolutionWidth: [],
|
|
217
|
-
resolutionHeight: [],
|
|
218
|
-
requestedKeyFrame: [],
|
|
219
|
-
receivedKeyFrame: []
|
|
220
|
-
},
|
|
221
|
-
TX: {
|
|
222
|
-
packetsLost: [],
|
|
223
|
-
jitter: [],
|
|
224
|
-
latency: [],
|
|
225
|
-
bitRate: [],
|
|
226
|
-
frameRate: [],
|
|
227
|
-
resolutionWidth: [],
|
|
228
|
-
resolutionHeight: [],
|
|
229
|
-
requestedKeyFrame: [],
|
|
230
|
-
receivedKeyFrame: []
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
_this.lastEmittedStartStopEvent = {
|
|
235
|
-
audio: {
|
|
236
|
-
local: undefined,
|
|
237
|
-
remote: undefined
|
|
238
|
-
},
|
|
239
|
-
video: {
|
|
240
|
-
local: undefined,
|
|
241
|
-
remote: undefined
|
|
242
|
-
},
|
|
243
|
-
share: {
|
|
244
|
-
local: undefined,
|
|
245
|
-
remote: undefined
|
|
246
|
-
}
|
|
247
|
-
};
|
|
187
|
+
_this.lastMqaDataSent = {};
|
|
188
|
+
_this.lastEmittedStartStopEvent = {};
|
|
189
|
+
_this.receiveSlotCallback = receiveSlotCallback;
|
|
248
190
|
return _this;
|
|
249
191
|
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Resets cumulative stats arrays.
|
|
195
|
+
*
|
|
196
|
+
* @public
|
|
197
|
+
* @memberof StatsAnalyzer
|
|
198
|
+
* @returns {void}
|
|
199
|
+
*/
|
|
250
200
|
(0, _createClass2.default)(StatsAnalyzer, [{
|
|
251
|
-
key: "populateResults",
|
|
252
|
-
value: function populateResults(lastMqa) {
|
|
253
|
-
// Audio
|
|
254
|
-
|
|
255
|
-
this.localMQEStats.audio.RX.packetsLost.push(lastMqa.audioReceive[0].common.mediaHopByHopLost);
|
|
256
|
-
this.localMQEStats.audio.RX.jitter.push(lastMqa.audioReceive[0].streams[0].common.rtpJitter);
|
|
257
|
-
this.localMQEStats.audio.RX.latency.push(lastMqa.audioReceive[0].common.roundTripTime);
|
|
258
|
-
this.localMQEStats.audio.RX.bitRate.push(lastMqa.audioReceive[0].streams[0].common.receivedBitrate);
|
|
259
|
-
this.localMQEStats.audio.TX.packetsLost.push(lastMqa.audioTransmit[0].common.remoteLossRate);
|
|
260
|
-
this.localMQEStats.audio.TX.jitter.push(lastMqa.audioTransmit[0].common.remoteJitter);
|
|
261
|
-
this.localMQEStats.audio.TX.latency.push(lastMqa.audioTransmit[0].common.roundTripTime);
|
|
262
|
-
this.localMQEStats.audio.TX.bitRate.push(lastMqa.audioTransmit[0].streams[0].common.transmittedBitrate);
|
|
263
|
-
|
|
264
|
-
// Video
|
|
265
|
-
|
|
266
|
-
this.localMQEStats.video.RX.packetsLost.push(lastMqa.videoReceive[0].common.mediaHopByHopLost);
|
|
267
|
-
this.localMQEStats.video.RX.jitter.push(lastMqa.videoReceive[0].streams[0].common.rtpJitter);
|
|
268
|
-
this.localMQEStats.video.RX.latency.push(lastMqa.videoReceive[0].streams[0].common.roundTripTime);
|
|
269
|
-
this.localMQEStats.video.RX.bitRate.push(lastMqa.videoReceive[0].streams[0].common.receivedBitrate);
|
|
270
|
-
this.localMQEStats.video.RX.frameRate.push(lastMqa.videoReceive[0].streams[0].common.receivedFrameRate);
|
|
271
|
-
this.localMQEStats.video.RX.resolutionWidth.push(lastMqa.videoReceive[0].streams[0].receivedWidth);
|
|
272
|
-
this.localMQEStats.video.RX.resolutionHeight.push(lastMqa.videoReceive[0].streams[0].receivedHeight);
|
|
273
|
-
this.localMQEStats.video.RX.requestedKeyFrame.push();
|
|
274
|
-
this.localMQEStats.video.RX.receivedKeyFrame.push();
|
|
275
|
-
this.localMQEStats.video.TX.packetsLost.push(lastMqa.videoTransmit[0].common.remoteLossRate);
|
|
276
|
-
this.localMQEStats.video.TX.jitter.push(lastMqa.videoTransmit[0].common.remoteJitter);
|
|
277
|
-
this.localMQEStats.video.TX.latency.push(lastMqa.videoTransmit[0].common.roundTripTime);
|
|
278
|
-
this.localMQEStats.video.TX.bitRate.push(lastMqa.videoTransmit[0].streams[0].common.transmittedBitrate);
|
|
279
|
-
this.localMQEStats.video.TX.frameRate.push(lastMqa.videoTransmit[0].streams[0].common.transmittedFrameRate);
|
|
280
|
-
this.localMQEStats.video.TX.resolutionWidth.push(lastMqa.videoTransmit[0].streams[0].transmittedWidth);
|
|
281
|
-
this.localMQEStats.video.TX.resolutionHeight.push(lastMqa.videoTransmit[0].streams[0].transmittedHeight);
|
|
282
|
-
this.localMQEStats.video.TX.requestedKeyFrame.push(lastMqa.videoTransmit[0].streams[0].requestedKeyFrames);
|
|
283
|
-
this.localMQEStats.video.TX.receivedKeyFrame.push();
|
|
284
|
-
}
|
|
285
|
-
}, {
|
|
286
201
|
key: "resetStatsResults",
|
|
287
202
|
value: function resetStatsResults() {
|
|
288
|
-
|
|
289
|
-
this.statsResults.
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
this.statsResults.audio.send.meanRoundTripTime = [];
|
|
299
|
-
this.statsResults.video.send.meanRoundTripTime = [];
|
|
300
|
-
this.statsResults.share.send.meanRoundTripTime = [];
|
|
203
|
+
var _this2 = this;
|
|
204
|
+
(0, _keys.default)(this.statsResults).forEach(function (mediaType) {
|
|
205
|
+
if (mediaType.includes('recv')) {
|
|
206
|
+
_this2.statsResults[mediaType].recv.meanRtpJitter = [];
|
|
207
|
+
}
|
|
208
|
+
if (mediaType.includes('send')) {
|
|
209
|
+
_this2.statsResults[mediaType].send.meanRemoteJitter = [];
|
|
210
|
+
_this2.statsResults[mediaType].send.meanRoundTripTime = [];
|
|
211
|
+
}
|
|
212
|
+
});
|
|
301
213
|
}
|
|
302
214
|
|
|
303
215
|
/**
|
|
@@ -324,80 +236,80 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
324
236
|
}, {
|
|
325
237
|
key: "sendMqaData",
|
|
326
238
|
value: function sendMqaData() {
|
|
327
|
-
var
|
|
328
|
-
var
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
239
|
+
var _this3 = this;
|
|
240
|
+
var newMqa = (0, _cloneDeep2.default)(_config.emptyMqaInterval);
|
|
241
|
+
(0, _keys.default)(this.statsResults).forEach(function (mediaType) {
|
|
242
|
+
if (mediaType.includes('audio-send') || mediaType.includes('audio-share-send')) {
|
|
243
|
+
var audioSender = (0, _cloneDeep2.default)(_config.emptyAudioTransmit);
|
|
244
|
+
(0, _mqaUtil.getAudioSenderMqa)({
|
|
245
|
+
audioSender: audioSender,
|
|
246
|
+
statsResults: _this3.statsResults,
|
|
247
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
248
|
+
mediaType: mediaType
|
|
249
|
+
});
|
|
250
|
+
newMqa.audioTransmit.push(audioSender);
|
|
251
|
+
} else if (mediaType.includes('audio-recv') || mediaType.includes('audio-share-recv')) {
|
|
252
|
+
var audioReceiver = (0, _cloneDeep2.default)(_config.emptyAudioReceive);
|
|
253
|
+
(0, _mqaUtil.getAudioReceiverMqa)({
|
|
254
|
+
audioReceiver: audioReceiver,
|
|
255
|
+
statsResults: _this3.statsResults,
|
|
256
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
257
|
+
mediaType: mediaType
|
|
258
|
+
});
|
|
259
|
+
newMqa.audioReceive.push(audioReceiver);
|
|
260
|
+
} else if (mediaType.includes('video-send') || mediaType.includes('video-share-send')) {
|
|
261
|
+
var videoSender = (0, _cloneDeep2.default)(_config.emptyVideoTransmit);
|
|
262
|
+
(0, _mqaUtil.getVideoSenderMqa)({
|
|
263
|
+
videoSender: videoSender,
|
|
264
|
+
statsResults: _this3.statsResults,
|
|
265
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
266
|
+
mediaType: mediaType
|
|
267
|
+
});
|
|
268
|
+
newMqa.videoTransmit.push(videoSender);
|
|
269
|
+
} else if (mediaType.includes('video-recv') || mediaType.includes('video-share-recv')) {
|
|
270
|
+
var videoReceiver = (0, _cloneDeep2.default)(_config.emptyVideoReceive);
|
|
271
|
+
(0, _mqaUtil.getVideoReceiverMqa)({
|
|
272
|
+
videoReceiver: videoReceiver,
|
|
273
|
+
statsResults: _this3.statsResults,
|
|
274
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
275
|
+
mediaType: mediaType
|
|
276
|
+
});
|
|
277
|
+
newMqa.videoReceive.push(videoReceiver);
|
|
278
|
+
}
|
|
367
279
|
});
|
|
368
|
-
|
|
280
|
+
newMqa.intervalMetadata.peerReflexiveIP = this.statsResults.connectionType.local.ipAddress[0];
|
|
369
281
|
|
|
370
282
|
// Adding peripheral information
|
|
371
|
-
|
|
372
|
-
|
|
283
|
+
newMqa.intervalMetadata.peripherals = [];
|
|
284
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
373
285
|
information: _constants._UNKNOWN_,
|
|
374
286
|
name: _constants.MEDIA_DEVICES.SPEAKER
|
|
375
287
|
});
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
288
|
+
if (this.statsResults['audio-send']) {
|
|
289
|
+
var _this$statsResults$au;
|
|
290
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
291
|
+
information: (_this$statsResults$au = this.statsResults['audio-send']) === null || _this$statsResults$au === void 0 ? void 0 : _this$statsResults$au.trackLabel,
|
|
292
|
+
name: _constants.MEDIA_DEVICES.MICROPHONE
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
if (this.statsResults['video-send']) {
|
|
296
|
+
var _this$statsResults$vi;
|
|
297
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
298
|
+
information: (_this$statsResults$vi = this.statsResults['video-send']) === null || _this$statsResults$vi === void 0 ? void 0 : _this$statsResults$vi.trackLabel,
|
|
299
|
+
name: _constants.MEDIA_DEVICES.CAMERA
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
newMqa.networkType = this.statsResults.connectionType.local.networkType;
|
|
387
303
|
this.mqaSentCount += 1;
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
// DO Deep copy, for some reason it takes the reference all the time rather then old value set
|
|
391
|
-
this.lastMqaDataSent = (0, _cloneDeep2.default)(this.statsResults);
|
|
392
|
-
this.populateResults(_config.default.intervals[0]);
|
|
304
|
+
newMqa.intervalNumber = this.mqaSentCount;
|
|
393
305
|
this.resetStatsResults();
|
|
394
306
|
this.emit({
|
|
395
307
|
file: 'statsAnalyzer',
|
|
396
308
|
function: 'sendMqaData'
|
|
397
309
|
}, EVENTS.MEDIA_QUALITY, {
|
|
398
|
-
data:
|
|
310
|
+
data: newMqa,
|
|
399
311
|
// @ts-ignore
|
|
400
|
-
networkType:
|
|
312
|
+
networkType: newMqa.networkType
|
|
401
313
|
});
|
|
402
314
|
}
|
|
403
315
|
|
|
@@ -406,7 +318,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
406
318
|
*
|
|
407
319
|
* @private
|
|
408
320
|
* @memberof StatsAnalyzer
|
|
409
|
-
* @param {
|
|
321
|
+
* @param {RoapMediaConnection} mediaConnection
|
|
410
322
|
* @returns {void}
|
|
411
323
|
*/
|
|
412
324
|
}, {
|
|
@@ -420,24 +332,24 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
420
332
|
*
|
|
421
333
|
* @public
|
|
422
334
|
* @memberof StatsAnalyzer
|
|
423
|
-
* @param {
|
|
335
|
+
* @param {RoapMediaConnection} mediaConnection
|
|
424
336
|
* @returns {Promise}
|
|
425
337
|
*/
|
|
426
338
|
}, {
|
|
427
339
|
key: "startAnalyzer",
|
|
428
340
|
value: function startAnalyzer(mediaConnection) {
|
|
429
|
-
var
|
|
341
|
+
var _this4 = this;
|
|
430
342
|
if (!this.statsStarted) {
|
|
431
343
|
this.statsStarted = true;
|
|
432
344
|
this.mediaConnection = mediaConnection;
|
|
433
345
|
return this.getStatsAndParse().then(function () {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
},
|
|
346
|
+
_this4.statsInterval = setInterval(function () {
|
|
347
|
+
_this4.getStatsAndParse();
|
|
348
|
+
}, _this4.config.analyzerInterval);
|
|
437
349
|
// Trigger initial fetch
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
350
|
+
_this4.sendMqaData();
|
|
351
|
+
_this4.mqaInterval = setInterval(function () {
|
|
352
|
+
_this4.sendMqaData();
|
|
441
353
|
}, _constants.MQA_INTEVAL);
|
|
442
354
|
});
|
|
443
355
|
}
|
|
@@ -454,7 +366,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
454
366
|
}, {
|
|
455
367
|
key: "stopAnalyzer",
|
|
456
368
|
value: function stopAnalyzer() {
|
|
457
|
-
var
|
|
369
|
+
var _this5 = this;
|
|
458
370
|
var sendOneLastMqa = this.mqaInterval && this.statsInterval;
|
|
459
371
|
if (this.statsInterval) {
|
|
460
372
|
clearInterval(this.statsInterval);
|
|
@@ -466,11 +378,10 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
466
378
|
}
|
|
467
379
|
if (sendOneLastMqa) {
|
|
468
380
|
return this.getStatsAndParse().then(function () {
|
|
469
|
-
|
|
470
|
-
|
|
381
|
+
_this5.sendMqaData();
|
|
382
|
+
_this5.mediaConnection = null;
|
|
471
383
|
});
|
|
472
384
|
}
|
|
473
|
-
this.mediaConnection = null;
|
|
474
385
|
return _promise.default.resolve();
|
|
475
386
|
}
|
|
476
387
|
|
|
@@ -490,6 +401,32 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
490
401
|
if (!getStatsResult) {
|
|
491
402
|
return;
|
|
492
403
|
}
|
|
404
|
+
|
|
405
|
+
// Generate empty stats results
|
|
406
|
+
if (!this.statsResults[type]) {
|
|
407
|
+
this.statsResults[type] = {};
|
|
408
|
+
}
|
|
409
|
+
if (isSender && !this.statsResults[type].send) {
|
|
410
|
+
this.statsResults[type].send = (0, _cloneDeep2.default)(emptySender);
|
|
411
|
+
} else if (!isSender && !this.statsResults[type].recv) {
|
|
412
|
+
this.statsResults[type].recv = (0, _cloneDeep2.default)(emptyReceiver);
|
|
413
|
+
}
|
|
414
|
+
if (!this.statsResults.resolutions[type]) {
|
|
415
|
+
this.statsResults.resolutions[type] = {};
|
|
416
|
+
}
|
|
417
|
+
if (isSender && !this.statsResults.resolutions[type].send) {
|
|
418
|
+
this.statsResults.resolutions[type].send = (0, _cloneDeep2.default)(emptySender);
|
|
419
|
+
} else if (!isSender && !this.statsResults.resolutions[type].recv) {
|
|
420
|
+
this.statsResults.resolutions[type].recv = (0, _cloneDeep2.default)(emptyReceiver);
|
|
421
|
+
}
|
|
422
|
+
if (!this.statsResults.internal[type]) {
|
|
423
|
+
this.statsResults.internal[type] = {};
|
|
424
|
+
}
|
|
425
|
+
if (isSender && !this.statsResults.internal[type].send) {
|
|
426
|
+
this.statsResults.internal[type].send = (0, _cloneDeep2.default)(emptySender);
|
|
427
|
+
} else if (!isSender && !this.statsResults.internal[type].recv) {
|
|
428
|
+
this.statsResults.internal[type].recv = (0, _cloneDeep2.default)(emptyReceiver);
|
|
429
|
+
}
|
|
493
430
|
switch (getStatsResult.type) {
|
|
494
431
|
case 'outbound-rtp':
|
|
495
432
|
this.processOutboundRTPResult(getStatsResult, type);
|
|
@@ -524,21 +461,26 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
524
461
|
/**
|
|
525
462
|
* Filters the get stats results for types
|
|
526
463
|
* @private
|
|
527
|
-
* @param {Array}
|
|
464
|
+
* @param {Array} statsItem
|
|
528
465
|
* @param {String} type
|
|
529
466
|
* @param {boolean} isSender
|
|
530
467
|
* @returns {void}
|
|
531
468
|
*/
|
|
532
469
|
}, {
|
|
533
470
|
key: "filterAndParseGetStatsResults",
|
|
534
|
-
value: function filterAndParseGetStatsResults(
|
|
535
|
-
var
|
|
471
|
+
value: function filterAndParseGetStatsResults(statsItem, type, isSender) {
|
|
472
|
+
var _this6 = this;
|
|
536
473
|
var types = _constants.DEFAULT_GET_STATS_FILTER.types;
|
|
537
|
-
|
|
474
|
+
statsItem.report.forEach(function (result) {
|
|
538
475
|
if (types.includes(result.type)) {
|
|
539
|
-
|
|
476
|
+
_this6.parseGetStatsResult(result, type, isSender);
|
|
540
477
|
}
|
|
541
478
|
});
|
|
479
|
+
if (this.statsResults[type]) {
|
|
480
|
+
this.statsResults[type].direction = statsItem.currentDirection;
|
|
481
|
+
this.statsResults[type].trackLabel = statsItem.localTrackLabel;
|
|
482
|
+
this.statsResults[type].csi = statsItem.csi;
|
|
483
|
+
}
|
|
542
484
|
}
|
|
543
485
|
|
|
544
486
|
/**
|
|
@@ -553,7 +495,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
553
495
|
if (!result) {
|
|
554
496
|
return;
|
|
555
497
|
}
|
|
556
|
-
if (type
|
|
498
|
+
if (type.includes('audio-send')) {
|
|
557
499
|
this.statsResults[type].send.audioLevel = result.audioLevel;
|
|
558
500
|
this.statsResults[type].send.totalAudioEnergy = result.totalAudioEnergy;
|
|
559
501
|
}
|
|
@@ -584,106 +526,149 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
584
526
|
* @returns {void}
|
|
585
527
|
*/
|
|
586
528
|
function compareLastStatsResult() {
|
|
529
|
+
var _this7 = this;
|
|
587
530
|
if (this.lastStatsResults !== null && this.meetingMediaStatus) {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
531
|
+
var getCurrentStatsTotals = function getCurrentStatsTotals(keyPrefix, value) {
|
|
532
|
+
return (0, _keys.default)(_this7.statsResults).filter(function (key) {
|
|
533
|
+
return key.startsWith(keyPrefix);
|
|
534
|
+
}).reduce(function (prev, cur) {
|
|
535
|
+
var _this7$statsResults$c;
|
|
536
|
+
return prev + (((_this7$statsResults$c = _this7.statsResults[cur]) === null || _this7$statsResults$c === void 0 ? void 0 : _this7$statsResults$c.recv[value]) || 0);
|
|
537
|
+
}, 0);
|
|
538
|
+
};
|
|
539
|
+
var getPreviousStatsTotals = function getPreviousStatsTotals(keyPrefix, value) {
|
|
540
|
+
return (0, _keys.default)(_this7.statsResults).filter(function (key) {
|
|
541
|
+
return key.startsWith(keyPrefix);
|
|
542
|
+
}).reduce(function (prev, cur) {
|
|
543
|
+
var _this7$lastStatsResul;
|
|
544
|
+
return prev + (((_this7$lastStatsResul = _this7.lastStatsResults[cur]) === null || _this7$lastStatsResul === void 0 ? void 0 : _this7$lastStatsResul.recv[value]) || 0);
|
|
545
|
+
}, 0);
|
|
546
|
+
};
|
|
547
|
+
var getCurrentResolutionsStatsTotals = function getCurrentResolutionsStatsTotals(keyPrefix, value) {
|
|
548
|
+
return (0, _keys.default)(_this7.statsResults).filter(function (key) {
|
|
549
|
+
return key.startsWith(keyPrefix);
|
|
550
|
+
}).reduce(function (prev, cur) {
|
|
551
|
+
var _this7$statsResults$r;
|
|
552
|
+
return prev + (((_this7$statsResults$r = _this7.statsResults.resolutions[cur]) === null || _this7$statsResults$r === void 0 ? void 0 : _this7$statsResults$r.recv[value]) || 0);
|
|
553
|
+
}, 0);
|
|
554
|
+
};
|
|
555
|
+
var getPreviousResolutionsStatsTotals = function getPreviousResolutionsStatsTotals(keyPrefix, value) {
|
|
556
|
+
return (0, _keys.default)(_this7.statsResults).filter(function (key) {
|
|
557
|
+
return key.startsWith(keyPrefix);
|
|
558
|
+
}).reduce(function (prev, cur) {
|
|
559
|
+
var _this7$lastStatsResul2;
|
|
560
|
+
return prev + (((_this7$lastStatsResul2 = _this7.lastStatsResults.resolutions[cur]) === null || _this7$lastStatsResul2 === void 0 ? void 0 : _this7$lastStatsResul2.recv[value]) || 0);
|
|
561
|
+
}, 0);
|
|
562
|
+
};
|
|
563
|
+
if (this.meetingMediaStatus.expected.sendAudio && this.lastStatsResults['audio-send']) {
|
|
564
|
+
// compare audio stats sent
|
|
565
|
+
// NOTE: relies on there being only one sender.
|
|
566
|
+
var currentStats = this.statsResults['audio-send'].send;
|
|
567
|
+
var previousStats = this.lastStatsResults['audio-send'].send;
|
|
595
568
|
if (currentStats.totalPacketsSent === previousStats.totalPacketsSent || currentStats.totalPacketsSent === 0) {
|
|
596
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
569
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio RTP packets sent", currentStats.totalPacketsSent);
|
|
597
570
|
} else {
|
|
598
571
|
if (currentStats.totalAudioEnergy === previousStats.totalAudioEnergy || currentStats.totalAudioEnergy === 0) {
|
|
599
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
572
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio Energy present", currentStats.totalAudioEnergy);
|
|
600
573
|
}
|
|
601
574
|
if (currentStats.audioLevel === 0) {
|
|
602
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
575
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> audio level is 0 for the user");
|
|
603
576
|
}
|
|
604
577
|
}
|
|
605
|
-
this.emitStartStopEvents(
|
|
578
|
+
this.emitStartStopEvents('audio', previousStats.totalPacketsSent, currentStats.totalPacketsSent, true);
|
|
606
579
|
}
|
|
607
580
|
if (this.meetingMediaStatus.expected.receiveAudio) {
|
|
608
581
|
// compare audio stats received
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
582
|
+
var currentPacketsReceived = getCurrentStatsTotals('audio-recv', 'totalPacketsReceived');
|
|
583
|
+
var previousPacketsReceived = getPreviousStatsTotals('audio-recv', 'totalPacketsReceived');
|
|
584
|
+
var currentSamplesReceived = getCurrentStatsTotals('audio-recv', 'totalSamplesReceived');
|
|
585
|
+
var previousSamplesReceived = getPreviousStatsTotals('audio-recv', 'totalSamplesReceived');
|
|
586
|
+
if (currentPacketsReceived === previousPacketsReceived || currentPacketsReceived === 0) {
|
|
587
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio RTP packets received", currentPacketsReceived);
|
|
588
|
+
} else if (currentSamplesReceived === previousSamplesReceived || currentSamplesReceived === 0) {
|
|
589
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio samples received", currentSamplesReceived);
|
|
615
590
|
}
|
|
616
|
-
this.emitStartStopEvents(
|
|
591
|
+
this.emitStartStopEvents('audio', previousPacketsReceived, currentPacketsReceived, false);
|
|
617
592
|
}
|
|
618
|
-
|
|
619
|
-
if (this.meetingMediaStatus.expected.sendVideo) {
|
|
593
|
+
if (this.meetingMediaStatus.expected.sendVideo && this.lastStatsResults['video-send']) {
|
|
620
594
|
// compare video stats sent
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
if (
|
|
624
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
595
|
+
var _currentStats = this.statsResults['video-send'].send;
|
|
596
|
+
var _previousStats = this.lastStatsResults['video-send'].send;
|
|
597
|
+
if (_currentStats.totalPacketsSent === _previousStats.totalPacketsSent || _currentStats.totalPacketsSent === 0) {
|
|
598
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video RTP packets sent", _currentStats.totalPacketsSent);
|
|
625
599
|
} else {
|
|
626
|
-
if (
|
|
627
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
600
|
+
if (_currentStats.framesEncoded === _previousStats.framesEncoded || _currentStats.framesEncoded === 0) {
|
|
601
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video Frames Encoded", _currentStats.framesEncoded);
|
|
628
602
|
}
|
|
629
|
-
if (this.statsResults.resolutions[
|
|
630
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
603
|
+
if (this.statsResults.resolutions['video-send'].send.framesSent === this.lastStatsResults.resolutions['video-send'].send.framesSent || this.statsResults.resolutions['video-send'].send.framesSent === 0) {
|
|
604
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video Frames sent", this.statsResults.resolutions['video-send'].send.framesSent);
|
|
631
605
|
}
|
|
632
606
|
}
|
|
633
|
-
this.emitStartStopEvents(
|
|
607
|
+
this.emitStartStopEvents('video', _previousStats.framesSent, _currentStats.framesSent, true);
|
|
634
608
|
}
|
|
635
609
|
if (this.meetingMediaStatus.expected.receiveVideo) {
|
|
636
|
-
// compare video stats
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
610
|
+
// compare video stats received
|
|
611
|
+
var _currentPacketsReceived = getCurrentStatsTotals('video-recv', 'totalPacketsReceived');
|
|
612
|
+
var _previousPacketsReceived = getPreviousStatsTotals('video-recv', 'totalPacketsReceived');
|
|
613
|
+
var currentFramesReceived = getCurrentResolutionsStatsTotals('video-recv', 'framesReceived');
|
|
614
|
+
var previousFramesReceived = getPreviousResolutionsStatsTotals('video-recv', 'framesReceived');
|
|
615
|
+
var currentFramesDecoded = getCurrentStatsTotals('video-recv', 'framesDecoded');
|
|
616
|
+
var previousFramesDecoded = getPreviousStatsTotals('video-recv', 'framesDecoded');
|
|
617
|
+
var currentFramesDropped = getCurrentResolutionsStatsTotals('video-recv', 'framesDropped');
|
|
618
|
+
var previousFramesDropped = getPreviousResolutionsStatsTotals('video-recv', 'framesDropped');
|
|
619
|
+
if (_currentPacketsReceived === _previousPacketsReceived || _currentPacketsReceived === 0) {
|
|
620
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video RTP packets received", _currentPacketsReceived);
|
|
642
621
|
} else {
|
|
643
|
-
if (
|
|
644
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
622
|
+
if (currentFramesReceived === previousFramesReceived || currentFramesReceived === 0) {
|
|
623
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video frames received", currentFramesReceived);
|
|
645
624
|
}
|
|
646
|
-
if (
|
|
647
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
625
|
+
if (currentFramesDecoded === previousFramesDecoded || currentFramesDecoded === 0) {
|
|
626
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video frames decoded", currentFramesDecoded);
|
|
648
627
|
}
|
|
649
|
-
if (
|
|
650
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
628
|
+
if (currentFramesDropped - previousFramesDropped > 10) {
|
|
629
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> video frames are getting dropped", currentFramesDropped - previousFramesDropped);
|
|
651
630
|
}
|
|
652
631
|
}
|
|
653
|
-
this.emitStartStopEvents(
|
|
632
|
+
this.emitStartStopEvents('video', previousFramesDecoded, currentFramesDecoded, false);
|
|
654
633
|
}
|
|
655
|
-
|
|
656
|
-
if (this.meetingMediaStatus.expected.sendShare) {
|
|
634
|
+
if (this.meetingMediaStatus.expected.sendShare && this.lastStatsResults['video-share-send']) {
|
|
657
635
|
// compare share stats sent
|
|
658
636
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
if (
|
|
662
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
637
|
+
var _currentStats2 = this.statsResults['video-share-send'].send;
|
|
638
|
+
var _previousStats2 = this.lastStatsResults['video-share-send'].send;
|
|
639
|
+
if (_currentStats2.totalPacketsSent === _previousStats2.totalPacketsSent || _currentStats2.totalPacketsSent === 0) {
|
|
640
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share RTP packets sent", _currentStats2.totalPacketsSent);
|
|
663
641
|
} else {
|
|
664
|
-
if (
|
|
665
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
642
|
+
if (_currentStats2.framesEncoded === _previousStats2.framesEncoded || _currentStats2.framesEncoded === 0) {
|
|
643
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames getting encoded", _currentStats2.framesEncoded);
|
|
666
644
|
}
|
|
667
|
-
if (this.statsResults.resolutions[
|
|
668
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
645
|
+
if (this.statsResults.resolutions['video-share-send'].send.framesSent === this.lastStatsResults.resolutions['video-share-send'].send.framesSent || this.statsResults.resolutions['video-share-send'].send.framesSent === 0) {
|
|
646
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames sent", this.statsResults.resolutions['video-share-send'].send.framesSent);
|
|
669
647
|
}
|
|
670
648
|
}
|
|
671
|
-
|
|
649
|
+
}
|
|
650
|
+
if (this.meetingMediaStatus.expected.sendShare) {
|
|
672
651
|
// TODO:need to check receive share value
|
|
673
|
-
// compare share stats
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
652
|
+
// compare share stats received
|
|
653
|
+
var _currentPacketsReceived2 = getCurrentStatsTotals('video-share-recv', 'totalPacketsReceived');
|
|
654
|
+
var _previousPacketsReceived2 = getPreviousStatsTotals('video-share-recv', 'totalPacketsReceived');
|
|
655
|
+
var _currentFramesReceived = getCurrentResolutionsStatsTotals('video-share-recv', 'framesReceived');
|
|
656
|
+
var _previousFramesReceived = getPreviousResolutionsStatsTotals('video-share-recv', 'framesReceived');
|
|
657
|
+
var _currentFramesDecoded = getCurrentStatsTotals('video-share-recv', 'framesDecoded');
|
|
658
|
+
var _previousFramesDecoded = getPreviousStatsTotals('video-share-recv', 'framesDecoded');
|
|
659
|
+
var _currentFramesDropped = getCurrentResolutionsStatsTotals('video-share-recv', 'framesDropped');
|
|
660
|
+
var _previousFramesDropped = getPreviousResolutionsStatsTotals('video-share-recv', 'framesDropped');
|
|
661
|
+
if (_currentPacketsReceived2 === _previousPacketsReceived2 || _currentPacketsReceived2 === 0) {
|
|
662
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share RTP packets received", _currentPacketsReceived2);
|
|
678
663
|
} else {
|
|
679
|
-
if (
|
|
680
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
664
|
+
if (_currentFramesReceived === _previousFramesReceived || _currentFramesReceived === 0) {
|
|
665
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames received", _currentFramesReceived);
|
|
681
666
|
}
|
|
682
|
-
if (
|
|
683
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
667
|
+
if (_currentFramesDecoded === _previousFramesDecoded || _currentFramesDecoded === 0) {
|
|
668
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames decoded", _currentFramesDecoded);
|
|
684
669
|
}
|
|
685
|
-
if (
|
|
686
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
670
|
+
if (_currentFramesDropped - _previousFramesDropped > 10) {
|
|
671
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> share frames are getting dropped", _currentFramesDropped - _previousFramesDropped);
|
|
687
672
|
}
|
|
688
673
|
}
|
|
689
674
|
|
|
@@ -704,34 +689,57 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
704
689
|
}, {
|
|
705
690
|
key: "getStatsAndParse",
|
|
706
691
|
value: function getStatsAndParse() {
|
|
707
|
-
var
|
|
692
|
+
var _this8 = this;
|
|
708
693
|
if (!this.mediaConnection) {
|
|
709
694
|
return _promise.default.resolve();
|
|
710
695
|
}
|
|
711
|
-
if (this.mediaConnection && this.mediaConnection.getConnectionState() === _internalMediaCore.
|
|
696
|
+
if (this.mediaConnection && this.mediaConnection.getConnectionState() === _internalMediaCore.ConnectionState.Failed) {
|
|
712
697
|
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> media connection is in failed state');
|
|
713
698
|
return _promise.default.resolve();
|
|
714
699
|
}
|
|
715
700
|
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> Collecting Stats');
|
|
716
701
|
return this.mediaConnection.getTransceiverStats().then(function (transceiverStats) {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
702
|
+
transceiverStats.video.receivers.forEach(function (receiver, i) {
|
|
703
|
+
return _this8.filterAndParseGetStatsResults(receiver, "video-recv-".concat(i), false);
|
|
704
|
+
});
|
|
705
|
+
transceiverStats.audio.receivers.forEach(function (receiver, i) {
|
|
706
|
+
return _this8.filterAndParseGetStatsResults(receiver, "audio-recv-".concat(i), false);
|
|
707
|
+
});
|
|
708
|
+
transceiverStats.screenShareVideo.receivers.forEach(function (receiver, i) {
|
|
709
|
+
return _this8.filterAndParseGetStatsResults(receiver, "video-share-recv-".concat(i), false);
|
|
710
|
+
});
|
|
711
|
+
transceiverStats.screenShareAudio.receivers.forEach(function (receiver, i) {
|
|
712
|
+
return _this8.filterAndParseGetStatsResults(receiver, "audio-share-recv-".concat(i), false);
|
|
713
|
+
});
|
|
714
|
+
transceiverStats.video.senders.forEach(function (sender, i) {
|
|
715
|
+
if (i > 0) {
|
|
716
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
717
|
+
}
|
|
718
|
+
_this8.filterAndParseGetStatsResults(sender, 'video-send', true);
|
|
719
|
+
});
|
|
720
|
+
transceiverStats.audio.senders.forEach(function (sender, i) {
|
|
721
|
+
if (i > 0) {
|
|
722
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
723
|
+
}
|
|
724
|
+
_this8.filterAndParseGetStatsResults(sender, 'audio-send', true);
|
|
725
|
+
});
|
|
726
|
+
transceiverStats.screenShareVideo.senders.forEach(function (sender, i) {
|
|
727
|
+
if (i > 0) {
|
|
728
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
729
|
+
}
|
|
730
|
+
_this8.filterAndParseGetStatsResults(sender, 'video-share-send', true);
|
|
731
|
+
});
|
|
732
|
+
transceiverStats.screenShareAudio.senders.forEach(function (sender, i) {
|
|
733
|
+
if (i > 0) {
|
|
734
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
735
|
+
}
|
|
736
|
+
_this8.filterAndParseGetStatsResults(sender, 'audio-share-send', true);
|
|
737
|
+
});
|
|
738
|
+
_this8.compareLastStatsResult();
|
|
731
739
|
|
|
732
740
|
// Save the last results to compare with the current
|
|
733
741
|
// DO Deep copy, for some reason it takes the reference all the time rather then old value set
|
|
734
|
-
|
|
742
|
+
_this8.lastStatsResults = JSON.parse((0, _stringify.default)(_this8.statsResults));
|
|
735
743
|
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> Finished Collecting Stats');
|
|
736
744
|
});
|
|
737
745
|
}
|
|
@@ -740,16 +748,21 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
740
748
|
* Processes OutboundRTP stats result and stores
|
|
741
749
|
* @private
|
|
742
750
|
* @param {*} result
|
|
743
|
-
* @param {*}
|
|
751
|
+
* @param {*} mediaType
|
|
744
752
|
* @returns {void}
|
|
745
753
|
*/
|
|
746
754
|
}, {
|
|
747
755
|
key: "processOutboundRTPResult",
|
|
748
|
-
value: function processOutboundRTPResult(result,
|
|
749
|
-
var mediaType = type || _constants.STATS.AUDIO_CORRELATE;
|
|
756
|
+
value: function processOutboundRTPResult(result, mediaType) {
|
|
750
757
|
var sendrecvType = _constants.STATS.SEND_DIRECTION;
|
|
751
758
|
if (result.bytesSent) {
|
|
752
759
|
var kilobytes = 0;
|
|
760
|
+
if (result.frameWidth && result.frameHeight) {
|
|
761
|
+
this.statsResults.resolutions[mediaType][sendrecvType].width = result.frameWidth;
|
|
762
|
+
this.statsResults.resolutions[mediaType][sendrecvType].height = result.frameHeight;
|
|
763
|
+
this.statsResults.resolutions[mediaType][sendrecvType].framesSent = result.framesSent;
|
|
764
|
+
this.statsResults.resolutions[mediaType][sendrecvType].hugeFramesSent = result.hugeFramesSent;
|
|
765
|
+
}
|
|
753
766
|
if (!this.statsResults.internal[mediaType][sendrecvType].prevBytesSent) {
|
|
754
767
|
this.statsResults.internal[mediaType][sendrecvType].prevBytesSent = result.bytesSent;
|
|
755
768
|
}
|
|
@@ -796,16 +809,22 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
796
809
|
* Processes InboundRTP stats result and stores
|
|
797
810
|
* @private
|
|
798
811
|
* @param {*} result
|
|
799
|
-
* @param {*}
|
|
812
|
+
* @param {*} mediaType
|
|
800
813
|
* @returns {void}
|
|
801
814
|
*/
|
|
802
815
|
}, {
|
|
803
816
|
key: "processInboundRTPResult",
|
|
804
|
-
value: function processInboundRTPResult(result,
|
|
805
|
-
var mediaType = type || _constants.STATS.AUDIO_CORRELATE;
|
|
817
|
+
value: function processInboundRTPResult(result, mediaType) {
|
|
806
818
|
var sendrecvType = _constants.STATS.RECEIVE_DIRECTION;
|
|
807
819
|
if (result.bytesReceived) {
|
|
808
820
|
var kilobytes = 0;
|
|
821
|
+
var receiveSlot = this.receiveSlotCallback(result.ssrc);
|
|
822
|
+
var idAndCsi = receiveSlot ? "id: \"".concat(receiveSlot.id || '', "\"").concat(receiveSlot.csi ? " and csi: ".concat(receiveSlot.csi) : '') : '';
|
|
823
|
+
if (result.frameWidth && result.frameHeight) {
|
|
824
|
+
this.statsResults.resolutions[mediaType][sendrecvType].width = result.frameWidth;
|
|
825
|
+
this.statsResults.resolutions[mediaType][sendrecvType].height = result.frameHeight;
|
|
826
|
+
this.statsResults.resolutions[mediaType][sendrecvType].framesReceived = result.framesReceived;
|
|
827
|
+
}
|
|
809
828
|
if (!this.statsResults.internal[mediaType][sendrecvType].prevBytesReceived) {
|
|
810
829
|
this.statsResults.internal[mediaType][sendrecvType].prevBytesReceived = result.bytesReceived;
|
|
811
830
|
}
|
|
@@ -834,13 +853,15 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
834
853
|
this.statsResults[mediaType][sendrecvType].packetsReceived = result.packetsReceived - this.statsResults.internal[mediaType][sendrecvType].totalPacketsReceived;
|
|
835
854
|
this.statsResults.internal[mediaType][sendrecvType].totalPacketsReceived = result.packetsReceived;
|
|
836
855
|
if (this.statsResults[mediaType][sendrecvType].packetsReceived === 0) {
|
|
837
|
-
|
|
856
|
+
if (receiveSlot) {
|
|
857
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#processInboundRTPResult --> No packets received for receive slot ".concat(idAndCsi), this.statsResults[mediaType][sendrecvType].packetsReceived);
|
|
858
|
+
}
|
|
838
859
|
}
|
|
839
860
|
|
|
840
861
|
// Check the over all packet Lost ratio
|
|
841
862
|
this.statsResults[mediaType][sendrecvType].currentPacketLossRatio = this.statsResults[mediaType][sendrecvType].currentPacketsLost > 0 ? this.statsResults[mediaType][sendrecvType].currentPacketsLost / (this.statsResults[mediaType][sendrecvType].packetsReceived + this.statsResults[mediaType][sendrecvType].currentPacketsLost) : 0;
|
|
842
863
|
if (this.statsResults[mediaType][sendrecvType].currentPacketLossRatio > 3) {
|
|
843
|
-
_loggerProxy.default.logger.info(
|
|
864
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#processInboundRTPResult --> Packets getting lost from the receiver with slot ".concat(idAndCsi), this.statsResults[mediaType][sendrecvType].currentPacketLossRatio);
|
|
844
865
|
}
|
|
845
866
|
|
|
846
867
|
// TODO: check the packet loss value is negative values here
|
|
@@ -901,20 +922,13 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
901
922
|
if (!result || result.type !== 'track') {
|
|
902
923
|
return;
|
|
903
924
|
}
|
|
904
|
-
if (result.type !== 'track') return;
|
|
905
925
|
var sendrecvType = result.remoteSource === true ? _constants.STATS.RECEIVE_DIRECTION : _constants.STATS.SEND_DIRECTION;
|
|
906
|
-
if (result.frameWidth && result.frameHeight) {
|
|
907
|
-
this.statsResults.resolutions[mediaType][sendrecvType].width = result.frameWidth;
|
|
908
|
-
this.statsResults.resolutions[mediaType][sendrecvType].height = result.frameHeight;
|
|
909
|
-
this.statsResults.resolutions[mediaType][sendrecvType].framesSent = result.framesSent;
|
|
910
|
-
this.statsResults.resolutions[mediaType][sendrecvType].hugeFramesSent = result.hugeFramesSent;
|
|
911
|
-
}
|
|
912
926
|
if (sendrecvType === _constants.STATS.RECEIVE_DIRECTION) {
|
|
913
927
|
this.statsResults.resolutions[mediaType][sendrecvType].framesReceived = result.framesReceived;
|
|
914
928
|
this.statsResults.resolutions[mediaType][sendrecvType].framesDecoded = result.framesDecoded;
|
|
915
929
|
this.statsResults.resolutions[mediaType][sendrecvType].framesDropped = result.framesDropped;
|
|
916
930
|
}
|
|
917
|
-
if (result.trackIdentifier && mediaType
|
|
931
|
+
if (result.trackIdentifier && !mediaType.includes('audio')) {
|
|
918
932
|
this.statsResults.resolutions[mediaType][sendrecvType].trackIdentifier = result.trackIdentifier;
|
|
919
933
|
var jitterBufferDelay = result && result.jitterBufferDelay;
|
|
920
934
|
var jitterBufferEmittedCount = result && result.jitterBufferEmittedCount;
|
|
@@ -937,7 +951,8 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
937
951
|
}, {
|
|
938
952
|
key: "compareSentAndReceived",
|
|
939
953
|
value: function compareSentAndReceived(result, type) {
|
|
940
|
-
|
|
954
|
+
// Don't compare on transceivers without a sender.
|
|
955
|
+
if (!type || !this.statsResults.internal[type].send) {
|
|
941
956
|
return;
|
|
942
957
|
}
|
|
943
958
|
var mediaType = type;
|