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