@webex/plugin-meetings 3.5.0-next.2 → 3.5.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/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/media/index.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +3 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +6 -3
- package/dist/meeting/index.js.map +1 -1
- package/dist/meetings/index.js +71 -21
- package/dist/meetings/index.js.map +1 -1
- package/dist/types/constants.d.ts +2 -1
- package/dist/types/meeting/in-meeting-actions.d.ts +2 -0
- package/dist/types/meetings/index.d.ts +26 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/constants.ts +1 -0
- package/src/media/index.ts +1 -1
- package/src/meeting/in-meeting-actions.ts +3 -0
- package/src/meeting/index.ts +6 -2
- package/src/meetings/index.ts +91 -32
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -0
- package/test/unit/spec/meeting/index.js +11 -8
- package/test/unit/spec/meetings/index.js +100 -9
- package/dist/rtcMetrics/constants.js +0 -11
- package/dist/rtcMetrics/constants.js.map +0 -1
- package/dist/rtcMetrics/index.js +0 -197
- package/dist/rtcMetrics/index.js.map +0 -1
- package/dist/types/rtcMetrics/constants.d.ts +0 -4
- package/dist/types/rtcMetrics/index.d.ts +0 -71
- package/src/rtcMetrics/constants.ts +0 -3
- package/src/rtcMetrics/index.ts +0 -186
- package/test/unit/spec/rtcMetrics/index.ts +0 -154
package/dist/meetings/index.js
CHANGED
|
@@ -14,6 +14,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
14
14
|
value: true
|
|
15
15
|
});
|
|
16
16
|
exports.default = void 0;
|
|
17
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/map"));
|
|
17
18
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
18
19
|
var _now = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/date/now"));
|
|
19
20
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
@@ -28,6 +29,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
|
|
|
28
29
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
29
30
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
30
31
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
32
|
+
var _lodash = require("lodash");
|
|
31
33
|
require("@webex/internal-plugin-mercury");
|
|
32
34
|
require("@webex/internal-plugin-conversation");
|
|
33
35
|
require("@webex/internal-plugin-metrics");
|
|
@@ -152,6 +154,10 @@ var MediaLogger = /*#__PURE__*/function () {
|
|
|
152
154
|
* @property {String} type what type of meeting it was
|
|
153
155
|
* @memberof Meetings
|
|
154
156
|
*/
|
|
157
|
+
/**
|
|
158
|
+
* Object containing only the most basic information about a meeting.
|
|
159
|
+
* This is the information that is kept even after the meeting is deleted from the MeetingCollection
|
|
160
|
+
*/
|
|
155
161
|
/**
|
|
156
162
|
* Maintain a cache of meetings and sync with services.
|
|
157
163
|
* @class
|
|
@@ -185,6 +191,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
185
191
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "loggerRequest", void 0);
|
|
186
192
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "media", void 0);
|
|
187
193
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingCollection", void 0);
|
|
194
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "deletedMeetings", void 0);
|
|
188
195
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "personalMeetingRoom", void 0);
|
|
189
196
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "preferredWebexSite", void 0);
|
|
190
197
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "reachability", void 0);
|
|
@@ -278,6 +285,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
278
285
|
webex: _this.webex
|
|
279
286
|
});
|
|
280
287
|
_this.meetingCollection = new _collection.default();
|
|
288
|
+
_this.deletedMeetings = new _map.default();
|
|
289
|
+
|
|
281
290
|
/**
|
|
282
291
|
* The PersonalMeetingRoom object to interact with server
|
|
283
292
|
* @instance
|
|
@@ -771,13 +780,14 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
771
780
|
* Explicitly sets up the meetings plugin by registering
|
|
772
781
|
* the device, connecting to mercury, and listening for locus events.
|
|
773
782
|
*
|
|
783
|
+
* @param {DeviceRegistrationOptions} [deviceRegistrationOptions] - The options for registering the device (optional)
|
|
774
784
|
* @returns {Promise}
|
|
775
785
|
* @public
|
|
776
786
|
* @memberof Meetings
|
|
777
787
|
*/
|
|
778
788
|
}, {
|
|
779
789
|
key: "register",
|
|
780
|
-
value: function register() {
|
|
790
|
+
value: function register(deviceRegistrationOptions) {
|
|
781
791
|
var _this5 = this;
|
|
782
792
|
// @ts-ignore
|
|
783
793
|
if (!this.webex.canAuthorize) {
|
|
@@ -792,7 +802,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
792
802
|
_loggerProxy.default.logger.error("Meetings:index#register --> GDM error, ".concat(error.message));
|
|
793
803
|
}),
|
|
794
804
|
// @ts-ignore
|
|
795
|
-
this.webex.internal.device.register()
|
|
805
|
+
this.webex.internal.device.register(deviceRegistrationOptions)
|
|
796
806
|
// @ts-ignore
|
|
797
807
|
.then(function () {
|
|
798
808
|
return _loggerProxy.default.logger.info( // @ts-ignore
|
|
@@ -950,29 +960,36 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
950
960
|
key: "fetchUserPreferredWebexSite",
|
|
951
961
|
value: function fetchUserPreferredWebexSite() {
|
|
952
962
|
var _this9 = this;
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
// fall back to getting the preferred site from the user information
|
|
962
|
-
if (!_this9.preferredWebexSite) {
|
|
963
|
-
// @ts-ignore
|
|
964
|
-
return _this9.webex.internal.user.get().then(function (user) {
|
|
965
|
-
var _user$userPreferences, _user$userPreferences2;
|
|
966
|
-
var preferredWebexSite = user === null || user === void 0 ? void 0 : (_user$userPreferences = user.userPreferences) === null || _user$userPreferences === void 0 ? void 0 : (_user$userPreferences2 = _user$userPreferences.userPreferencesItems) === null || _user$userPreferences2 === void 0 ? void 0 : _user$userPreferences2.preferredWebExSite;
|
|
967
|
-
if (preferredWebexSite) {
|
|
963
|
+
// @ts-ignore
|
|
964
|
+
return this.webex.people._getMe().then(function (me) {
|
|
965
|
+
var isGuestUser = me.type === 'appuser';
|
|
966
|
+
if (!isGuestUser) {
|
|
967
|
+
return _this9.request.getMeetingPreferences().then(function (res) {
|
|
968
|
+
if (res) {
|
|
969
|
+
var preferredWebexSite = _util2.default.parseDefaultSiteFromMeetingPreferences(res);
|
|
968
970
|
_this9.preferredWebexSite = preferredWebexSite;
|
|
969
971
|
// @ts-ignore
|
|
970
972
|
_this9.webex.internal.services._getCatalog().addAllowedDomains([preferredWebexSite]);
|
|
971
|
-
} else {
|
|
972
|
-
throw new Error('site not found');
|
|
973
973
|
}
|
|
974
|
-
|
|
975
|
-
|
|
974
|
+
|
|
975
|
+
// fall back to getting the preferred site from the user information
|
|
976
|
+
if (!_this9.preferredWebexSite) {
|
|
977
|
+
// @ts-ignore
|
|
978
|
+
return _this9.webex.internal.user.get().then(function (user) {
|
|
979
|
+
var _user$userPreferences, _user$userPreferences2;
|
|
980
|
+
var preferredWebexSite = user === null || user === void 0 ? void 0 : (_user$userPreferences = user.userPreferences) === null || _user$userPreferences === void 0 ? void 0 : (_user$userPreferences2 = _user$userPreferences.userPreferencesItems) === null || _user$userPreferences2 === void 0 ? void 0 : _user$userPreferences2.preferredWebExSite;
|
|
981
|
+
if (preferredWebexSite) {
|
|
982
|
+
_this9.preferredWebexSite = preferredWebexSite;
|
|
983
|
+
// @ts-ignore
|
|
984
|
+
_this9.webex.internal.services._getCatalog().addAllowedDomains([preferredWebexSite]);
|
|
985
|
+
} else {
|
|
986
|
+
throw new Error('site not found');
|
|
987
|
+
}
|
|
988
|
+
}).catch(function () {
|
|
989
|
+
_loggerProxy.default.logger.error('Failed to fetch preferred site from user - no site will be set');
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
return _promise.default.resolve();
|
|
976
993
|
});
|
|
977
994
|
}
|
|
978
995
|
return _promise.default.resolve();
|
|
@@ -991,6 +1008,19 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
991
1008
|
return this.personalMeetingRoom;
|
|
992
1009
|
}
|
|
993
1010
|
|
|
1011
|
+
/**
|
|
1012
|
+
* Returns basic information about a meeting that exists or
|
|
1013
|
+
* used to exist in the MeetingCollection
|
|
1014
|
+
*
|
|
1015
|
+
* @param {string} meetingId
|
|
1016
|
+
* @returns {BasicMeetingInformation|undefined}
|
|
1017
|
+
*/
|
|
1018
|
+
}, {
|
|
1019
|
+
key: "getBasicMeetingInformation",
|
|
1020
|
+
value: function getBasicMeetingInformation(meetingId) {
|
|
1021
|
+
return this.meetingCollection.get(meetingId) || this.deletedMeetings.get(meetingId);
|
|
1022
|
+
}
|
|
1023
|
+
|
|
994
1024
|
/**
|
|
995
1025
|
* @param {Meeting} meeting
|
|
996
1026
|
* @param {Object} reason
|
|
@@ -1002,7 +1032,27 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1002
1032
|
}, {
|
|
1003
1033
|
key: "destroy",
|
|
1004
1034
|
value: function destroy(meeting, reason) {
|
|
1035
|
+
var _meeting$locusInfo, _meeting$locusInfo2, _meeting$locusInfo3, _meeting$locusInfo3$f, _meeting$locusInfo4, _meeting$locusInfo4$f;
|
|
1005
1036
|
_util.default.cleanUp(meeting);
|
|
1037
|
+
// keep some basic info about the deleted meeting forever
|
|
1038
|
+
this.deletedMeetings.set(meeting.id, {
|
|
1039
|
+
id: meeting.id,
|
|
1040
|
+
allowMediaInLobby: meeting.allowMediaInLobby,
|
|
1041
|
+
correlationId: meeting.correlationId,
|
|
1042
|
+
sessionCorrelationId: meeting.sessionCorrelationId,
|
|
1043
|
+
environment: meeting.environment,
|
|
1044
|
+
locusUrl: meeting.locusUrl,
|
|
1045
|
+
meetingInfo: (0, _lodash.cloneDeep)(meeting.meetingInfo),
|
|
1046
|
+
locusInfo: {
|
|
1047
|
+
// locusInfo can be quite big, so keep just the minimal info
|
|
1048
|
+
sequence: (_meeting$locusInfo = meeting.locusInfo) === null || _meeting$locusInfo === void 0 ? void 0 : _meeting$locusInfo.sequence,
|
|
1049
|
+
url: (_meeting$locusInfo2 = meeting.locusInfo) === null || _meeting$locusInfo2 === void 0 ? void 0 : _meeting$locusInfo2.url,
|
|
1050
|
+
fullState: {
|
|
1051
|
+
lastActive: (_meeting$locusInfo3 = meeting.locusInfo) === null || _meeting$locusInfo3 === void 0 ? void 0 : (_meeting$locusInfo3$f = _meeting$locusInfo3.fullState) === null || _meeting$locusInfo3$f === void 0 ? void 0 : _meeting$locusInfo3$f.lastActive,
|
|
1052
|
+
sessionId: (_meeting$locusInfo4 = meeting.locusInfo) === null || _meeting$locusInfo4 === void 0 ? void 0 : (_meeting$locusInfo4$f = _meeting$locusInfo4.fullState) === null || _meeting$locusInfo4$f === void 0 ? void 0 : _meeting$locusInfo4$f.sessionId
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1006
1056
|
this.meetingCollection.delete(meeting.id);
|
|
1007
1057
|
_triggerProxy.default.trigger(this, {
|
|
1008
1058
|
file: 'meetings',
|