@webex/plugin-meetings 3.0.0-beta.4 → 3.0.0-beta.40
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/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/breakouts/breakout.js +137 -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/index.js +546 -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 +48 -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/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/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 +6 -41
- 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 +37 -60
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +4 -14
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +6 -6
- package/dist/config.js.map +1 -1
- package/dist/constants.js +109 -49
- 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 +15 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +203 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- package/dist/controls-options-manager/util.js +28 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +11 -18
- package/dist/index.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +12 -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 +186 -192
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +3 -37
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +12 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +92 -118
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +34 -91
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +66 -153
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +83 -117
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +505 -495
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +13 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2141 -2210
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +59 -82
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +308 -264
- 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 +45 -217
- 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 +14 -32
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +193 -268
- 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 +137 -228
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +5 -20
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +490 -560
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +24 -41
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +116 -155
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +78 -86
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +31 -68
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +3 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +95 -200
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +16 -39
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +9 -38
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +1 -13
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +1 -6
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +54 -156
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +74 -52
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +48 -65
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +60 -82
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +60 -76
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +6 -40
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +360 -413
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- 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 +147 -183
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +15 -23
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +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 +322 -456
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +343 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +63 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +48 -70
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +143 -131
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +91 -98
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +1 -95
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +361 -449
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +137 -81
- 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/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/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +8 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +69 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +34 -0
- package/dist/types/common/queue.d.ts +32 -0
- package/dist/types/config.d.ts +77 -0
- package/dist/types/constants.d.ts +916 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +5 -0
- package/dist/types/controls-options-manager/index.d.ts +120 -0
- package/dist/types/controls-options-manager/util.d.ts +7 -0
- package/dist/types/index.d.ts +6 -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 +269 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +212 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +32 -0
- package/dist/types/media/properties.d.ts +108 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +83 -0
- package/dist/types/meeting/index.d.ts +1699 -0
- package/dist/types/meeting/muteState.d.ts +116 -0
- package/dist/types/meeting/request.d.ts +271 -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 +2 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +57 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +93 -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 +23 -0
- package/dist/types/meetings/index.d.ts +297 -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 +146 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +24 -0
- package/dist/types/members/index.d.ts +320 -0
- package/dist/types/members/request.d.ts +50 -0
- package/dist/types/members/util.d.ts +2 -0
- package/dist/types/metrics/config.d.ts +169 -0
- package/dist/types/metrics/constants.d.ts +53 -0
- package/dist/types/metrics/index.d.ts +152 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +51 -0
- package/dist/types/multistream/receiveSlot.d.ts +64 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +46 -0
- package/dist/types/multistream/remoteMedia.d.ts +100 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +56 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +241 -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 +140 -0
- package/dist/types/reachability/request.d.ts +37 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +117 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +193 -0
- package/dist/types/recording-controller/util.d.ts +13 -0
- package/dist/types/roap/index.d.ts +77 -0
- package/dist/types/roap/request.d.ts +38 -0
- package/dist/types/roap/turnDiscovery.d.ts +74 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +195 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/internal-README.md +7 -6
- package/package.json +27 -21
- package/src/breakouts/README.md +199 -0
- package/src/breakouts/breakout.ts +130 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/index.ts +504 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +39 -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/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/{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} +8 -7
- 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} +22 -9
- package/src/common/queue.ts +1 -2
- package/src/{config.js → config.ts} +17 -12
- package/src/constants.ts +62 -5
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +6 -0
- package/src/controls-options-manager/index.ts +183 -0
- package/src/controls-options-manager/util.ts +20 -0
- package/src/index.js +4 -1
- package/src/locus-info/controlsUtils.ts +114 -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} +150 -66
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +19 -8
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +17 -17
- package/src/locus-info/{parser.js → parser.ts} +67 -79
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +123 -68
- package/src/media/{index.js → index.ts} +182 -173
- package/src/media/{properties.js → properties.ts} +60 -37
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/config.ts +384 -0
- package/src/meeting/in-meeting-actions.ts +31 -3
- package/src/meeting/{index.js → index.ts} +2512 -1579
- package/src/meeting/{muteState.js → muteState.ts} +95 -49
- package/src/meeting/{request.js → request.ts} +326 -142
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/{util.js → util.ts} +117 -119
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/{index.js → index.ts} +42 -36
- package/src/meeting-info/meeting-info-v2.ts +273 -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} +65 -58
- package/src/meetings/{collection.js → collection.ts} +6 -3
- package/src/meetings/index.ts +1159 -0
- package/src/meetings/{request.js → request.ts} +32 -25
- package/src/meetings/{util.js → util.ts} +58 -32
- package/src/member/{index.js → index.ts} +102 -56
- package/src/member/{util.js → util.ts} +52 -25
- package/src/members/{collection.js → collection.ts} +2 -2
- package/src/members/{index.js → index.ts} +221 -142
- package/src/members/{request.js → request.ts} +60 -16
- package/src/members/{util.js → util.ts} +50 -48
- package/src/metrics/{config.js → config.ts} +253 -92
- package/src/metrics/{constants.js → constants.ts} +0 -6
- package/src/metrics/{index.js → index.ts} +105 -94
- package/src/multistream/mediaRequestManager.ts +101 -39
- package/src/multistream/receiveSlot.ts +62 -26
- package/src/multistream/receiveSlotManager.ts +35 -21
- package/src/multistream/remoteMedia.ts +38 -5
- package/src/multistream/remoteMediaGroup.ts +4 -3
- package/src/multistream/remoteMediaManager.ts +152 -36
- 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.js → index.ts} +109 -85
- package/src/reachability/request.ts +46 -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} +196 -103
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +315 -0
- package/src/recording-controller/util.ts +58 -0
- package/src/roap/{index.js → index.ts} +77 -60
- package/src/roap/request.ts +172 -0
- package/src/roap/turnDiscovery.ts +81 -41
- package/src/statsAnalyzer/global.ts +37 -0
- package/src/statsAnalyzer/index.ts +1234 -0
- package/src/statsAnalyzer/mqaUtil.ts +293 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- package/test/integration/spec/converged-space-meetings.js +176 -0
- package/test/integration/spec/journey.js +665 -464
- package/test/integration/spec/space-meeting.js +320 -206
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/breakouts/breakout.ts +147 -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/index.ts +707 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +47 -0
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/controls-options-manager/index.js +124 -0
- package/test/unit/spec/controls-options-manager/util.js +66 -0
- package/test/unit/spec/fixture/locus.js +92 -90
- package/test/unit/spec/locus-info/controlsUtils.js +25 -5
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +104 -2
- package/test/unit/spec/locus-info/infoUtils.js +41 -32
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
- package/test/unit/spec/locus-info/parser.js +3 -9
- package/test/unit/spec/locus-info/selfConstant.js +97 -103
- package/test/unit/spec/locus-info/selfUtils.js +105 -12
- package/test/unit/spec/media/index.ts +39 -53
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +13 -2
- package/test/unit/spec/meeting/index.js +2253 -811
- package/test/unit/spec/meeting/muteState.js +74 -55
- package/test/unit/spec/meeting/request.js +141 -43
- package/test/unit/spec/meeting/utils.js +106 -171
- package/test/unit/spec/meeting-info/meetinginfov2.js +100 -73
- 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 +110 -74
- package/test/unit/spec/meetings/collection.js +1 -1
- package/test/unit/spec/meetings/index.js +439 -257
- package/test/unit/spec/meetings/utils.js +14 -12
- package/test/unit/spec/member/index.js +0 -1
- package/test/unit/spec/member/util.js +31 -7
- package/test/unit/spec/members/index.js +104 -54
- package/test/unit/spec/members/request.js +29 -20
- package/test/unit/spec/members/utils.js +8 -5
- package/test/unit/spec/metrics/index.js +16 -21
- package/test/unit/spec/multistream/mediaRequestManager.ts +318 -64
- package/test/unit/spec/multistream/receiveSlot.ts +68 -17
- package/test/unit/spec/multistream/receiveSlotManager.ts +41 -13
- package/test/unit/spec/multistream/remoteMedia.ts +38 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +5 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +412 -65
- package/test/unit/spec/networkQualityMonitor/index.js +24 -18
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/index.ts +70 -27
- package/test/unit/spec/reachability/request.js +66 -0
- package/test/unit/spec/reconnection-manager/index.js +58 -30
- package/test/unit/spec/recording-controller/index.js +231 -0
- package/test/unit/spec/recording-controller/util.js +102 -0
- package/test/unit/spec/roap/index.ts +12 -8
- package/test/unit/spec/roap/request.ts +217 -0
- package/test/unit/spec/roap/turnDiscovery.ts +72 -49
- package/test/unit/spec/stats-analyzer/index.js +86 -57
- package/test/utils/cmr.js +44 -42
- package/test/utils/constants.js +9 -0
- package/test/utils/testUtils.js +98 -77
- 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/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/locus-info/controlsUtils.js +0 -102
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/mediaQualityMetrics/config.js +0 -382
- package/src/meeting/effectsState.js +0 -205
- package/src/meeting-info/meeting-info-v2.js +0 -255
- package/src/meetings/index.js +0 -1015
- package/src/multistream/multistreamMedia.ts +0 -92
- package/src/peer-connection-manager/util.ts +0 -117
- 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,57 +1,34 @@
|
|
|
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.default = void 0;
|
|
14
|
-
|
|
15
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
16
|
-
|
|
17
11
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
18
|
-
|
|
12
|
+
var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
|
|
19
13
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
20
|
-
|
|
14
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
15
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
21
16
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
22
|
-
|
|
23
17
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
24
|
-
|
|
25
18
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
26
|
-
|
|
27
19
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
28
|
-
|
|
29
20
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
30
|
-
|
|
31
21
|
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/wrapNativeSuper"));
|
|
32
|
-
|
|
33
22
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
34
|
-
|
|
35
23
|
var _triggerProxy = _interopRequireDefault(require("../common/events/trigger-proxy"));
|
|
36
|
-
|
|
37
24
|
var _constants = require("../constants");
|
|
38
|
-
|
|
39
25
|
var _constants2 = _interopRequireDefault(require("../metrics/constants"));
|
|
40
|
-
|
|
41
26
|
var _reconnection = _interopRequireDefault(require("../common/errors/reconnection"));
|
|
42
|
-
|
|
43
27
|
var _reconnectionInProgress = _interopRequireDefault(require("../common/errors/reconnection-in-progress"));
|
|
44
|
-
|
|
45
28
|
var _config = require("../metrics/config");
|
|
46
|
-
|
|
47
|
-
var _media = _interopRequireDefault(require("../media"));
|
|
48
|
-
|
|
49
29
|
var _metrics = _interopRequireDefault(require("../metrics"));
|
|
50
|
-
|
|
51
30
|
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); }; }
|
|
52
|
-
|
|
53
31
|
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; } }
|
|
54
|
-
|
|
55
32
|
/**
|
|
56
33
|
* Used to indicate that the reconnect logic needs to be retried.
|
|
57
34
|
*
|
|
@@ -60,14 +37,11 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
60
37
|
*/
|
|
61
38
|
var NeedsRetryError = /*#__PURE__*/function (_Error) {
|
|
62
39
|
(0, _inherits2.default)(NeedsRetryError, _Error);
|
|
63
|
-
|
|
64
40
|
var _super = _createSuper(NeedsRetryError);
|
|
65
|
-
|
|
66
41
|
function NeedsRetryError() {
|
|
67
42
|
(0, _classCallCheck2.default)(this, NeedsRetryError);
|
|
68
43
|
return _super.apply(this, arguments);
|
|
69
44
|
}
|
|
70
|
-
|
|
71
45
|
return (0, _createClass2.default)(NeedsRetryError);
|
|
72
46
|
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
73
47
|
/**
|
|
@@ -76,13 +50,9 @@ var NeedsRetryError = /*#__PURE__*/function (_Error) {
|
|
|
76
50
|
* @class NeedsRejoinError
|
|
77
51
|
* @extends {Error}
|
|
78
52
|
*/
|
|
79
|
-
|
|
80
|
-
|
|
81
53
|
var NeedsRejoinError = /*#__PURE__*/function (_Error2) {
|
|
82
54
|
(0, _inherits2.default)(NeedsRejoinError, _Error2);
|
|
83
|
-
|
|
84
55
|
var _super2 = _createSuper(NeedsRejoinError);
|
|
85
|
-
|
|
86
56
|
/**
|
|
87
57
|
* Creates an instance of NeedsRejoinError.
|
|
88
58
|
* @param {Object} params
|
|
@@ -92,31 +62,37 @@ var NeedsRejoinError = /*#__PURE__*/function (_Error2) {
|
|
|
92
62
|
*/
|
|
93
63
|
function NeedsRejoinError(_ref) {
|
|
94
64
|
var _this;
|
|
95
|
-
|
|
96
65
|
var wasSharing = _ref.wasSharing,
|
|
97
|
-
|
|
98
|
-
|
|
66
|
+
_ref$error = _ref.error,
|
|
67
|
+
error = _ref$error === void 0 ? new Error('Meeting needs to be rejoined') : _ref$error;
|
|
99
68
|
(0, _classCallCheck2.default)(this, NeedsRejoinError);
|
|
69
|
+
// @ts-ignore
|
|
100
70
|
_this = _super2.call(this, error);
|
|
71
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "wasSharing", void 0);
|
|
101
72
|
_this.wasSharing = wasSharing;
|
|
102
73
|
return _this;
|
|
103
74
|
}
|
|
104
|
-
|
|
105
75
|
return (0, _createClass2.default)(NeedsRejoinError);
|
|
106
76
|
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
107
77
|
/**
|
|
108
78
|
* @export
|
|
109
79
|
* @class ReconnectionManager
|
|
110
|
-
*/
|
|
111
|
-
|
|
112
|
-
|
|
80
|
+
*/
|
|
113
81
|
var ReconnectionManager = /*#__PURE__*/function () {
|
|
114
82
|
/**
|
|
115
83
|
* @param {Meeting} meeting
|
|
116
84
|
*/
|
|
117
85
|
function ReconnectionManager(meeting) {
|
|
118
86
|
(0, _classCallCheck2.default)(this, ReconnectionManager);
|
|
119
|
-
|
|
87
|
+
(0, _defineProperty2.default)(this, "autoRejoinEnabled", void 0);
|
|
88
|
+
(0, _defineProperty2.default)(this, "iceState", void 0);
|
|
89
|
+
(0, _defineProperty2.default)(this, "maxRejoinAttempts", void 0);
|
|
90
|
+
(0, _defineProperty2.default)(this, "meeting", void 0);
|
|
91
|
+
(0, _defineProperty2.default)(this, "rejoinAttempts", void 0);
|
|
92
|
+
(0, _defineProperty2.default)(this, "shareStatus", void 0);
|
|
93
|
+
(0, _defineProperty2.default)(this, "status", void 0);
|
|
94
|
+
(0, _defineProperty2.default)(this, "tryCount", void 0);
|
|
95
|
+
(0, _defineProperty2.default)(this, "webex", void 0);
|
|
120
96
|
/**
|
|
121
97
|
* Stores ICE reconnection state data.
|
|
122
98
|
*
|
|
@@ -129,33 +105,33 @@ var ReconnectionManager = /*#__PURE__*/function () {
|
|
|
129
105
|
disconnected: false,
|
|
130
106
|
resolve: function resolve() {},
|
|
131
107
|
timer: undefined,
|
|
108
|
+
// @ts-ignore
|
|
132
109
|
timeoutDuration: meeting.config.reconnection.iceReconnectionTimeout
|
|
133
110
|
};
|
|
111
|
+
|
|
134
112
|
/**
|
|
135
113
|
* @instance
|
|
136
114
|
* @type {String}
|
|
137
115
|
* @private
|
|
138
116
|
* @memberof ReconnectionManager
|
|
139
|
-
|
|
140
|
-
|
|
117
|
+
*/
|
|
141
118
|
this.status = _constants.RECONNECTION.STATE.DEFAULT_STATUS;
|
|
142
119
|
/**
|
|
143
120
|
* @instance
|
|
144
121
|
* @type {Number}
|
|
145
122
|
* @private
|
|
146
123
|
* @memberof ReconnectionManager
|
|
147
|
-
|
|
148
|
-
|
|
124
|
+
*/
|
|
149
125
|
this.tryCount = _constants.RECONNECTION.STATE.DEFAULT_TRY_COUNT;
|
|
150
126
|
/**
|
|
151
127
|
* @instance
|
|
152
128
|
* @type {Object}
|
|
153
129
|
* @private
|
|
154
130
|
* @memberof ReconnectionManager
|
|
155
|
-
|
|
131
|
+
*/
|
|
156
132
|
// TODO : change this logic to not save the meeting instance
|
|
157
133
|
// It gets complicated when meeting ends on remote side , We have a old meeting instance which is not up to date
|
|
158
|
-
|
|
134
|
+
// @ts-ignore
|
|
159
135
|
this.webex = meeting.webex;
|
|
160
136
|
/**
|
|
161
137
|
* @instance
|
|
@@ -165,33 +141,34 @@ var ReconnectionManager = /*#__PURE__*/function () {
|
|
|
165
141
|
*/
|
|
166
142
|
// TODO: try removing the circular dependency for meeting and reconnection manager
|
|
167
143
|
// try moving this to meetings collection
|
|
168
|
-
|
|
169
144
|
this.meeting = meeting;
|
|
145
|
+
|
|
146
|
+
// @ts-ignore
|
|
170
147
|
this.maxRejoinAttempts = meeting.config.reconnection.maxRejoinAttempts;
|
|
171
148
|
this.rejoinAttempts = _constants.RECONNECTION.STATE.DEFAULT_TRY_COUNT;
|
|
172
|
-
|
|
149
|
+
// @ts-ignore
|
|
150
|
+
this.autoRejoinEnabled = meeting.config.reconnection.autoRejoin;
|
|
173
151
|
|
|
152
|
+
// Make sure reconnection state is in default
|
|
174
153
|
this.reset();
|
|
175
154
|
}
|
|
155
|
+
|
|
176
156
|
/**
|
|
177
157
|
* @public
|
|
178
158
|
* @memberof ReconnectionManager
|
|
179
159
|
* @returns {void}
|
|
180
160
|
*/
|
|
181
|
-
|
|
182
|
-
|
|
183
161
|
(0, _createClass2.default)(ReconnectionManager, [{
|
|
184
162
|
key: "resetReconnectionTimer",
|
|
185
163
|
value: function resetReconnectionTimer() {
|
|
186
164
|
this.iceState.resolve();
|
|
187
|
-
|
|
188
165
|
this.iceState.resolve = function () {};
|
|
189
|
-
|
|
190
166
|
if (this.iceState.timer) {
|
|
191
167
|
clearTimeout(this.iceState.timer);
|
|
192
168
|
delete this.iceState.timer;
|
|
193
169
|
}
|
|
194
170
|
}
|
|
171
|
+
|
|
195
172
|
/**
|
|
196
173
|
* Sets the iceState to connected and clears any disconnect timeouts and
|
|
197
174
|
* related timeout data within the iceState.
|
|
@@ -200,17 +177,16 @@ var ReconnectionManager = /*#__PURE__*/function () {
|
|
|
200
177
|
* @public
|
|
201
178
|
* @memberof ReconnectionManager
|
|
202
179
|
*/
|
|
203
|
-
|
|
204
180
|
}, {
|
|
205
181
|
key: "iceReconnected",
|
|
206
182
|
value: function iceReconnected() {
|
|
207
183
|
if (this.iceState.disconnected) {
|
|
208
184
|
_loggerProxy.default.logger.log('ReconnectionManager:index#iceReconnected --> ice has reconnected');
|
|
209
|
-
|
|
210
185
|
this.resetReconnectionTimer();
|
|
211
186
|
this.iceState.disconnected = false;
|
|
212
187
|
}
|
|
213
188
|
}
|
|
189
|
+
|
|
214
190
|
/**
|
|
215
191
|
* Set the iceState to disconnected and generates a timeout that waits for the
|
|
216
192
|
* iceState to reconnect and then resolves. If the ice state is already
|
|
@@ -221,15 +197,12 @@ var ReconnectionManager = /*#__PURE__*/function () {
|
|
|
221
197
|
* @public
|
|
222
198
|
* @memberof ReconnectionManager
|
|
223
199
|
*/
|
|
224
|
-
|
|
225
200
|
}, {
|
|
226
201
|
key: "waitForIceReconnect",
|
|
227
202
|
value: function waitForIceReconnect() {
|
|
228
203
|
var _this2 = this;
|
|
229
|
-
|
|
230
204
|
if (!this.iceState.disconnected) {
|
|
231
205
|
_loggerProxy.default.logger.log('ReconnectionManager:index#waitForIceReconnect --> waiting for ice reconnect');
|
|
232
|
-
|
|
233
206
|
this.iceState.disconnected = true;
|
|
234
207
|
return new _promise.default(function (resolve, reject) {
|
|
235
208
|
_this2.iceState.timer = setTimeout(function () {
|
|
@@ -242,17 +215,17 @@ var ReconnectionManager = /*#__PURE__*/function () {
|
|
|
242
215
|
}, _this2.iceState.timeoutDuration);
|
|
243
216
|
_this2.iceState.resolve = resolve;
|
|
244
217
|
});
|
|
245
|
-
}
|
|
246
|
-
|
|
218
|
+
}
|
|
247
219
|
|
|
220
|
+
// return a resolved promise to prevent multiple catch executions of reconnect
|
|
248
221
|
return _promise.default.resolve();
|
|
249
222
|
}
|
|
223
|
+
|
|
250
224
|
/**
|
|
251
225
|
* @returns {undefined}
|
|
252
226
|
* @public
|
|
253
227
|
* @memberof ReconnectionManager
|
|
254
228
|
*/
|
|
255
|
-
|
|
256
229
|
}, {
|
|
257
230
|
key: "reset",
|
|
258
231
|
value: function reset() {
|
|
@@ -260,36 +233,36 @@ var ReconnectionManager = /*#__PURE__*/function () {
|
|
|
260
233
|
this.tryCount = _constants.RECONNECTION.STATE.DEFAULT_TRY_COUNT;
|
|
261
234
|
this.rejoinAttempts = _constants.RECONNECTION.STATE.DEFAULT_TRY_COUNT;
|
|
262
235
|
}
|
|
236
|
+
|
|
263
237
|
/**
|
|
264
238
|
* @returns {undefined}
|
|
265
239
|
* @public
|
|
266
240
|
* @memberof ReconnectionManager
|
|
267
241
|
*/
|
|
268
|
-
|
|
269
242
|
}, {
|
|
270
243
|
key: "cleanUp",
|
|
271
244
|
value: function cleanUp() {
|
|
272
245
|
this.reset();
|
|
273
246
|
this.meeting = null;
|
|
274
247
|
}
|
|
248
|
+
|
|
275
249
|
/**
|
|
276
250
|
* @public
|
|
277
251
|
* @memberof ReconnectionManager
|
|
278
252
|
* @returns {Boolean} true if reconnection operation is in progress
|
|
279
253
|
*/
|
|
280
|
-
|
|
281
254
|
}, {
|
|
282
255
|
key: "isReconnectInProgress",
|
|
283
256
|
value: function isReconnectInProgress() {
|
|
284
257
|
return this.status === _constants.RECONNECTION.STATE.IN_PROGRESS;
|
|
285
258
|
}
|
|
259
|
+
|
|
286
260
|
/**
|
|
287
261
|
* @returns {Boolean}
|
|
288
262
|
* @throws {ReconnectionError}
|
|
289
263
|
* @private
|
|
290
264
|
* @memberof ReconnectionManager
|
|
291
265
|
*/
|
|
292
|
-
|
|
293
266
|
}, {
|
|
294
267
|
key: "validate",
|
|
295
268
|
value: function validate() {
|
|
@@ -297,16 +270,13 @@ var ReconnectionManager = /*#__PURE__*/function () {
|
|
|
297
270
|
if (this.status === _constants.RECONNECTION.STATE.DEFAULT_STATUS || this.status === _constants.RECONNECTION.STATE.COMPLETE) {
|
|
298
271
|
return true;
|
|
299
272
|
}
|
|
300
|
-
|
|
301
273
|
_loggerProxy.default.logger.info('ReconnectionManager:index#validate --> Reconnection already in progress.');
|
|
302
|
-
|
|
303
274
|
throw new _reconnectionInProgress.default('Reconnection already in progress.');
|
|
304
275
|
}
|
|
305
|
-
|
|
306
276
|
_loggerProxy.default.logger.info('ReconnectionManager:index#validate --> Reconnection is not enabled.');
|
|
307
|
-
|
|
308
277
|
throw new _reconnection.default('Reconnection is not enabled.');
|
|
309
278
|
}
|
|
279
|
+
|
|
310
280
|
/**
|
|
311
281
|
* Initiates a media reconnect for the active meeting
|
|
312
282
|
* @param {Object} reconnectOptions
|
|
@@ -316,123 +286,101 @@ var ReconnectionManager = /*#__PURE__*/function () {
|
|
|
316
286
|
* @public
|
|
317
287
|
* @memberof ReconnectionManager
|
|
318
288
|
*/
|
|
319
|
-
|
|
320
289
|
}, {
|
|
321
290
|
key: "reconnect",
|
|
322
291
|
value: function () {
|
|
323
292
|
var _reconnect = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
324
293
|
var _this3 = this;
|
|
325
|
-
|
|
326
294
|
var _ref2,
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
295
|
+
_ref2$networkDisconne,
|
|
296
|
+
networkDisconnect,
|
|
297
|
+
_ref2$networkRetry,
|
|
298
|
+
networkRetry,
|
|
299
|
+
_args = arguments;
|
|
333
300
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
334
|
-
while (1) {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnect -->
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
301
|
+
while (1) switch (_context.prev = _context.next) {
|
|
302
|
+
case 0:
|
|
303
|
+
_ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$networkDisconne = _ref2.networkDisconnect, networkDisconnect = _ref2$networkDisconne === void 0 ? false : _ref2$networkDisconne, _ref2$networkRetry = _ref2.networkRetry, networkRetry = _ref2$networkRetry === void 0 ? false : _ref2$networkRetry;
|
|
304
|
+
_loggerProxy.default.logger.info("ReconnectionManager:index#reconnect --> Reconnection start for meeting ".concat(this.meeting.id, "."));
|
|
305
|
+
// First, validate that we can reconnect, if not, it will throw an error
|
|
306
|
+
_context.prev = 2;
|
|
307
|
+
this.validate();
|
|
308
|
+
_context.next = 10;
|
|
309
|
+
break;
|
|
310
|
+
case 6:
|
|
311
|
+
_context.prev = 6;
|
|
312
|
+
_context.t0 = _context["catch"](2);
|
|
313
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnect --> Reconnection unable to begin.', _context.t0);
|
|
314
|
+
throw _context.t0;
|
|
315
|
+
case 10:
|
|
316
|
+
if (!networkRetry) {
|
|
317
|
+
// Only log START metrics on the initial reconnect
|
|
318
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnect --> Sending reconnect start metric.');
|
|
319
|
+
_metrics.default.postEvent({
|
|
320
|
+
event: _config.eventType.MEDIA_RECONNECTING,
|
|
321
|
+
meeting: this.meeting
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
return _context.abrupt("return", this.executeReconnection({
|
|
325
|
+
networkDisconnect: networkDisconnect
|
|
326
|
+
}).then(function () {
|
|
327
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnect --> Reconnection successful.');
|
|
328
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnect --> Sending reconnect success metric.');
|
|
329
|
+
_metrics.default.postEvent({
|
|
330
|
+
event: _config.eventType.MEDIA_RECOVERED,
|
|
331
|
+
meeting: _this3.meeting,
|
|
332
|
+
data: {
|
|
333
|
+
recoveredBy: _config.reconnection.RECOVERED_BY_NEW
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
}).catch(function (reconnectError) {
|
|
337
|
+
if (reconnectError instanceof NeedsRetryError) {
|
|
338
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnect --> Reconnection not successful, retrying.');
|
|
339
|
+
// Reset our reconnect status since we are looping back to the beginning
|
|
340
|
+
_this3.status = _constants.RECONNECTION.STATE.DEFAULT_STATUS;
|
|
341
|
+
|
|
342
|
+
// This is a network retry, so we should not log START metrics again
|
|
343
|
+
return _this3.reconnect({
|
|
344
|
+
networkDisconnect: true,
|
|
345
|
+
networkRetry: true
|
|
363
346
|
});
|
|
364
347
|
}
|
|
365
348
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}).catch(function (reconnectError) {
|
|
381
|
-
if (reconnectError instanceof NeedsRetryError) {
|
|
382
|
-
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnect --> Reconnection not successful, retrying.'); // Reset our reconnect status since we are looping back to the beginning
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
_this3.status = _constants.RECONNECTION.STATE.DEFAULT_STATUS; // This is a network retry, so we should not log START metrics again
|
|
386
|
-
|
|
387
|
-
return _this3.reconnect({
|
|
388
|
-
networkDisconnect: true,
|
|
389
|
-
networkRetry: true
|
|
390
|
-
});
|
|
391
|
-
} // Reconnect has failed
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
_loggerProxy.default.logger.error('ReconnectionManager:index#reconnect --> Reconnection failed.', reconnectError.message);
|
|
395
|
-
|
|
396
|
-
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnect --> Sending reconnect abort metric.');
|
|
397
|
-
|
|
398
|
-
var reconnectMetric = {
|
|
399
|
-
event: _config.eventType.CALL_ABORTED,
|
|
400
|
-
meeting: _this3.meeting,
|
|
401
|
-
data: {
|
|
402
|
-
errors: [{
|
|
403
|
-
category: _config.errorObjects.category.expected,
|
|
404
|
-
errorCode: 2008,
|
|
405
|
-
fatal: true,
|
|
406
|
-
name: _config.errorObjects.name.mediaEngine,
|
|
407
|
-
shownToUser: false
|
|
408
|
-
}]
|
|
409
|
-
}
|
|
410
|
-
};
|
|
411
|
-
|
|
412
|
-
_metrics.default.postEvent(reconnectMetric);
|
|
413
|
-
|
|
414
|
-
if (reconnectError instanceof NeedsRejoinError) {
|
|
415
|
-
// send call aborded event with catogery as expected as we are trying to rejoin
|
|
416
|
-
if (_this3.autoRejoinEnabled) {
|
|
417
|
-
return _this3.rejoinMeeting(reconnectError.wasSharing);
|
|
418
|
-
}
|
|
349
|
+
// Reconnect has failed
|
|
350
|
+
_loggerProxy.default.logger.error('ReconnectionManager:index#reconnect --> Reconnection failed.', reconnectError.message);
|
|
351
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnect --> Sending reconnect abort metric.');
|
|
352
|
+
var reconnectMetric = {
|
|
353
|
+
event: _config.eventType.CALL_ABORTED,
|
|
354
|
+
meeting: _this3.meeting,
|
|
355
|
+
data: {
|
|
356
|
+
errors: [{
|
|
357
|
+
category: _config.errorObjects.category.expected,
|
|
358
|
+
errorCode: 2008,
|
|
359
|
+
fatal: true,
|
|
360
|
+
name: _config.errorObjects.name.mediaEngine,
|
|
361
|
+
shownToUser: false
|
|
362
|
+
}]
|
|
419
363
|
}
|
|
364
|
+
};
|
|
365
|
+
_metrics.default.postEvent(reconnectMetric);
|
|
366
|
+
if (reconnectError instanceof NeedsRejoinError) {
|
|
367
|
+
// send call aborded event with catogery as expected as we are trying to rejoin
|
|
420
368
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
369
|
+
if (_this3.autoRejoinEnabled) {
|
|
370
|
+
return _this3.rejoinMeeting(reconnectError.wasSharing);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
throw reconnectError;
|
|
374
|
+
}));
|
|
375
|
+
case 12:
|
|
376
|
+
case "end":
|
|
377
|
+
return _context.stop();
|
|
428
378
|
}
|
|
429
379
|
}, _callee, this, [[2, 6]]);
|
|
430
380
|
}));
|
|
431
|
-
|
|
432
381
|
function reconnect() {
|
|
433
382
|
return _reconnect.apply(this, arguments);
|
|
434
383
|
}
|
|
435
|
-
|
|
436
384
|
return reconnect;
|
|
437
385
|
}()
|
|
438
386
|
/**
|
|
@@ -443,132 +391,96 @@ var ReconnectionManager = /*#__PURE__*/function () {
|
|
|
443
391
|
* @private
|
|
444
392
|
* @memberof ReconnectionManager
|
|
445
393
|
*/
|
|
446
|
-
|
|
447
394
|
}, {
|
|
448
395
|
key: "executeReconnection",
|
|
449
396
|
value: function () {
|
|
450
397
|
var _executeReconnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref3) {
|
|
451
398
|
var _ref3$networkDisconne, networkDisconnect, wasSharing, media;
|
|
452
|
-
|
|
453
399
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
454
|
-
while (1) {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
_loggerProxy.default.logger.info('ReconnectionManager:index#executeReconnection --> Attempting to reconnect to meeting.');
|
|
461
|
-
|
|
462
|
-
if (!networkDisconnect) {
|
|
463
|
-
_context2.next = 15;
|
|
464
|
-
break;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
_context2.prev = 4;
|
|
468
|
-
_context2.next = 7;
|
|
469
|
-
return this.reconnectMercuryWebSocket();
|
|
470
|
-
|
|
471
|
-
case 7:
|
|
472
|
-
_loggerProxy.default.logger.error('ReconnectionManager:index#executeReconnection --> Websocket reconnected.', this.webex.internal.device.url);
|
|
473
|
-
|
|
400
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
401
|
+
case 0:
|
|
402
|
+
_ref3$networkDisconne = _ref3.networkDisconnect, networkDisconnect = _ref3$networkDisconne === void 0 ? false : _ref3$networkDisconne;
|
|
403
|
+
this.status = _constants.RECONNECTION.STATE.IN_PROGRESS;
|
|
404
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#executeReconnection --> Attempting to reconnect to meeting.');
|
|
405
|
+
if (!networkDisconnect) {
|
|
474
406
|
_context2.next = 15;
|
|
475
407
|
break;
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
408
|
+
}
|
|
409
|
+
_context2.prev = 4;
|
|
410
|
+
_context2.next = 7;
|
|
411
|
+
return this.reconnectMercuryWebSocket();
|
|
412
|
+
case 7:
|
|
413
|
+
_loggerProxy.default.logger.error('ReconnectionManager:index#executeReconnection --> Websocket reconnected.', this.webex.internal.device.url);
|
|
414
|
+
_context2.next = 15;
|
|
415
|
+
break;
|
|
416
|
+
case 10:
|
|
417
|
+
_context2.prev = 10;
|
|
418
|
+
_context2.t0 = _context2["catch"](4);
|
|
419
|
+
_loggerProxy.default.logger.error('ReconnectionManager:index#executeReconnection --> Unable to reconnect to websocket, giving up.');
|
|
420
|
+
this.status = _constants.RECONNECTION.STATE.FAILURE;
|
|
421
|
+
throw _context2.t0;
|
|
422
|
+
case 15:
|
|
423
|
+
wasSharing = this.meeting.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE;
|
|
424
|
+
_context2.prev = 16;
|
|
425
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#executeReconnection --> Updating meeting data from server.');
|
|
426
|
+
_context2.next = 20;
|
|
427
|
+
return this.webex.meetings.syncMeetings();
|
|
428
|
+
case 20:
|
|
429
|
+
_context2.next = 26;
|
|
430
|
+
break;
|
|
431
|
+
case 22:
|
|
432
|
+
_context2.prev = 22;
|
|
433
|
+
_context2.t1 = _context2["catch"](16);
|
|
434
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#executeReconnection --> Unable to sync meetings, reconnecting.', _context2.t1);
|
|
435
|
+
throw new NeedsRetryError(_context2.t1);
|
|
436
|
+
case 26:
|
|
437
|
+
if (!(!this.meeting || !this.webex.meetings.getMeetingByType(_constants._ID_, this.meeting.id))) {
|
|
438
|
+
_context2.next = 29;
|
|
497
439
|
break;
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
});
|
|
537
|
-
|
|
538
|
-
case 34:
|
|
539
|
-
_context2.prev = 34;
|
|
540
|
-
_context2.next = 37;
|
|
541
|
-
return this.reconnectMedia();
|
|
542
|
-
|
|
543
|
-
case 37:
|
|
544
|
-
media = _context2.sent;
|
|
545
|
-
|
|
546
|
-
_loggerProxy.default.logger.log('ReconnectionManager:index#executeReconnection --> Media reestablished');
|
|
547
|
-
|
|
548
|
-
this.status = _constants.RECONNECTION.STATE.COMPLETE;
|
|
549
|
-
return _context2.abrupt("return", media);
|
|
550
|
-
|
|
551
|
-
case 43:
|
|
552
|
-
_context2.prev = 43;
|
|
553
|
-
_context2.t2 = _context2["catch"](34);
|
|
554
|
-
|
|
555
|
-
_loggerProxy.default.logger.error('ReconnectionManager:index#executeReconnection --> Media reestablishment failed');
|
|
556
|
-
|
|
557
|
-
this.status = _constants.RECONNECTION.STATE.FAILURE;
|
|
558
|
-
throw _context2.t2;
|
|
559
|
-
|
|
560
|
-
case 48:
|
|
561
|
-
case "end":
|
|
562
|
-
return _context2.stop();
|
|
563
|
-
}
|
|
440
|
+
}
|
|
441
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#executeReconnection --> Meeting got deleted due to inactivity or ended remotely ');
|
|
442
|
+
throw new Error('Unable to rejoin a meeting already ended or inactive .');
|
|
443
|
+
case 29:
|
|
444
|
+
_loggerProxy.default.logger.info("ReconnectionManager:index#executeReconnection --> Current state of meeting is ".concat(this.meeting.state));
|
|
445
|
+
|
|
446
|
+
// If the meeting state was left, no longer reconnect media
|
|
447
|
+
if (!(this.meeting.state === _constants._LEFT_)) {
|
|
448
|
+
_context2.next = 34;
|
|
449
|
+
break;
|
|
450
|
+
}
|
|
451
|
+
if (!(this.meeting.type === _constants._CALL_)) {
|
|
452
|
+
_context2.next = 33;
|
|
453
|
+
break;
|
|
454
|
+
}
|
|
455
|
+
throw new Error('Unable to rejoin a call in LEFT state.');
|
|
456
|
+
case 33:
|
|
457
|
+
throw new NeedsRejoinError({
|
|
458
|
+
wasSharing: wasSharing
|
|
459
|
+
});
|
|
460
|
+
case 34:
|
|
461
|
+
_context2.prev = 34;
|
|
462
|
+
_context2.next = 37;
|
|
463
|
+
return this.reconnectMedia();
|
|
464
|
+
case 37:
|
|
465
|
+
media = _context2.sent;
|
|
466
|
+
_loggerProxy.default.logger.log('ReconnectionManager:index#executeReconnection --> Media reestablished');
|
|
467
|
+
this.status = _constants.RECONNECTION.STATE.COMPLETE;
|
|
468
|
+
return _context2.abrupt("return", media);
|
|
469
|
+
case 43:
|
|
470
|
+
_context2.prev = 43;
|
|
471
|
+
_context2.t2 = _context2["catch"](34);
|
|
472
|
+
_loggerProxy.default.logger.error('ReconnectionManager:index#executeReconnection --> Media reestablishment failed');
|
|
473
|
+
this.status = _constants.RECONNECTION.STATE.FAILURE;
|
|
474
|
+
throw _context2.t2;
|
|
475
|
+
case 48:
|
|
476
|
+
case "end":
|
|
477
|
+
return _context2.stop();
|
|
564
478
|
}
|
|
565
479
|
}, _callee2, this, [[4, 10], [16, 22], [34, 43]]);
|
|
566
480
|
}));
|
|
567
|
-
|
|
568
481
|
function executeReconnection(_x) {
|
|
569
482
|
return _executeReconnection.apply(this, arguments);
|
|
570
483
|
}
|
|
571
|
-
|
|
572
484
|
return executeReconnection;
|
|
573
485
|
}()
|
|
574
486
|
/**
|
|
@@ -578,110 +490,83 @@ var ReconnectionManager = /*#__PURE__*/function () {
|
|
|
578
490
|
* @param {boolean} wasSharing
|
|
579
491
|
* @returns {Promise}
|
|
580
492
|
*/
|
|
581
|
-
|
|
582
493
|
}, {
|
|
583
494
|
key: "rejoinMeeting",
|
|
584
495
|
value: function () {
|
|
585
496
|
var _rejoinMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
586
497
|
var wasSharing,
|
|
587
|
-
|
|
498
|
+
_args3 = arguments;
|
|
588
499
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
589
|
-
while (1) {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
// Stop the share streams if user tried to rejoin
|
|
607
|
-
_media.default.stopTracks(this.meeting.mediaProperties.shareTrack);
|
|
608
|
-
|
|
609
|
-
this.meeting.isSharing = false;
|
|
610
|
-
|
|
611
|
-
if (this.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
|
|
612
|
-
this.meeting.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
this.meeting.mediaProperties.mediaDirection.sendShare = false;
|
|
616
|
-
|
|
617
|
-
_triggerProxy.default.trigger(this.meeting, {
|
|
618
|
-
file: 'reconnection-manager/index',
|
|
619
|
-
function: 'rejoinMeeting'
|
|
620
|
-
}, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL, {
|
|
621
|
-
reason: _constants.SHARE_STOPPED_REASON.MEETING_REJOIN
|
|
622
|
-
});
|
|
500
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
501
|
+
case 0:
|
|
502
|
+
wasSharing = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : false;
|
|
503
|
+
_context3.prev = 1;
|
|
504
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#rejoinMeeting --> attemping meeting rejoin');
|
|
505
|
+
_context3.next = 5;
|
|
506
|
+
return this.meeting.join({
|
|
507
|
+
rejoin: true
|
|
508
|
+
});
|
|
509
|
+
case 5:
|
|
510
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#rejoinMeeting --> meeting rejoined');
|
|
511
|
+
if (wasSharing) {
|
|
512
|
+
// Stop the share streams if user tried to rejoin
|
|
513
|
+
this.meeting.setLocalShareTrack(null);
|
|
514
|
+
this.meeting.isSharing = false;
|
|
515
|
+
if (this.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
|
|
516
|
+
this.meeting.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
|
|
623
517
|
}
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
_context3.t0 = _context3["catch"](1);
|
|
631
|
-
this.rejoinAttempts += 1;
|
|
632
|
-
|
|
633
|
-
if (!(this.rejoinAttempts <= this.maxRejoinAttempts)) {
|
|
634
|
-
_context3.next = 17;
|
|
635
|
-
break;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
_loggerProxy.default.logger.info("ReconnectionManager:index#rejoinMeeting --> Unable to rejoin meeting, attempt #".concat(this.rejoinAttempts, ", retrying."), _context3.t0);
|
|
639
|
-
|
|
640
|
-
this.rejoinMeeting();
|
|
641
|
-
_context3.next = 21;
|
|
642
|
-
break;
|
|
643
|
-
|
|
644
|
-
case 17:
|
|
645
|
-
_loggerProxy.default.logger.error('ReconnectionManager:index#rejoinMeeting --> Unable to rejoin meeting after max attempts.', _context3.t0);
|
|
646
|
-
|
|
647
|
-
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_MAX_REJOIN_FAILURE, {
|
|
648
|
-
locus_id: this.meeting.locusUrl.split('/').pop(),
|
|
649
|
-
reason: _context3.t0.message,
|
|
650
|
-
stack: _context3.t0.stack
|
|
518
|
+
this.meeting.mediaProperties.mediaDirection.sendShare = false;
|
|
519
|
+
_triggerProxy.default.trigger(this.meeting, {
|
|
520
|
+
file: 'reconnection-manager/index',
|
|
521
|
+
function: 'rejoinMeeting'
|
|
522
|
+
}, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL, {
|
|
523
|
+
reason: _constants.SHARE_STOPPED_REASON.MEETING_REJOIN
|
|
651
524
|
});
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
case 24:
|
|
662
|
-
_context3.next = 30;
|
|
525
|
+
}
|
|
526
|
+
_context3.next = 21;
|
|
527
|
+
break;
|
|
528
|
+
case 9:
|
|
529
|
+
_context3.prev = 9;
|
|
530
|
+
_context3.t0 = _context3["catch"](1);
|
|
531
|
+
this.rejoinAttempts += 1;
|
|
532
|
+
if (!(this.rejoinAttempts <= this.maxRejoinAttempts)) {
|
|
533
|
+
_context3.next = 17;
|
|
663
534
|
break;
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
535
|
+
}
|
|
536
|
+
_loggerProxy.default.logger.info("ReconnectionManager:index#rejoinMeeting --> Unable to rejoin meeting, attempt #".concat(this.rejoinAttempts, ", retrying."), _context3.t0);
|
|
537
|
+
this.rejoinMeeting();
|
|
538
|
+
_context3.next = 21;
|
|
539
|
+
break;
|
|
540
|
+
case 17:
|
|
541
|
+
_loggerProxy.default.logger.error('ReconnectionManager:index#rejoinMeeting --> Unable to rejoin meeting after max attempts.', _context3.t0);
|
|
542
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_MAX_REJOIN_FAILURE, {
|
|
543
|
+
locus_id: this.meeting.locusUrl.split('/').pop(),
|
|
544
|
+
reason: _context3.t0.message,
|
|
545
|
+
stack: _context3.t0.stack
|
|
546
|
+
});
|
|
547
|
+
this.status = _constants.RECONNECTION.STATE.FAILURE;
|
|
548
|
+
throw _context3.t0;
|
|
549
|
+
case 21:
|
|
550
|
+
_context3.prev = 21;
|
|
551
|
+
_context3.next = 24;
|
|
552
|
+
return this.reconnectMedia();
|
|
553
|
+
case 24:
|
|
554
|
+
_context3.next = 30;
|
|
555
|
+
break;
|
|
556
|
+
case 26:
|
|
557
|
+
_context3.prev = 26;
|
|
558
|
+
_context3.t1 = _context3["catch"](21);
|
|
559
|
+
_loggerProxy.default.logger.error('ReconnectionManager:index#rejoinMeeting --> Unable to reestablish media after rejoining.', _context3.t1);
|
|
560
|
+
throw _context3.t1;
|
|
561
|
+
case 30:
|
|
562
|
+
case "end":
|
|
563
|
+
return _context3.stop();
|
|
677
564
|
}
|
|
678
565
|
}, _callee3, this, [[1, 9], [21, 26]]);
|
|
679
566
|
}));
|
|
680
|
-
|
|
681
567
|
function rejoinMeeting() {
|
|
682
568
|
return _rejoinMeeting.apply(this, arguments);
|
|
683
569
|
}
|
|
684
|
-
|
|
685
570
|
return rejoinMeeting;
|
|
686
571
|
}()
|
|
687
572
|
/**
|
|
@@ -689,46 +574,50 @@ var ReconnectionManager = /*#__PURE__*/function () {
|
|
|
689
574
|
* @private
|
|
690
575
|
* @memberof ReconnectionManager
|
|
691
576
|
*/
|
|
692
|
-
|
|
693
577
|
}, {
|
|
694
578
|
key: "reconnectMedia",
|
|
695
579
|
value: function () {
|
|
696
580
|
var _reconnectMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
697
|
-
var turnServerResult,
|
|
581
|
+
var turnServerResult, iceServers;
|
|
698
582
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
699
|
-
while (1) {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
583
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
584
|
+
case 0:
|
|
585
|
+
_loggerProxy.default.logger.log('ReconnectionManager:index#reconnectMedia --> Begin reestablishment of media');
|
|
586
|
+
|
|
587
|
+
// do the TURN server discovery again since the TURN server might change
|
|
588
|
+
_context4.next = 3;
|
|
589
|
+
return this.meeting.roap.doTurnDiscovery(this.meeting, true);
|
|
590
|
+
case 3:
|
|
591
|
+
turnServerResult = _context4.sent;
|
|
592
|
+
iceServers = [];
|
|
593
|
+
if (turnServerResult.turnServerInfo) {
|
|
594
|
+
iceServers.push({
|
|
595
|
+
urls: turnServerResult.turnServerInfo.url,
|
|
596
|
+
username: turnServerResult.turnServerInfo.username || '',
|
|
597
|
+
credential: turnServerResult.turnServerInfo.password || ''
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
_context4.next = 8;
|
|
601
|
+
return this.meeting.mediaProperties.webrtcMediaConnection.reconnect(iceServers);
|
|
602
|
+
case 8:
|
|
603
|
+
// resend media requests
|
|
604
|
+
if (this.meeting.isMultistream) {
|
|
605
|
+
(0, _values.default)(this.meeting.mediaRequestManagers).forEach(function (mediaRequestManager) {
|
|
606
|
+
return (
|
|
607
|
+
// @ts-ignore - Fix type
|
|
608
|
+
mediaRequestManager.commit()
|
|
609
|
+
);
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
case 9:
|
|
613
|
+
case "end":
|
|
614
|
+
return _context4.stop();
|
|
724
615
|
}
|
|
725
616
|
}, _callee4, this);
|
|
726
617
|
}));
|
|
727
|
-
|
|
728
618
|
function reconnectMedia() {
|
|
729
619
|
return _reconnectMedia.apply(this, arguments);
|
|
730
620
|
}
|
|
731
|
-
|
|
732
621
|
return reconnectMedia;
|
|
733
622
|
}()
|
|
734
623
|
/**
|
|
@@ -737,83 +626,60 @@ var ReconnectionManager = /*#__PURE__*/function () {
|
|
|
737
626
|
* @private
|
|
738
627
|
* @memberof ReconnectionManager
|
|
739
628
|
*/
|
|
740
|
-
|
|
741
629
|
}, {
|
|
742
630
|
key: "reconnectMercuryWebSocket",
|
|
743
631
|
value: function () {
|
|
744
632
|
var _reconnectMercuryWebSocket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
745
633
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
746
|
-
while (1) {
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
if (!this.webex.internal.mercury.connected) {
|
|
753
|
-
_context5.next = 13;
|
|
754
|
-
break;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnectMercuryWebSocket --> Disconnecting existing websocket.');
|
|
758
|
-
|
|
759
|
-
_context5.prev = 3;
|
|
760
|
-
_context5.next = 6;
|
|
761
|
-
return this.webex.internal.mercury.disconnect();
|
|
762
|
-
|
|
763
|
-
case 6:
|
|
764
|
-
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnectMercuryWebSocket --> Websocket disconnected successfully.');
|
|
765
|
-
|
|
634
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
635
|
+
case 0:
|
|
636
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnectMercuryWebSocket --> Reconnecting websocket.');
|
|
637
|
+
// First, attempt to disconnect if we think we are already connected.
|
|
638
|
+
if (!this.webex.internal.mercury.connected) {
|
|
766
639
|
_context5.next = 13;
|
|
767
640
|
break;
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
case 24:
|
|
801
|
-
case "end":
|
|
802
|
-
return _context5.stop();
|
|
803
|
-
}
|
|
641
|
+
}
|
|
642
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnectMercuryWebSocket --> Disconnecting existing websocket.');
|
|
643
|
+
_context5.prev = 3;
|
|
644
|
+
_context5.next = 6;
|
|
645
|
+
return this.webex.internal.mercury.disconnect();
|
|
646
|
+
case 6:
|
|
647
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnectMercuryWebSocket --> Websocket disconnected successfully.');
|
|
648
|
+
_context5.next = 13;
|
|
649
|
+
break;
|
|
650
|
+
case 9:
|
|
651
|
+
_context5.prev = 9;
|
|
652
|
+
_context5.t0 = _context5["catch"](3);
|
|
653
|
+
// If we can't disconnect, the sdk is in such a bad state that reconnecting is not going to happen.
|
|
654
|
+
_loggerProxy.default.logger.error('ReconnectionManager:index#reconnectMercuryWebSocket --> Unable to disconnect from websocket, giving up.', _context5.t0);
|
|
655
|
+
throw _context5.t0;
|
|
656
|
+
case 13:
|
|
657
|
+
_context5.prev = 13;
|
|
658
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnectMercuryWebSocket --> Connecting websocket.');
|
|
659
|
+
_context5.next = 17;
|
|
660
|
+
return this.webex.internal.mercury.connect();
|
|
661
|
+
case 17:
|
|
662
|
+
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnectMercuryWebSocket --> Websocket connected successfully.');
|
|
663
|
+
_context5.next = 24;
|
|
664
|
+
break;
|
|
665
|
+
case 20:
|
|
666
|
+
_context5.prev = 20;
|
|
667
|
+
_context5.t1 = _context5["catch"](13);
|
|
668
|
+
_loggerProxy.default.logger.error('ReconnectionManager:index#reconnectMercuryWebSocket --> Unable to connect to websocket, giving up.', _context5.t1);
|
|
669
|
+
throw _context5.t1;
|
|
670
|
+
case 24:
|
|
671
|
+
case "end":
|
|
672
|
+
return _context5.stop();
|
|
804
673
|
}
|
|
805
674
|
}, _callee5, this, [[3, 9], [13, 20]]);
|
|
806
675
|
}));
|
|
807
|
-
|
|
808
676
|
function reconnectMercuryWebSocket() {
|
|
809
677
|
return _reconnectMercuryWebSocket.apply(this, arguments);
|
|
810
678
|
}
|
|
811
|
-
|
|
812
679
|
return reconnectMercuryWebSocket;
|
|
813
680
|
}()
|
|
814
681
|
}]);
|
|
815
682
|
return ReconnectionManager;
|
|
816
683
|
}();
|
|
817
|
-
|
|
818
684
|
exports.default = ReconnectionManager;
|
|
819
685
|
//# sourceMappingURL=index.js.map
|