@webex/plugin-meetings 3.11.0-next.2 → 3.11.0-next.21
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/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/hashTree/hashTree.js +18 -0
- package/dist/hashTree/hashTree.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +307 -139
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/types.js +2 -1
- package/dist/hashTree/types.js.map +1 -1
- package/dist/hashTree/utils.js +10 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +55 -42
- package/dist/locus-info/index.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +57 -1
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/properties.js +4 -2
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/index.js +33 -22
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +108 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +76 -26
- package/dist/meetings/index.js.map +1 -1
- package/dist/metrics/constants.js +2 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/types/hashTree/hashTree.d.ts +7 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +47 -12
- package/dist/types/hashTree/types.d.ts +1 -0
- package/dist/types/hashTree/utils.d.ts +6 -0
- package/dist/types/locus-info/index.d.ts +9 -2
- package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
- package/dist/types/media/properties.d.ts +2 -1
- package/dist/types/meeting/index.d.ts +8 -5
- package/dist/types/meeting/util.d.ts +28 -0
- package/dist/types/meetings/index.d.ts +3 -1
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/types/reactions/reactions.type.d.ts +1 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/hashTree/hashTree.ts +17 -0
- package/src/hashTree/hashTreeParser.ts +294 -96
- package/src/hashTree/types.ts +1 -0
- package/src/hashTree/utils.ts +9 -0
- package/src/locus-info/index.ts +83 -35
- package/src/media/MediaConnectionAwaiter.ts +41 -1
- package/src/media/properties.ts +3 -1
- package/src/meeting/index.ts +24 -11
- package/src/meeting/util.ts +132 -1
- package/src/meetings/index.ts +93 -8
- package/src/metrics/constants.ts +1 -0
- package/src/multistream/mediaRequestManager.ts +1 -1
- package/src/reactions/reactions.type.ts +1 -0
- package/test/unit/spec/hashTree/hashTree.ts +66 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +942 -110
- package/test/unit/spec/locus-info/index.js +88 -17
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +41 -1
- package/test/unit/spec/media/properties.ts +12 -3
- package/test/unit/spec/meeting/index.js +160 -2
- package/test/unit/spec/meeting/utils.js +294 -22
- package/test/unit/spec/meetings/index.js +594 -17
package/dist/meetings/index.js
CHANGED
|
@@ -194,6 +194,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
194
194
|
(0, _defineProperty2.default)(_this, "preferredWebexSite", void 0);
|
|
195
195
|
(0, _defineProperty2.default)(_this, "reachability", void 0);
|
|
196
196
|
(0, _defineProperty2.default)(_this, "registered", void 0);
|
|
197
|
+
(0, _defineProperty2.default)(_this, "registrationPromise", void 0);
|
|
198
|
+
(0, _defineProperty2.default)(_this, "unregistrationPromise", void 0);
|
|
197
199
|
(0, _defineProperty2.default)(_this, "request", void 0);
|
|
198
200
|
(0, _defineProperty2.default)(_this, "geoHintInfo", void 0);
|
|
199
201
|
(0, _defineProperty2.default)(_this, "meetingInfo", void 0);
|
|
@@ -943,7 +945,11 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
943
945
|
value: function executeRegistrationStep(step, stepName) {
|
|
944
946
|
var _this5 = this;
|
|
945
947
|
return step().then(function () {
|
|
948
|
+
_loggerProxy.default.logger.info("Meetings:index#executeRegistrationStep --> INFO, ".concat(stepName, " completed"));
|
|
946
949
|
_this5.registrationStatus[stepName] = true;
|
|
950
|
+
}).catch(function (error) {
|
|
951
|
+
_loggerProxy.default.logger.error("Meetings:index#executeRegistrationStep --> ERROR, ".concat(stepName, " failed: ").concat(error.message));
|
|
952
|
+
return _promise.default.reject(error);
|
|
947
953
|
});
|
|
948
954
|
}
|
|
949
955
|
|
|
@@ -960,7 +966,20 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
960
966
|
key: "register",
|
|
961
967
|
value: function register(deviceRegistrationOptions) {
|
|
962
968
|
var _this6 = this;
|
|
963
|
-
|
|
969
|
+
if (this.unregistrationPromise) {
|
|
970
|
+
_loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin unregistration in progress, waiting to register');
|
|
971
|
+
this.registrationPromise = this.unregistrationPromise.catch(function () {}) // It doesn't matter what happened during unregistration
|
|
972
|
+
.finally(function () {
|
|
973
|
+
_loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin unregistration completed, proceeding to register');
|
|
974
|
+
_this6.registrationPromise = null;
|
|
975
|
+
return _this6.register(deviceRegistrationOptions);
|
|
976
|
+
});
|
|
977
|
+
return this.registrationPromise;
|
|
978
|
+
}
|
|
979
|
+
if (this.registrationPromise) {
|
|
980
|
+
_loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin registration in progress, returning existing promise');
|
|
981
|
+
return this.registrationPromise;
|
|
982
|
+
}
|
|
964
983
|
|
|
965
984
|
// @ts-ignore
|
|
966
985
|
if (!this.webex.canAuthorize) {
|
|
@@ -971,7 +990,9 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
971
990
|
_loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin already registered');
|
|
972
991
|
return _promise.default.resolve();
|
|
973
992
|
}
|
|
974
|
-
|
|
993
|
+
_loggerProxy.default.logger.info('Meetings:index#register --> INFO, Registering Meetings plugin');
|
|
994
|
+
this.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
|
|
995
|
+
this.registrationPromise = _promise.default.all([this.executeRegistrationStep(function () {
|
|
975
996
|
return _this6.fetchUserPreferredWebexSite();
|
|
976
997
|
}, 'fetchWebexSite'), this.executeRegistrationStep(function () {
|
|
977
998
|
return _this6.getGeoHint();
|
|
@@ -1012,7 +1033,10 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1012
1033
|
stack: error.stack
|
|
1013
1034
|
});
|
|
1014
1035
|
return _promise.default.reject(error);
|
|
1036
|
+
}).finally(function () {
|
|
1037
|
+
_this6.registrationPromise = null;
|
|
1015
1038
|
});
|
|
1039
|
+
return this.registrationPromise;
|
|
1016
1040
|
}
|
|
1017
1041
|
|
|
1018
1042
|
/**
|
|
@@ -1027,35 +1051,61 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1027
1051
|
key: "unregister",
|
|
1028
1052
|
value: function unregister() {
|
|
1029
1053
|
var _this7 = this;
|
|
1054
|
+
if (this.unregistrationPromise) {
|
|
1055
|
+
_loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin unregistration in progress, returning existing promise');
|
|
1056
|
+
return this.unregistrationPromise;
|
|
1057
|
+
}
|
|
1058
|
+
if (this.registrationPromise) {
|
|
1059
|
+
_loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin registration in progress, waiting to unregister');
|
|
1060
|
+
|
|
1061
|
+
// Wait for registration to complete (success or failure), then call unregister again
|
|
1062
|
+
this.unregistrationPromise = this.registrationPromise.catch(function () {}) // It doesn't matter what happened during registration
|
|
1063
|
+
.finally(function () {
|
|
1064
|
+
_loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin registration completed, proceeding to unregister');
|
|
1065
|
+
_this7.unregistrationPromise = null;
|
|
1066
|
+
return _this7.unregister();
|
|
1067
|
+
});
|
|
1068
|
+
return this.unregistrationPromise;
|
|
1069
|
+
}
|
|
1030
1070
|
if (!this.registered) {
|
|
1031
1071
|
_loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin already unregistered');
|
|
1032
1072
|
return _promise.default.resolve();
|
|
1033
1073
|
}
|
|
1034
1074
|
this.stopListeningForEvents();
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
)
|
|
1075
|
+
this.unregistrationPromise =
|
|
1076
|
+
// @ts-ignore
|
|
1077
|
+
this.webex.internal.mercury
|
|
1078
|
+
// Use code 3050 with a non-reconnecting reason to prevent Mercury auto-reconnect
|
|
1079
|
+
// during unregister. Without this, disconnect() defaults to code 1000/"Done" which
|
|
1080
|
+
// force-closes as "Done (forced)" - a normalReconnectReason that triggers auto-reconnect,
|
|
1081
|
+
// causing a race condition with device.unregister().
|
|
1082
|
+
.disconnect({
|
|
1083
|
+
code: 3050,
|
|
1084
|
+
reason: 'meetings unregister'
|
|
1085
|
+
})
|
|
1086
|
+
// @ts-ignore
|
|
1087
|
+
.then(function () {
|
|
1088
|
+
return _this7.webex.internal.device.unregister();
|
|
1089
|
+
}).catch(function (error) {
|
|
1090
|
+
// If error status code is 404, continue the chain
|
|
1091
|
+
if (error.statusCode === 404) {
|
|
1092
|
+
_loggerProxy.default.logger.info('Meetings:index#unregister --> 404 error during device unregister, proceeding normally');
|
|
1093
|
+
return; // returning undefined allows the chain to continue
|
|
1094
|
+
}
|
|
1095
|
+
// For any other status code, break the chain by rethrowing
|
|
1096
|
+
_loggerProxy.default.logger.error("Meetings:index#unregister --> Failed to unregister device: ".concat(error.message));
|
|
1097
|
+
throw error; // rethrow to break the promise chain
|
|
1098
|
+
}).then(function () {
|
|
1099
|
+
_triggerProxy.default.trigger(_this7, {
|
|
1100
|
+
file: 'meetings',
|
|
1101
|
+
function: 'unregister'
|
|
1102
|
+
}, _constants.EVENT_TRIGGERS.MEETINGS_UNREGISTERED);
|
|
1103
|
+
_this7.registered = false;
|
|
1104
|
+
_this7.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
|
|
1105
|
+
}).finally(function () {
|
|
1106
|
+
_this7.unregistrationPromise = null;
|
|
1107
|
+
});
|
|
1108
|
+
return this.unregistrationPromise;
|
|
1059
1109
|
}
|
|
1060
1110
|
}, {
|
|
1061
1111
|
key: "uploadLogs",
|