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