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