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