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