@webex/plugin-meetings 3.0.0-beta.185 → 3.0.0-beta.187
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/common/queue.js +24 -9
- package/dist/common/queue.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +50 -16
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/parser.js +174 -59
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/meeting/muteState.js +1 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +7 -44
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +1 -1
- package/dist/meeting/util.js.map +1 -1
- package/dist/types/common/queue.d.ts +9 -7
- package/dist/types/locus-info/index.d.ts +7 -0
- package/dist/types/locus-info/parser.d.ts +50 -6
- package/dist/types/meeting/request.d.ts +3 -16
- package/package.json +19 -19
- package/src/common/queue.ts +22 -8
- package/src/locus-info/index.ts +53 -15
- package/src/locus-info/parser.ts +180 -38
- package/src/meeting/muteState.ts +1 -1
- package/src/meeting/request.ts +6 -47
- package/src/meeting/util.ts +1 -1
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/locus-info/index.js +352 -15
- package/test/unit/spec/locus-info/parser.js +0 -22
- package/test/unit/spec/meeting/muteState.js +1 -1
- package/test/unit/spec/meeting/utils.js +5 -5
package/dist/breakouts/index.js
CHANGED
|
@@ -1041,7 +1041,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
|
|
|
1041
1041
|
this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
|
|
1042
1042
|
}
|
|
1043
1043
|
},
|
|
1044
|
-
version: "3.0.0-beta.
|
|
1044
|
+
version: "3.0.0-beta.187"
|
|
1045
1045
|
});
|
|
1046
1046
|
var _default = Breakouts;
|
|
1047
1047
|
exports.default = _default;
|
package/dist/common/queue.js
CHANGED
|
@@ -10,23 +10,28 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
|
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
12
12
|
/**
|
|
13
|
-
* Simple queue
|
|
13
|
+
* Simple queue in which the elements are always sorted
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
15
|
+
var SortedQueue = /*#__PURE__*/function () {
|
|
16
|
+
// returns -1 if left < right, 0 if left === right, +1 if left > right
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
|
-
* @constructs
|
|
19
|
+
* @constructs SortedQueue
|
|
20
|
+
* @param {Function} compareFunc comparison function used for sorting the elements of the queue
|
|
18
21
|
*/
|
|
19
|
-
function
|
|
20
|
-
(0, _classCallCheck2.default)(this,
|
|
22
|
+
function SortedQueue(compareFunc) {
|
|
23
|
+
(0, _classCallCheck2.default)(this, SortedQueue);
|
|
21
24
|
(0, _defineProperty2.default)(this, "queue", void 0);
|
|
25
|
+
(0, _defineProperty2.default)(this, "compareFunc", void 0);
|
|
22
26
|
this.queue = [];
|
|
27
|
+
this.compareFunc = compareFunc;
|
|
23
28
|
}
|
|
24
29
|
|
|
25
30
|
/**
|
|
26
31
|
* Removes all of the elements from queue.
|
|
27
32
|
* @returns {undefined}
|
|
28
33
|
*/
|
|
29
|
-
(0, _createClass2.default)(
|
|
34
|
+
(0, _createClass2.default)(SortedQueue, [{
|
|
30
35
|
key: "clear",
|
|
31
36
|
value: function clear() {
|
|
32
37
|
this.queue = [];
|
|
@@ -40,7 +45,17 @@ var SimpleQueue = /*#__PURE__*/function () {
|
|
|
40
45
|
}, {
|
|
41
46
|
key: "enqueue",
|
|
42
47
|
value: function enqueue(item) {
|
|
43
|
-
this
|
|
48
|
+
var _this = this;
|
|
49
|
+
// Find the index of the first item in the queue that's greater or equal to the new item.
|
|
50
|
+
// That's where we want to insert the new item.
|
|
51
|
+
var idx = this.queue.findIndex(function (existingItem) {
|
|
52
|
+
return _this.compareFunc(existingItem, item) >= 0;
|
|
53
|
+
});
|
|
54
|
+
if (idx >= 0) {
|
|
55
|
+
this.queue.splice(idx, 0, item);
|
|
56
|
+
} else {
|
|
57
|
+
this.queue.push(item);
|
|
58
|
+
}
|
|
44
59
|
}
|
|
45
60
|
|
|
46
61
|
/**
|
|
@@ -67,7 +82,7 @@ var SimpleQueue = /*#__PURE__*/function () {
|
|
|
67
82
|
return this.queue.length;
|
|
68
83
|
}
|
|
69
84
|
}]);
|
|
70
|
-
return
|
|
85
|
+
return SortedQueue;
|
|
71
86
|
}();
|
|
72
|
-
exports.default =
|
|
87
|
+
exports.default = SortedQueue;
|
|
73
88
|
//# sourceMappingURL=queue.js.map
|
package/dist/common/queue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["SortedQueue","compareFunc","queue","item","idx","findIndex","existingItem","splice","push","length","shift"],"sources":["queue.ts"],"sourcesContent":["/**\n * Simple queue in which the elements are always sorted\n */\nexport default class SortedQueue<ItemType> {\n queue: ItemType[];\n // returns -1 if left < right, 0 if left === right, +1 if left > right\n compareFunc: (left: ItemType, right: ItemType) => number;\n\n /**\n * @constructs SortedQueue\n * @param {Function} compareFunc comparison function used for sorting the elements of the queue\n */\n constructor(compareFunc: (left: ItemType, right: ItemType) => number) {\n this.queue = [];\n this.compareFunc = compareFunc;\n }\n\n /**\n * Removes all of the elements from queue.\n * @returns {undefined}\n */\n clear() {\n this.queue = [];\n }\n\n /**\n * Inserts the specified element into the queue.\n * @param {object} item\n * @returns {undefined}\n */\n enqueue(item: ItemType) {\n // Find the index of the first item in the queue that's greater or equal to the new item.\n // That's where we want to insert the new item.\n const idx = this.queue.findIndex((existingItem) => {\n return this.compareFunc(existingItem, item) >= 0;\n });\n if (idx >= 0) {\n this.queue.splice(idx, 0, item);\n } else {\n this.queue.push(item);\n }\n }\n\n /**\n * Returns and removes the head of the queue.\n * Returns null if the queue is empty.\n * @returns {(object|null)} Queue item or null.\n */\n dequeue(): ItemType {\n if (this.queue.length === 0) {\n return null;\n }\n\n return this.queue.shift();\n }\n\n /**\n * Returns the number of items in queue.\n * @returns {number}\n */\n size() {\n return this.queue.length;\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AAFA,IAGqBA,WAAW;EAE9B;;EAGA;AACF;AACA;AACA;EACE,qBAAYC,WAAwD,EAAE;IAAA;IAAA;IAAA;IACpE,IAAI,CAACC,KAAK,GAAG,EAAE;IACf,IAAI,CAACD,WAAW,GAAGA,WAAW;EAChC;;EAEA;AACF;AACA;AACA;EAHE;IAAA;IAAA,OAIA,iBAAQ;MACN,IAAI,CAACC,KAAK,GAAG,EAAE;IACjB;;IAEA;AACF;AACA;AACA;AACA;EAJE;IAAA;IAAA,OAKA,iBAAQC,IAAc,EAAE;MAAA;MACtB;MACA;MACA,IAAMC,GAAG,GAAG,IAAI,CAACF,KAAK,CAACG,SAAS,CAAC,UAACC,YAAY,EAAK;QACjD,OAAO,KAAI,CAACL,WAAW,CAACK,YAAY,EAAEH,IAAI,CAAC,IAAI,CAAC;MAClD,CAAC,CAAC;MACF,IAAIC,GAAG,IAAI,CAAC,EAAE;QACZ,IAAI,CAACF,KAAK,CAACK,MAAM,CAACH,GAAG,EAAE,CAAC,EAAED,IAAI,CAAC;MACjC,CAAC,MAAM;QACL,IAAI,CAACD,KAAK,CAACM,IAAI,CAACL,IAAI,CAAC;MACvB;IACF;;IAEA;AACF;AACA;AACA;AACA;EAJE;IAAA;IAAA,OAKA,mBAAoB;MAClB,IAAI,IAAI,CAACD,KAAK,CAACO,MAAM,KAAK,CAAC,EAAE;QAC3B,OAAO,IAAI;MACb;MAEA,OAAO,IAAI,CAACP,KAAK,CAACQ,KAAK,EAAE;IAC3B;;IAEA;AACF;AACA;AACA;EAHE;IAAA;IAAA,OAIA,gBAAO;MACL,OAAO,IAAI,CAACR,KAAK,CAACO,MAAM;IAC1B;EAAC;EAAA;AAAA;AAAA"}
|
package/dist/locus-info/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/
|
|
|
15
15
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
16
16
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
18
|
+
var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
|
|
18
19
|
var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
19
20
|
var _assignWith2 = _interopRequireDefault(require("lodash/assignWith"));
|
|
20
21
|
var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
|
|
@@ -94,38 +95,71 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
|
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* @param {Locus} locus
|
|
98
|
+
* Does a Locus sync. It tries to get the latest delta DTO or if it can't, it falls back to getting the full Locus DTO.
|
|
99
|
+
*
|
|
100
100
|
* @param {Meeting} meeting
|
|
101
101
|
* @returns {undefined}
|
|
102
102
|
*/
|
|
103
103
|
(0, _createClass2.default)(LocusInfo, [{
|
|
104
|
+
key: "doLocusSync",
|
|
105
|
+
value: function doLocusSync(meeting) {
|
|
106
|
+
var _this2 = this;
|
|
107
|
+
var isDelta;
|
|
108
|
+
var url;
|
|
109
|
+
if (this.locusParser.workingCopy.syncUrl) {
|
|
110
|
+
url = this.locusParser.workingCopy.syncUrl;
|
|
111
|
+
isDelta = true;
|
|
112
|
+
} else {
|
|
113
|
+
url = meeting.locusUrl;
|
|
114
|
+
isDelta = false;
|
|
115
|
+
}
|
|
116
|
+
_loggerProxy.default.logger.info("Locus-info:index#doLocusSync --> doing Locus sync (getting ".concat(isDelta ? 'delta' : 'full', " DTO)"));
|
|
117
|
+
|
|
118
|
+
// return value ignored on purpose
|
|
119
|
+
meeting.meetingRequest.getLocusDTO({
|
|
120
|
+
url: url
|
|
121
|
+
}).then(function (res) {
|
|
122
|
+
if (isDelta) {
|
|
123
|
+
if (!(0, _isEmpty2.default)(res.body)) {
|
|
124
|
+
meeting.locusInfo.handleLocusDelta(res.body, meeting);
|
|
125
|
+
} else {
|
|
126
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> received empty body from syncUrl, so we already have latest Locus DTO');
|
|
127
|
+
}
|
|
128
|
+
} else {
|
|
129
|
+
meeting.locusInfo.onFullLocus(res.body);
|
|
130
|
+
}
|
|
131
|
+
}).finally(function () {
|
|
132
|
+
// Notify parser to resume processing delta events.
|
|
133
|
+
// Any deltas in the queue that have now been superseded by this sync will simply be ignored
|
|
134
|
+
_this2.locusParser.resume();
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Apply locus delta data to meeting
|
|
140
|
+
* @param {string} action Locus delta action
|
|
141
|
+
* @param {Locus} locus
|
|
142
|
+
* @param {Meeting} meeting
|
|
143
|
+
* @returns {undefined}
|
|
144
|
+
*/
|
|
145
|
+
}, {
|
|
104
146
|
key: "applyLocusDeltaData",
|
|
105
147
|
value: function applyLocusDeltaData(action, locus, meeting) {
|
|
106
|
-
var _this2 = this;
|
|
107
148
|
var _LocusDeltaParser$loc = _parser.default.loci,
|
|
108
149
|
DESYNC = _LocusDeltaParser$loc.DESYNC,
|
|
109
150
|
USE_CURRENT = _LocusDeltaParser$loc.USE_CURRENT,
|
|
110
|
-
USE_INCOMING = _LocusDeltaParser$loc.USE_INCOMING
|
|
151
|
+
USE_INCOMING = _LocusDeltaParser$loc.USE_INCOMING,
|
|
152
|
+
WAIT = _LocusDeltaParser$loc.WAIT;
|
|
111
153
|
switch (action) {
|
|
112
154
|
case USE_INCOMING:
|
|
113
155
|
meeting.locusInfo.onDeltaLocus(locus);
|
|
114
156
|
break;
|
|
115
157
|
case USE_CURRENT:
|
|
116
|
-
|
|
117
|
-
|
|
158
|
+
case WAIT:
|
|
159
|
+
// do nothing
|
|
118
160
|
break;
|
|
119
161
|
case DESYNC:
|
|
120
|
-
|
|
121
|
-
desync: true,
|
|
122
|
-
locusUrl: locus.url ? locus.url : meeting.locusUrl
|
|
123
|
-
}).then(function (res) {
|
|
124
|
-
meeting.locusInfo.onFullLocus(res.body);
|
|
125
|
-
// Notify parser to resume processing delta events
|
|
126
|
-
// now that we have full locus from DESYNC.
|
|
127
|
-
_this2.locusParser.resume();
|
|
128
|
-
});
|
|
162
|
+
this.doLocusSync(meeting);
|
|
129
163
|
break;
|
|
130
164
|
default:
|
|
131
165
|
_loggerProxy.default.logger.info("Locus-info:index#applyLocusDeltaData --> Unknown locus delta action: ".concat(action));
|