@webex/plugin-meetings 3.0.0-beta.131 → 3.0.0-beta.133
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/meeting/index.js +198 -196
- package/dist/meeting/index.js.map +1 -1
- package/dist/statsAnalyzer/index.js +0 -1
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/package.json +19 -19
- package/src/meeting/index.ts +11 -4
- package/src/statsAnalyzer/index.ts +0 -1
- package/test/unit/spec/meeting/index.js +23 -9
package/dist/meeting/index.js
CHANGED
|
@@ -4688,18 +4688,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4688
4688
|
while (1) switch (_context5.prev = _context5.next) {
|
|
4689
4689
|
case 0:
|
|
4690
4690
|
if (!_this34.config.enableAutomaticLLM) {
|
|
4691
|
-
_context5.next =
|
|
4691
|
+
_context5.next = 3;
|
|
4692
4692
|
break;
|
|
4693
4693
|
}
|
|
4694
4694
|
_context5.next = 3;
|
|
4695
4695
|
return _this34.updateLLMConnection();
|
|
4696
4696
|
case 3:
|
|
4697
|
-
// @ts-ignore - Fix type
|
|
4698
|
-
_this34.webex.internal.llm.on('event:relay.event', _this34.processRelayEvent);
|
|
4699
|
-
_loggerProxy.default.logger.info('Meeting:index#join --> enabled to receive relay events!');
|
|
4700
|
-
case 5:
|
|
4701
4697
|
return _context5.abrupt("return", join);
|
|
4702
|
-
case
|
|
4698
|
+
case 4:
|
|
4703
4699
|
case "end":
|
|
4704
4700
|
return _context5.stop();
|
|
4705
4701
|
}
|
|
@@ -4786,6 +4782,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4786
4782
|
key: "updateLLMConnection",
|
|
4787
4783
|
value: function () {
|
|
4788
4784
|
var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
4785
|
+
var _this35 = this;
|
|
4789
4786
|
var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, isJoined;
|
|
4790
4787
|
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
4791
4788
|
while (1) switch (_context7.prev = _context7.next) {
|
|
@@ -4815,7 +4812,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4815
4812
|
}
|
|
4816
4813
|
return _context7.abrupt("return", undefined);
|
|
4817
4814
|
case 10:
|
|
4818
|
-
return _context7.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl))
|
|
4815
|
+
return _context7.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
|
|
4816
|
+
// @ts-ignore - Fix type
|
|
4817
|
+
_this35.webex.internal.llm.on('event:relay.event', _this35.processRelayEvent);
|
|
4818
|
+
_loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
|
|
4819
|
+
return _promise.default.resolve(registerAndConnectResult);
|
|
4820
|
+
}));
|
|
4819
4821
|
case 11:
|
|
4820
4822
|
case "end":
|
|
4821
4823
|
return _context7.stop();
|
|
@@ -4865,7 +4867,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4865
4867
|
}, {
|
|
4866
4868
|
key: "dialInPstn",
|
|
4867
4869
|
value: function dialInPstn() {
|
|
4868
|
-
var
|
|
4870
|
+
var _this36 = this;
|
|
4869
4871
|
if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
|
|
4870
4872
|
|
|
4871
4873
|
var correlationId = this.correlationId,
|
|
@@ -4881,10 +4883,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4881
4883
|
}).catch(function (error) {
|
|
4882
4884
|
var _error$error2;
|
|
4883
4885
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
|
|
4884
|
-
correlation_id:
|
|
4885
|
-
dial_in_url:
|
|
4886
|
+
correlation_id: _this36.correlationId,
|
|
4887
|
+
dial_in_url: _this36.dialInUrl,
|
|
4886
4888
|
locus_id: locusUrl.split('/').pop(),
|
|
4887
|
-
client_url:
|
|
4889
|
+
client_url: _this36.deviceUrl,
|
|
4888
4890
|
reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
|
|
4889
4891
|
stack: error.stack
|
|
4890
4892
|
});
|
|
@@ -4902,7 +4904,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4902
4904
|
}, {
|
|
4903
4905
|
key: "dialOutPstn",
|
|
4904
4906
|
value: function dialOutPstn(phoneNumber) {
|
|
4905
|
-
var
|
|
4907
|
+
var _this37 = this;
|
|
4906
4908
|
if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
|
|
4907
4909
|
|
|
4908
4910
|
var correlationId = this.correlationId,
|
|
@@ -4919,10 +4921,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4919
4921
|
}).catch(function (error) {
|
|
4920
4922
|
var _error$error3;
|
|
4921
4923
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
|
|
4922
|
-
correlation_id:
|
|
4923
|
-
dial_out_url:
|
|
4924
|
+
correlation_id: _this37.correlationId,
|
|
4925
|
+
dial_out_url: _this37.dialOutUrl,
|
|
4924
4926
|
locus_id: locusUrl.split('/').pop(),
|
|
4925
|
-
client_url:
|
|
4927
|
+
client_url: _this37.deviceUrl,
|
|
4926
4928
|
reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
|
|
4927
4929
|
stack: error.stack
|
|
4928
4930
|
});
|
|
@@ -4953,7 +4955,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4953
4955
|
}, {
|
|
4954
4956
|
key: "moveTo",
|
|
4955
4957
|
value: function moveTo(resourceId) {
|
|
4956
|
-
var
|
|
4958
|
+
var _this38 = this;
|
|
4957
4959
|
if (!resourceId) {
|
|
4958
4960
|
throw new _parameter.default('Cannot move call without a resourceId.');
|
|
4959
4961
|
}
|
|
@@ -4989,12 +4991,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4989
4991
|
while (1) switch (_context8.prev = _context8.next) {
|
|
4990
4992
|
case 0:
|
|
4991
4993
|
_context8.prev = 0;
|
|
4992
|
-
if (!
|
|
4994
|
+
if (!_this38.isSharing) {
|
|
4993
4995
|
_context8.next = 4;
|
|
4994
4996
|
break;
|
|
4995
4997
|
}
|
|
4996
4998
|
_context8.next = 4;
|
|
4997
|
-
return
|
|
4999
|
+
return _this38.releaseScreenShareFloor();
|
|
4998
5000
|
case 4:
|
|
4999
5001
|
mediaSettings = {
|
|
5000
5002
|
mediaDirection: {
|
|
@@ -5006,22 +5008,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5006
5008
|
receiveShare: true
|
|
5007
5009
|
}
|
|
5008
5010
|
}; // clean up the local tracks
|
|
5009
|
-
|
|
5011
|
+
_this38.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
|
|
5010
5012
|
|
|
5011
5013
|
// close the existing local tracks
|
|
5012
5014
|
_context8.next = 8;
|
|
5013
|
-
return
|
|
5015
|
+
return _this38.closeLocalStream();
|
|
5014
5016
|
case 8:
|
|
5015
5017
|
_context8.next = 10;
|
|
5016
|
-
return
|
|
5018
|
+
return _this38.closeLocalShare();
|
|
5017
5019
|
case 10:
|
|
5018
|
-
|
|
5020
|
+
_this38.mediaProperties.unsetMediaTracks();
|
|
5019
5021
|
|
|
5020
5022
|
// when a move to is intiated by the client , Locus delets the existing media node from the server as soon the DX answers the meeting
|
|
5021
5023
|
// once the DX answers we establish connection back the media server with only receiveShare enabled
|
|
5022
5024
|
// @ts-ignore - reconnectMedia does not accept any argument
|
|
5023
5025
|
_context8.next = 13;
|
|
5024
|
-
return
|
|
5026
|
+
return _this38.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
|
|
5025
5027
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
|
|
5026
5028
|
});
|
|
5027
5029
|
case 13:
|
|
@@ -5032,8 +5034,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5032
5034
|
_context8.t0 = _context8["catch"](0);
|
|
5033
5035
|
_loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context8.t0);
|
|
5034
5036
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
|
|
5035
|
-
correlation_id:
|
|
5036
|
-
locus_id:
|
|
5037
|
+
correlation_id: _this38.correlationId,
|
|
5038
|
+
locus_id: _this38.locusUrl.split('/').pop(),
|
|
5037
5039
|
reason: _context8.t0.message,
|
|
5038
5040
|
stack: _context8.t0.stack
|
|
5039
5041
|
});
|
|
@@ -5048,12 +5050,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5048
5050
|
resourceId: resourceId,
|
|
5049
5051
|
moveToResource: true
|
|
5050
5052
|
}).then(function () {
|
|
5051
|
-
|
|
5053
|
+
_this38.meetingFiniteStateMachine.join();
|
|
5052
5054
|
}).catch(function (error) {
|
|
5053
|
-
|
|
5055
|
+
_this38.meetingFiniteStateMachine.fail(error);
|
|
5054
5056
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
|
|
5055
|
-
correlation_id:
|
|
5056
|
-
locus_id:
|
|
5057
|
+
correlation_id: _this38.correlationId,
|
|
5058
|
+
locus_id: _this38.locusUrl.split('/').pop(),
|
|
5057
5059
|
reason: error.message,
|
|
5058
5060
|
stack: error.stack
|
|
5059
5061
|
});
|
|
@@ -5072,7 +5074,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5072
5074
|
}, {
|
|
5073
5075
|
key: "moveFrom",
|
|
5074
5076
|
value: function moveFrom(resourceId) {
|
|
5075
|
-
var
|
|
5077
|
+
var _this39 = this;
|
|
5076
5078
|
// On moveFrom ask the developer to re capture it moveFrom then updateMedia
|
|
5077
5079
|
if (!resourceId) {
|
|
5078
5080
|
throw new _parameter.default('Cannot move call without a resourceId.');
|
|
@@ -5083,19 +5085,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5083
5085
|
meeting: this
|
|
5084
5086
|
});
|
|
5085
5087
|
return _util.default.joinMeetingOptions(this).then(function () {
|
|
5086
|
-
return _util.default.leaveMeeting(
|
|
5088
|
+
return _util.default.leaveMeeting(_this39, {
|
|
5087
5089
|
resourceId: resourceId,
|
|
5088
5090
|
correlationId: oldCorrelationId,
|
|
5089
5091
|
moveMeeting: true
|
|
5090
5092
|
}).then(function () {
|
|
5091
|
-
|
|
5093
|
+
_this39.resourceId = '';
|
|
5092
5094
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
|
|
5093
5095
|
});
|
|
5094
5096
|
}).catch(function (error) {
|
|
5095
|
-
|
|
5097
|
+
_this39.meetingFiniteStateMachine.fail(error);
|
|
5096
5098
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
|
|
5097
|
-
correlation_id:
|
|
5098
|
-
locus_id:
|
|
5099
|
+
correlation_id: _this39.correlationId,
|
|
5100
|
+
locus_id: _this39.locusUrl.split('/').pop(),
|
|
5099
5101
|
reason: error.message,
|
|
5100
5102
|
stack: error.stack
|
|
5101
5103
|
});
|
|
@@ -5160,9 +5162,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5160
5162
|
}, {
|
|
5161
5163
|
key: "forwardEvent",
|
|
5162
5164
|
value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
|
|
5163
|
-
var
|
|
5165
|
+
var _this40 = this;
|
|
5164
5166
|
eventEmitter.on(eventTypeToForward, function (data) {
|
|
5165
|
-
return _triggerProxy.default.trigger(
|
|
5167
|
+
return _triggerProxy.default.trigger(_this40, {
|
|
5166
5168
|
file: 'meetings',
|
|
5167
5169
|
function: 'addMedia'
|
|
5168
5170
|
}, meetingEventType, data);
|
|
@@ -5185,7 +5187,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5185
5187
|
}, {
|
|
5186
5188
|
key: "addMedia",
|
|
5187
5189
|
value: function addMedia() {
|
|
5188
|
-
var
|
|
5190
|
+
var _this41 = this;
|
|
5189
5191
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5190
5192
|
var LOG_HEADER = 'Meeting:index#addMedia -->';
|
|
5191
5193
|
var turnDiscoverySkippedReason;
|
|
@@ -5230,57 +5232,57 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5230
5232
|
}
|
|
5231
5233
|
});
|
|
5232
5234
|
return _util.default.validateOptions(options).then(function () {
|
|
5233
|
-
|
|
5234
|
-
correlationId:
|
|
5235
|
+
_this41.locusMediaRequest = new _locusMediaRequest.LocusMediaRequest({
|
|
5236
|
+
correlationId: _this41.correlationId,
|
|
5235
5237
|
device: {
|
|
5236
|
-
url:
|
|
5238
|
+
url: _this41.deviceUrl,
|
|
5237
5239
|
// @ts-ignore
|
|
5238
|
-
deviceType:
|
|
5240
|
+
deviceType: _this41.config.deviceType
|
|
5239
5241
|
},
|
|
5240
|
-
preferTranscoding: !
|
|
5242
|
+
preferTranscoding: !_this41.isMultistream
|
|
5241
5243
|
}, {
|
|
5242
5244
|
// @ts-ignore
|
|
5243
|
-
parent:
|
|
5245
|
+
parent: _this41.webex
|
|
5244
5246
|
});
|
|
5245
5247
|
}).then(function () {
|
|
5246
|
-
return
|
|
5248
|
+
return _this41.roap.doTurnDiscovery(_this41, false);
|
|
5247
5249
|
}).then(function (turnDiscoveryObject) {
|
|
5248
5250
|
turnDiscoverySkippedReason = turnDiscoveryObject.turnDiscoverySkippedReason;
|
|
5249
5251
|
turnServerUsed = !turnDiscoverySkippedReason;
|
|
5250
5252
|
var turnServerInfo = turnDiscoveryObject.turnServerInfo;
|
|
5251
|
-
|
|
5252
|
-
var mc =
|
|
5253
|
-
if (
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
return
|
|
5253
|
+
_this41.preMedia(localStream, localShare, mediaSettings);
|
|
5254
|
+
var mc = _this41.createMediaConnection(turnServerInfo, bundlePolicy);
|
|
5255
|
+
if (_this41.isMultistream) {
|
|
5256
|
+
_this41.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(_this41.receiveSlotManager, _this41.mediaRequestManagers, remoteMediaManagerConfig);
|
|
5257
|
+
_this41.forwardEvent(_this41.remoteMediaManager, _remoteMediaManager.Event.AudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_AUDIO_CREATED);
|
|
5258
|
+
_this41.forwardEvent(_this41.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
|
|
5259
|
+
_this41.forwardEvent(_this41.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
|
|
5260
|
+
return _this41.remoteMediaManager.start().then(function () {
|
|
5259
5261
|
return mc.initiateOffer();
|
|
5260
5262
|
});
|
|
5261
5263
|
}
|
|
5262
5264
|
return mc.initiateOffer();
|
|
5263
5265
|
}).then(function () {
|
|
5264
|
-
|
|
5266
|
+
_this41.setMercuryListener();
|
|
5265
5267
|
}).then(function () {
|
|
5266
|
-
return
|
|
5268
|
+
return _this41.getDevices().then(function (devices) {
|
|
5267
5269
|
_util.default.handleDeviceLogging(devices);
|
|
5268
5270
|
});
|
|
5269
5271
|
}).then(function () {
|
|
5270
|
-
|
|
5272
|
+
_this41.handleMediaLogging(_this41.mediaProperties);
|
|
5271
5273
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
|
|
5272
5274
|
|
|
5273
5275
|
// @ts-ignore - config coming from registerPlugin
|
|
5274
|
-
if (
|
|
5276
|
+
if (_this41.config.stats.enableStatsAnalyzer) {
|
|
5275
5277
|
// @ts-ignore - config coming from registerPlugin
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
+
_this41.networkQualityMonitor = new _networkQualityMonitor.default(_this41.config.stats);
|
|
5279
|
+
_this41.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(
|
|
5278
5280
|
// @ts-ignore - config coming from registerPlugin
|
|
5279
|
-
|
|
5280
|
-
return
|
|
5281
|
-
},
|
|
5282
|
-
|
|
5283
|
-
|
|
5281
|
+
_this41.config.stats, function (ssrc) {
|
|
5282
|
+
return _this41.receiveSlotManager.findReceiveSlotBySsrc(ssrc);
|
|
5283
|
+
}, _this41.networkQualityMonitor);
|
|
5284
|
+
_this41.setupStatsAnalyzerEventHandlers();
|
|
5285
|
+
_this41.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this41.sendNetworkQualityEvent.bind(_this41));
|
|
5284
5286
|
}
|
|
5285
5287
|
}).catch(function (error) {
|
|
5286
5288
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
|
|
@@ -5291,12 +5293,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5291
5293
|
|
|
5292
5294
|
// eslint-disable-next-line func-names
|
|
5293
5295
|
// eslint-disable-next-line prefer-arrow-callback
|
|
5294
|
-
if (
|
|
5296
|
+
if (_this41.type === _constants._CALL_) {
|
|
5295
5297
|
resolve();
|
|
5296
5298
|
}
|
|
5297
5299
|
var joiningTimer = setInterval(function () {
|
|
5298
5300
|
timerCount += 1;
|
|
5299
|
-
if (
|
|
5301
|
+
if (_this41.meetingState === _constants.FULL_STATE.ACTIVE) {
|
|
5300
5302
|
clearInterval(joiningTimer);
|
|
5301
5303
|
resolve();
|
|
5302
5304
|
}
|
|
@@ -5307,62 +5309,62 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5307
5309
|
}, 1000);
|
|
5308
5310
|
});
|
|
5309
5311
|
}).then(function () {
|
|
5310
|
-
return
|
|
5311
|
-
throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(
|
|
5312
|
+
return _this41.mediaProperties.waitForMediaConnectionConnected().catch(function () {
|
|
5313
|
+
throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(_this41.correlationId));
|
|
5312
5314
|
});
|
|
5313
5315
|
}).then(function () {
|
|
5314
5316
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
|
|
5315
5317
|
if (mediaSettings && mediaSettings.sendShare && localShare) {
|
|
5316
|
-
if (
|
|
5317
|
-
return
|
|
5318
|
+
if (_this41.state === _constants.MEETING_STATE.STATES.JOINED) {
|
|
5319
|
+
return _this41.requestScreenShareFloor();
|
|
5318
5320
|
}
|
|
5319
5321
|
|
|
5320
5322
|
// When the self state changes to JOINED then request the floor
|
|
5321
|
-
|
|
5323
|
+
_this41.floorGrantPending = true;
|
|
5322
5324
|
}
|
|
5323
5325
|
return {};
|
|
5324
5326
|
}).then(function () {
|
|
5325
|
-
return
|
|
5327
|
+
return _this41.mediaProperties.getCurrentConnectionType();
|
|
5326
5328
|
}).then(function (connectionType) {
|
|
5327
5329
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, {
|
|
5328
|
-
correlation_id:
|
|
5329
|
-
locus_id:
|
|
5330
|
+
correlation_id: _this41.correlationId,
|
|
5331
|
+
locus_id: _this41.locusUrl.split('/').pop(),
|
|
5330
5332
|
connectionType: connectionType,
|
|
5331
|
-
isMultistream:
|
|
5333
|
+
isMultistream: _this41.isMultistream
|
|
5332
5334
|
});
|
|
5333
5335
|
}).catch(function (error) {
|
|
5334
|
-
var
|
|
5336
|
+
var _this41$mediaProperti, _this41$mediaProperti2, _this41$mediaProperti3, _this41$mediaProperti4, _this41$mediaProperti5, _this41$mediaProperti6, _this41$mediaProperti7, _this41$mediaProperti8, _this41$mediaProperti9, _this41$mediaProperti10, _this41$mediaProperti11, _this41$mediaProperti12, _this41$mediaProperti13, _this41$mediaProperti14, _this41$mediaProperti15, _this41$mediaProperti16, _this41$mediaProperti17, _this41$mediaProperti18, _this41$mediaProperti19, _this41$mediaProperti20, _this41$mediaProperti21;
|
|
5335
5337
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
|
|
5336
|
-
correlation_id:
|
|
5337
|
-
locus_id:
|
|
5338
|
+
correlation_id: _this41.correlationId,
|
|
5339
|
+
locus_id: _this41.locusUrl.split('/').pop(),
|
|
5338
5340
|
reason: error.message,
|
|
5339
5341
|
stack: error.stack,
|
|
5340
5342
|
code: error.code,
|
|
5341
5343
|
turnDiscoverySkippedReason: turnDiscoverySkippedReason,
|
|
5342
5344
|
turnServerUsed: turnServerUsed,
|
|
5343
|
-
isMultistream:
|
|
5344
|
-
signalingState: ((
|
|
5345
|
-
connectionState: ((
|
|
5346
|
-
iceConnectionState: ((
|
|
5345
|
+
isMultistream: _this41.isMultistream,
|
|
5346
|
+
signalingState: ((_this41$mediaProperti = _this41.mediaProperties.webrtcMediaConnection) === null || _this41$mediaProperti === void 0 ? void 0 : (_this41$mediaProperti2 = _this41$mediaProperti.multistreamConnection) === null || _this41$mediaProperti2 === void 0 ? void 0 : (_this41$mediaProperti3 = _this41$mediaProperti2.pc) === null || _this41$mediaProperti3 === void 0 ? void 0 : (_this41$mediaProperti4 = _this41$mediaProperti3.pc) === null || _this41$mediaProperti4 === void 0 ? void 0 : _this41$mediaProperti4.signalingState) || ((_this41$mediaProperti5 = _this41.mediaProperties.webrtcMediaConnection) === null || _this41$mediaProperti5 === void 0 ? void 0 : (_this41$mediaProperti6 = _this41$mediaProperti5.mediaConnection) === null || _this41$mediaProperti6 === void 0 ? void 0 : (_this41$mediaProperti7 = _this41$mediaProperti6.pc) === null || _this41$mediaProperti7 === void 0 ? void 0 : _this41$mediaProperti7.signalingState) || 'unknown',
|
|
5347
|
+
connectionState: ((_this41$mediaProperti8 = _this41.mediaProperties.webrtcMediaConnection) === null || _this41$mediaProperti8 === void 0 ? void 0 : (_this41$mediaProperti9 = _this41$mediaProperti8.multistreamConnection) === null || _this41$mediaProperti9 === void 0 ? void 0 : (_this41$mediaProperti10 = _this41$mediaProperti9.pc) === null || _this41$mediaProperti10 === void 0 ? void 0 : (_this41$mediaProperti11 = _this41$mediaProperti10.pc) === null || _this41$mediaProperti11 === void 0 ? void 0 : _this41$mediaProperti11.connectionState) || ((_this41$mediaProperti12 = _this41.mediaProperties.webrtcMediaConnection) === null || _this41$mediaProperti12 === void 0 ? void 0 : (_this41$mediaProperti13 = _this41$mediaProperti12.mediaConnection) === null || _this41$mediaProperti13 === void 0 ? void 0 : (_this41$mediaProperti14 = _this41$mediaProperti13.pc) === null || _this41$mediaProperti14 === void 0 ? void 0 : _this41$mediaProperti14.connectionState) || 'unknown',
|
|
5348
|
+
iceConnectionState: ((_this41$mediaProperti15 = _this41.mediaProperties.webrtcMediaConnection) === null || _this41$mediaProperti15 === void 0 ? void 0 : (_this41$mediaProperti16 = _this41$mediaProperti15.multistreamConnection) === null || _this41$mediaProperti16 === void 0 ? void 0 : (_this41$mediaProperti17 = _this41$mediaProperti16.pc) === null || _this41$mediaProperti17 === void 0 ? void 0 : (_this41$mediaProperti18 = _this41$mediaProperti17.pc) === null || _this41$mediaProperti18 === void 0 ? void 0 : _this41$mediaProperti18.iceConnectionState) || ((_this41$mediaProperti19 = _this41.mediaProperties.webrtcMediaConnection) === null || _this41$mediaProperti19 === void 0 ? void 0 : (_this41$mediaProperti20 = _this41$mediaProperti19.mediaConnection) === null || _this41$mediaProperti20 === void 0 ? void 0 : (_this41$mediaProperti21 = _this41$mediaProperti20.pc) === null || _this41$mediaProperti21 === void 0 ? void 0 : _this41$mediaProperti21.iceConnectionState) || 'unknown'
|
|
5347
5349
|
});
|
|
5348
5350
|
|
|
5349
5351
|
// Clean up stats analyzer, peer connection, and turn off listeners
|
|
5350
|
-
var stopStatsAnalyzer =
|
|
5352
|
+
var stopStatsAnalyzer = _this41.statsAnalyzer ? _this41.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
|
|
5351
5353
|
return stopStatsAnalyzer.then(function () {
|
|
5352
|
-
|
|
5353
|
-
if (
|
|
5354
|
-
|
|
5355
|
-
|
|
5354
|
+
_this41.statsAnalyzer = null;
|
|
5355
|
+
if (_this41.mediaProperties.webrtcMediaConnection) {
|
|
5356
|
+
_this41.closePeerConnections();
|
|
5357
|
+
_this41.unsetPeerConnections();
|
|
5356
5358
|
}
|
|
5357
5359
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
|
|
5358
5360
|
|
|
5359
5361
|
// Upload logs on error while adding media
|
|
5360
|
-
_triggerProxy.default.trigger(
|
|
5362
|
+
_triggerProxy.default.trigger(_this41, {
|
|
5361
5363
|
file: 'meeting/index',
|
|
5362
5364
|
function: 'addMedia'
|
|
5363
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
5365
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this41);
|
|
5364
5366
|
if (error instanceof _internalMediaCore.Errors.SdpError) {
|
|
5365
|
-
|
|
5367
|
+
_this41.leave({
|
|
5366
5368
|
reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
|
|
5367
5369
|
});
|
|
5368
5370
|
}
|
|
@@ -5395,7 +5397,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5395
5397
|
}, {
|
|
5396
5398
|
key: "enqueueMediaUpdate",
|
|
5397
5399
|
value: function enqueueMediaUpdate(mediaUpdateType, options) {
|
|
5398
|
-
var
|
|
5400
|
+
var _this42 = this;
|
|
5399
5401
|
if (mediaUpdateType === MEDIA_UPDATE_TYPE.LAMBDA && typeof (options === null || options === void 0 ? void 0 : options.lambda) !== 'function') {
|
|
5400
5402
|
return _promise.default.reject(new Error('lambda must be specified when enqueuing MEDIA_UPDATE_TYPE.LAMBDA'));
|
|
5401
5403
|
}
|
|
@@ -5408,9 +5410,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5408
5410
|
options: options
|
|
5409
5411
|
};
|
|
5410
5412
|
_loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
|
|
5411
|
-
|
|
5413
|
+
_this42.queuedMediaUpdates.push(queueItem);
|
|
5412
5414
|
if (canUpdateMediaNow) {
|
|
5413
|
-
|
|
5415
|
+
_this42.processNextQueuedMediaUpdate();
|
|
5414
5416
|
}
|
|
5415
5417
|
});
|
|
5416
5418
|
}
|
|
@@ -5436,7 +5438,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5436
5438
|
* @memberof Meeting
|
|
5437
5439
|
*/
|
|
5438
5440
|
function updateMedia() {
|
|
5439
|
-
var
|
|
5441
|
+
var _this43 = this;
|
|
5440
5442
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5441
5443
|
var LOG_HEADER = 'Meeting:index#updateMedia -->';
|
|
5442
5444
|
if (!this.canUpdateMedia()) {
|
|
@@ -5455,27 +5457,27 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5455
5457
|
return _promise.default.reject(new Error('media connection not established, call addMedia() first'));
|
|
5456
5458
|
}
|
|
5457
5459
|
return _util.default.validateOptions(options).then(function () {
|
|
5458
|
-
return
|
|
5460
|
+
return _this43.preMedia(localStream, localShare, mediaSettings);
|
|
5459
5461
|
}).then(function () {
|
|
5460
|
-
return
|
|
5462
|
+
return _this43.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
|
|
5461
5463
|
send: {
|
|
5462
|
-
audio:
|
|
5463
|
-
video:
|
|
5464
|
-
screenShareVideo:
|
|
5464
|
+
audio: _this43.mediaProperties.mediaDirection.sendAudio ? _this43.mediaProperties.audioTrack.underlyingTrack : null,
|
|
5465
|
+
video: _this43.mediaProperties.mediaDirection.sendVideo ? _this43.mediaProperties.videoTrack.underlyingTrack : null,
|
|
5466
|
+
screenShareVideo: _this43.mediaProperties.mediaDirection.sendShare ? _this43.mediaProperties.shareTrack.underlyingTrack : null
|
|
5465
5467
|
},
|
|
5466
5468
|
receive: {
|
|
5467
|
-
audio:
|
|
5468
|
-
video:
|
|
5469
|
-
screenShareVideo:
|
|
5470
|
-
remoteQualityLevel:
|
|
5469
|
+
audio: _this43.mediaProperties.mediaDirection.receiveAudio,
|
|
5470
|
+
video: _this43.mediaProperties.mediaDirection.receiveVideo,
|
|
5471
|
+
screenShareVideo: _this43.mediaProperties.mediaDirection.receiveShare,
|
|
5472
|
+
remoteQualityLevel: _this43.mediaProperties.remoteQualityLevel
|
|
5471
5473
|
}
|
|
5472
5474
|
}).then(function () {
|
|
5473
5475
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " webrtcMediaConnection.updateSendReceiveOptions done"));
|
|
5474
5476
|
}).catch(function (error) {
|
|
5475
5477
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error updatedMedia, "), error);
|
|
5476
5478
|
_metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
|
|
5477
|
-
correlation_id:
|
|
5478
|
-
locus_id:
|
|
5479
|
+
correlation_id: _this43.correlationId,
|
|
5480
|
+
locus_id: _this43.locusUrl.split('/').pop(),
|
|
5479
5481
|
reason: error.message,
|
|
5480
5482
|
stack: error.stack
|
|
5481
5483
|
});
|
|
@@ -5486,16 +5488,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5486
5488
|
// if not, ensure it's called after (now it's called after roap message is sent out, but we're not
|
|
5487
5489
|
// waiting for sendRoapMediaRequest() to be resolved)
|
|
5488
5490
|
.then(function () {
|
|
5489
|
-
return
|
|
5491
|
+
return _this43.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.LAMBDA, {
|
|
5490
5492
|
lambda: function lambda() {
|
|
5491
5493
|
return _promise.default.resolve().then(function () {
|
|
5492
|
-
return
|
|
5494
|
+
return _this43.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
|
|
5493
5495
|
}).then(function (startShare) {
|
|
5494
5496
|
// This is a special case if we do an /floor grant followed by /media
|
|
5495
5497
|
// we actually get a OFFER from the server and a GLAR condition happens
|
|
5496
5498
|
if (startShare) {
|
|
5497
5499
|
// We are assuming that the clients are connected when doing an update
|
|
5498
|
-
return
|
|
5500
|
+
return _this43.requestScreenShareFloor();
|
|
5499
5501
|
}
|
|
5500
5502
|
return _promise.default.resolve();
|
|
5501
5503
|
});
|
|
@@ -5522,7 +5524,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5522
5524
|
key: "updateAudio",
|
|
5523
5525
|
value: function () {
|
|
5524
5526
|
var _updateAudio = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(options) {
|
|
5525
|
-
var
|
|
5527
|
+
var _this44 = this;
|
|
5526
5528
|
var sendAudio, receiveAudio, stream, track;
|
|
5527
5529
|
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
5528
5530
|
while (1) switch (_context9.prev = _context9.next) {
|
|
@@ -5557,25 +5559,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5557
5559
|
sendAudio: sendAudio,
|
|
5558
5560
|
localStream: stream
|
|
5559
5561
|
}).then(function () {
|
|
5560
|
-
return
|
|
5562
|
+
return _this44.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
|
|
5561
5563
|
send: {
|
|
5562
5564
|
audio: track
|
|
5563
5565
|
},
|
|
5564
5566
|
receive: {
|
|
5565
5567
|
audio: options.receiveAudio,
|
|
5566
|
-
video:
|
|
5567
|
-
screenShareVideo:
|
|
5568
|
-
remoteQualityLevel:
|
|
5568
|
+
video: _this44.mediaProperties.mediaDirection.receiveVideo,
|
|
5569
|
+
screenShareVideo: _this44.mediaProperties.mediaDirection.receiveShare,
|
|
5570
|
+
remoteQualityLevel: _this44.mediaProperties.remoteQualityLevel
|
|
5569
5571
|
}
|
|
5570
5572
|
});
|
|
5571
5573
|
}).then(function () {
|
|
5572
|
-
|
|
5574
|
+
_this44.setLocalAudioTrack(track);
|
|
5573
5575
|
// todo: maybe this.mediaProperties.mediaDirection could be removed? it's duplicating stuff from webrtcMediaConnection
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
+
_this44.mediaProperties.mediaDirection.sendAudio = sendAudio;
|
|
5577
|
+
_this44.mediaProperties.mediaDirection.receiveAudio = receiveAudio;
|
|
5576
5578
|
|
|
5577
5579
|
// audio state could be undefined if you have not sent audio before
|
|
5578
|
-
|
|
5580
|
+
_this44.audio = _this44.audio || (0, _muteState.createMuteState)(_constants.AUDIO, _this44, _this44.mediaProperties.mediaDirection, true);
|
|
5579
5581
|
}));
|
|
5580
5582
|
case 11:
|
|
5581
5583
|
case "end":
|
|
@@ -5604,7 +5606,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5604
5606
|
}, {
|
|
5605
5607
|
key: "updateVideo",
|
|
5606
5608
|
value: function updateVideo(options) {
|
|
5607
|
-
var
|
|
5609
|
+
var _this45 = this;
|
|
5608
5610
|
if (this.isMultistream) {
|
|
5609
5611
|
throw new Error('updateVideo() is not supported with multistream, use publishTracks/unpublishTracks instead');
|
|
5610
5612
|
}
|
|
@@ -5625,24 +5627,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5625
5627
|
sendVideo: sendVideo,
|
|
5626
5628
|
localStream: stream
|
|
5627
5629
|
}).then(function () {
|
|
5628
|
-
return
|
|
5630
|
+
return _this45.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
|
|
5629
5631
|
send: {
|
|
5630
5632
|
video: track
|
|
5631
5633
|
},
|
|
5632
5634
|
receive: {
|
|
5633
|
-
audio:
|
|
5635
|
+
audio: _this45.mediaProperties.mediaDirection.receiveAudio,
|
|
5634
5636
|
video: options.receiveVideo,
|
|
5635
|
-
screenShareVideo:
|
|
5636
|
-
remoteQualityLevel:
|
|
5637
|
+
screenShareVideo: _this45.mediaProperties.mediaDirection.receiveShare,
|
|
5638
|
+
remoteQualityLevel: _this45.mediaProperties.remoteQualityLevel
|
|
5637
5639
|
}
|
|
5638
5640
|
});
|
|
5639
5641
|
}).then(function () {
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5642
|
+
_this45.setLocalVideoTrack(track);
|
|
5643
|
+
_this45.mediaProperties.mediaDirection.sendVideo = sendVideo;
|
|
5644
|
+
_this45.mediaProperties.mediaDirection.receiveVideo = receiveVideo;
|
|
5643
5645
|
|
|
5644
5646
|
// video state could be undefined if you have not sent video before
|
|
5645
|
-
|
|
5647
|
+
_this45.video = _this45.video || (0, _muteState.createMuteState)(_constants.VIDEO, _this45, _this45.mediaProperties.mediaDirection, true);
|
|
5646
5648
|
});
|
|
5647
5649
|
}
|
|
5648
5650
|
|
|
@@ -5685,7 +5687,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5685
5687
|
}, {
|
|
5686
5688
|
key: "updateShare",
|
|
5687
5689
|
value: function updateShare(options) {
|
|
5688
|
-
var
|
|
5690
|
+
var _this46 = this;
|
|
5689
5691
|
if (this.isMultistream) {
|
|
5690
5692
|
throw new Error('updateShare() is not supported with multistream, use publishTracks/unpublishTracks instead');
|
|
5691
5693
|
}
|
|
@@ -5708,20 +5710,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5708
5710
|
sendShare: sendShare,
|
|
5709
5711
|
localShare: stream
|
|
5710
5712
|
}).then(function () {
|
|
5711
|
-
return
|
|
5713
|
+
return _this46.checkForStopShare(sendShare, previousSendShareStatus);
|
|
5712
5714
|
}).then(function (startShare) {
|
|
5713
|
-
return
|
|
5715
|
+
return _this46.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
|
|
5714
5716
|
send: {
|
|
5715
5717
|
screenShareVideo: track
|
|
5716
5718
|
},
|
|
5717
5719
|
receive: {
|
|
5718
|
-
audio:
|
|
5719
|
-
video:
|
|
5720
|
+
audio: _this46.mediaProperties.mediaDirection.receiveAudio,
|
|
5721
|
+
video: _this46.mediaProperties.mediaDirection.receiveVideo,
|
|
5720
5722
|
screenShareVideo: options.receiveShare,
|
|
5721
|
-
remoteQualityLevel:
|
|
5723
|
+
remoteQualityLevel: _this46.mediaProperties.remoteQualityLevel
|
|
5722
5724
|
}
|
|
5723
5725
|
}).then(function () {
|
|
5724
|
-
return
|
|
5726
|
+
return _this46.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.LAMBDA, {
|
|
5725
5727
|
lambda: function () {
|
|
5726
5728
|
var _lambda = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
5727
5729
|
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
@@ -5731,7 +5733,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5731
5733
|
_context10.next = 2;
|
|
5732
5734
|
break;
|
|
5733
5735
|
}
|
|
5734
|
-
return _context10.abrupt("return",
|
|
5736
|
+
return _context10.abrupt("return", _this46.requestScreenShareFloor());
|
|
5735
5737
|
case 2:
|
|
5736
5738
|
return _context10.abrupt("return", undefined);
|
|
5737
5739
|
case 3:
|
|
@@ -5748,10 +5750,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5748
5750
|
});
|
|
5749
5751
|
});
|
|
5750
5752
|
}).then(function () {
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
+
_this46.mediaProperties.mediaDirection.sendShare = sendShare;
|
|
5754
|
+
_this46.mediaProperties.mediaDirection.receiveShare = receiveShare;
|
|
5753
5755
|
}).catch(function (error) {
|
|
5754
|
-
|
|
5756
|
+
_this46.unsetLocalShareTrack();
|
|
5755
5757
|
throw error;
|
|
5756
5758
|
});
|
|
5757
5759
|
}
|
|
@@ -5796,7 +5798,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5796
5798
|
}, {
|
|
5797
5799
|
key: "acknowledge",
|
|
5798
5800
|
value: function acknowledge(type) {
|
|
5799
|
-
var
|
|
5801
|
+
var _this47 = this;
|
|
5800
5802
|
if (!type) {
|
|
5801
5803
|
return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
|
|
5802
5804
|
}
|
|
@@ -5808,10 +5810,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5808
5810
|
}).then(function (response) {
|
|
5809
5811
|
return _promise.default.resolve(response);
|
|
5810
5812
|
}).then(function (response) {
|
|
5811
|
-
|
|
5813
|
+
_this47.meetingFiniteStateMachine.ring(type);
|
|
5812
5814
|
_metrics.default.postEvent({
|
|
5813
5815
|
event: _config.eventType.ALERT_DISPLAYED,
|
|
5814
|
-
meeting:
|
|
5816
|
+
meeting: _this47
|
|
5815
5817
|
});
|
|
5816
5818
|
return _promise.default.resolve({
|
|
5817
5819
|
response: response
|
|
@@ -5835,12 +5837,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5835
5837
|
}, {
|
|
5836
5838
|
key: "decline",
|
|
5837
5839
|
value: function decline(reason) {
|
|
5838
|
-
var
|
|
5840
|
+
var _this48 = this;
|
|
5839
5841
|
return _util.default.declineMeeting(this, reason).then(function (decline) {
|
|
5840
|
-
|
|
5842
|
+
_this48.meetingFiniteStateMachine.decline();
|
|
5841
5843
|
return _promise.default.resolve(decline);
|
|
5842
5844
|
}).catch(function (error) {
|
|
5843
|
-
|
|
5845
|
+
_this48.meetingFiniteStateMachine.fail(error);
|
|
5844
5846
|
return _promise.default.reject(error);
|
|
5845
5847
|
});
|
|
5846
5848
|
}
|
|
@@ -5856,7 +5858,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5856
5858
|
}, {
|
|
5857
5859
|
key: "leave",
|
|
5858
5860
|
value: function leave() {
|
|
5859
|
-
var
|
|
5861
|
+
var _this49 = this;
|
|
5860
5862
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5861
5863
|
var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
|
|
5862
5864
|
_metrics.default.postEvent({
|
|
@@ -5870,39 +5872,39 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5870
5872
|
});
|
|
5871
5873
|
_loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
|
|
5872
5874
|
return _util.default.leaveMeeting(this, options).then(function (leave) {
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
+
_this49.meetingFiniteStateMachine.leave();
|
|
5876
|
+
_this49.clearMeetingData();
|
|
5875
5877
|
|
|
5876
5878
|
// upload logs on leave irrespective of meeting delete
|
|
5877
|
-
_triggerProxy.default.trigger(
|
|
5879
|
+
_triggerProxy.default.trigger(_this49, {
|
|
5878
5880
|
file: 'meeting/index',
|
|
5879
5881
|
function: 'leave'
|
|
5880
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
5882
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this49);
|
|
5881
5883
|
|
|
5882
5884
|
// TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
|
|
5883
|
-
if (
|
|
5885
|
+
if (_this49.wirelessShare || _this49.guest) {
|
|
5884
5886
|
// If screen sharing clean the meeting object
|
|
5885
|
-
_triggerProxy.default.trigger(
|
|
5887
|
+
_triggerProxy.default.trigger(_this49, {
|
|
5886
5888
|
file: 'meeting/index',
|
|
5887
5889
|
function: 'leave'
|
|
5888
5890
|
}, _constants.EVENTS.DESTROY_MEETING, {
|
|
5889
5891
|
reason: options.reason,
|
|
5890
|
-
meetingId:
|
|
5892
|
+
meetingId: _this49.id
|
|
5891
5893
|
});
|
|
5892
5894
|
}
|
|
5893
5895
|
_loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
|
|
5894
5896
|
return leave;
|
|
5895
5897
|
}).catch(function (error) {
|
|
5896
|
-
|
|
5898
|
+
_this49.meetingFiniteStateMachine.fail(error);
|
|
5897
5899
|
_loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
|
|
5898
5900
|
// upload logs on leave irrespective of meeting delete
|
|
5899
|
-
_triggerProxy.default.trigger(
|
|
5901
|
+
_triggerProxy.default.trigger(_this49, {
|
|
5900
5902
|
file: 'meeting/index',
|
|
5901
5903
|
function: 'leave'
|
|
5902
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
5904
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this49);
|
|
5903
5905
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
|
|
5904
|
-
correlation_id:
|
|
5905
|
-
locus_id:
|
|
5906
|
+
correlation_id: _this49.correlationId,
|
|
5907
|
+
locus_id: _this49.locusUrl.split('/').pop(),
|
|
5906
5908
|
reason: error.message,
|
|
5907
5909
|
stack: error.stack,
|
|
5908
5910
|
code: error.code
|
|
@@ -5922,7 +5924,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5922
5924
|
}, {
|
|
5923
5925
|
key: "startWhiteboardShare",
|
|
5924
5926
|
value: function startWhiteboardShare(channelUrl, resourceToken) {
|
|
5925
|
-
var
|
|
5927
|
+
var _this50 = this;
|
|
5926
5928
|
var whiteboard = this.locusInfo.mediaShares.find(function (element) {
|
|
5927
5929
|
return element.name === 'whiteboard';
|
|
5928
5930
|
});
|
|
@@ -5945,13 +5947,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5945
5947
|
body.resourceToken = resourceToken;
|
|
5946
5948
|
}
|
|
5947
5949
|
return this.meetingRequest.changeMeetingFloor(body).then(function () {
|
|
5948
|
-
|
|
5950
|
+
_this50.isSharing = false;
|
|
5949
5951
|
return _promise.default.resolve();
|
|
5950
5952
|
}).catch(function (error) {
|
|
5951
5953
|
_loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
|
|
5952
5954
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
|
|
5953
|
-
correlation_id:
|
|
5954
|
-
locus_id:
|
|
5955
|
+
correlation_id: _this50.correlationId,
|
|
5956
|
+
locus_id: _this50.locusUrl.split('/').pop(),
|
|
5955
5957
|
reason: error.message,
|
|
5956
5958
|
stack: error.stack,
|
|
5957
5959
|
board: {
|
|
@@ -5974,7 +5976,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5974
5976
|
}, {
|
|
5975
5977
|
key: "stopWhiteboardShare",
|
|
5976
5978
|
value: function stopWhiteboardShare(channelUrl) {
|
|
5977
|
-
var
|
|
5979
|
+
var _this51 = this;
|
|
5978
5980
|
var whiteboard = this.locusInfo.mediaShares.find(function (element) {
|
|
5979
5981
|
return element.name === 'whiteboard';
|
|
5980
5982
|
});
|
|
@@ -5993,8 +5995,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5993
5995
|
_metrics.default.sendBehavioralMetric(
|
|
5994
5996
|
// @ts-ignore - check if STOP_WHITEBOARD_SHARE_FAILURE exists
|
|
5995
5997
|
_constants2.default.STOP_WHITEBOARD_SHARE_FAILURE, {
|
|
5996
|
-
correlation_id:
|
|
5997
|
-
locus_id:
|
|
5998
|
+
correlation_id: _this51.correlationId,
|
|
5999
|
+
locus_id: _this51.locusUrl.split('/').pop(),
|
|
5998
6000
|
reason: error.message,
|
|
5999
6001
|
stack: error.stack,
|
|
6000
6002
|
board: {
|
|
@@ -6016,7 +6018,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6016
6018
|
}, {
|
|
6017
6019
|
key: "requestScreenShareFloor",
|
|
6018
6020
|
value: function requestScreenShareFloor() {
|
|
6019
|
-
var
|
|
6021
|
+
var _this52 = this;
|
|
6020
6022
|
var content = this.locusInfo.mediaShares.find(function (element) {
|
|
6021
6023
|
return element.name === _constants.CONTENT;
|
|
6022
6024
|
});
|
|
@@ -6032,13 +6034,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6032
6034
|
uri: content.url,
|
|
6033
6035
|
resourceUrl: this.resourceUrl
|
|
6034
6036
|
}).then(function () {
|
|
6035
|
-
|
|
6037
|
+
_this52.isSharing = true;
|
|
6036
6038
|
return _promise.default.resolve();
|
|
6037
6039
|
}).catch(function (error) {
|
|
6038
6040
|
_loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
|
|
6039
6041
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
|
|
6040
|
-
correlation_id:
|
|
6041
|
-
locus_id:
|
|
6042
|
+
correlation_id: _this52.correlationId,
|
|
6043
|
+
locus_id: _this52.locusUrl.split('/').pop(),
|
|
6042
6044
|
reason: error.message,
|
|
6043
6045
|
stack: error.stack
|
|
6044
6046
|
});
|
|
@@ -6075,7 +6077,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6075
6077
|
}, {
|
|
6076
6078
|
key: "releaseScreenShareFloor",
|
|
6077
6079
|
value: function releaseScreenShareFloor() {
|
|
6078
|
-
var
|
|
6080
|
+
var _this53 = this;
|
|
6079
6081
|
var content = this.locusInfo.mediaShares.find(function (element) {
|
|
6080
6082
|
return element.name === _constants.CONTENT;
|
|
6081
6083
|
});
|
|
@@ -6098,14 +6100,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6098
6100
|
}).catch(function (error) {
|
|
6099
6101
|
_loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
|
|
6100
6102
|
_metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
|
|
6101
|
-
correlation_id:
|
|
6102
|
-
locus_id:
|
|
6103
|
+
correlation_id: _this53.correlationId,
|
|
6104
|
+
locus_id: _this53.locusUrl.split('/').pop(),
|
|
6103
6105
|
reason: error.message,
|
|
6104
6106
|
stack: error.stack
|
|
6105
6107
|
});
|
|
6106
6108
|
return _promise.default.reject(error);
|
|
6107
6109
|
}).finally(function () {
|
|
6108
|
-
|
|
6110
|
+
_this53.isSharing = false;
|
|
6109
6111
|
});
|
|
6110
6112
|
}
|
|
6111
6113
|
return _promise.default.reject(new _parameter.default('Cannot stop share without content'));
|
|
@@ -6278,7 +6280,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6278
6280
|
}, {
|
|
6279
6281
|
key: "changeVideoLayout",
|
|
6280
6282
|
value: function changeVideoLayout(layoutType) {
|
|
6281
|
-
var
|
|
6283
|
+
var _this54 = this;
|
|
6282
6284
|
var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6283
6285
|
var main = renderInfo.main,
|
|
6284
6286
|
content = renderInfo.content;
|
|
@@ -6332,7 +6334,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6332
6334
|
}
|
|
6333
6335
|
this.lastVideoLayoutInfo = (0, _cloneDeep2.default)(layoutInfo);
|
|
6334
6336
|
this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
|
|
6335
|
-
_triggerProxy.default.trigger(
|
|
6337
|
+
_triggerProxy.default.trigger(_this54, {
|
|
6336
6338
|
file: 'meeting/index',
|
|
6337
6339
|
function: 'changeVideoLayout'
|
|
6338
6340
|
}, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
|
|
@@ -6359,7 +6361,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6359
6361
|
}, {
|
|
6360
6362
|
key: "setLocalVideoQuality",
|
|
6361
6363
|
value: function setLocalVideoQuality(level) {
|
|
6362
|
-
var
|
|
6364
|
+
var _this55 = this;
|
|
6363
6365
|
_loggerProxy.default.logger.log("Meeting:index#setLocalVideoQuality --> Setting quality to ".concat(level));
|
|
6364
6366
|
if (!_constants.VIDEO_RESOLUTIONS[level]) {
|
|
6365
6367
|
return this.rejectWithErrorLog("Meeting:index#setLocalVideoQuality --> ".concat(level, " not defined"));
|
|
@@ -6395,7 +6397,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6395
6397
|
case 0:
|
|
6396
6398
|
_ref27 = (0, _slicedToArray2.default)(_ref25, 1), localStream = _ref27[0];
|
|
6397
6399
|
_context11.next = 3;
|
|
6398
|
-
return
|
|
6400
|
+
return _this55.updateVideo({
|
|
6399
6401
|
sendVideo: true,
|
|
6400
6402
|
receiveVideo: true,
|
|
6401
6403
|
stream: localStream
|
|
@@ -6452,7 +6454,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6452
6454
|
}, {
|
|
6453
6455
|
key: "setMeetingQuality",
|
|
6454
6456
|
value: function setMeetingQuality(level) {
|
|
6455
|
-
var
|
|
6457
|
+
var _this56 = this;
|
|
6456
6458
|
_loggerProxy.default.logger.log("Meeting:index#setMeetingQuality --> Setting quality to ".concat(level));
|
|
6457
6459
|
if (!_constants.QUALITY_LEVELS[level]) {
|
|
6458
6460
|
return this.rejectWithErrorLog("Meeting:index#setMeetingQuality --> ".concat(level, " not defined"));
|
|
@@ -6474,15 +6476,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6474
6476
|
receiveVideo = _this$mediaProperties8.receiveVideo,
|
|
6475
6477
|
sendVideo = _this$mediaProperties8.sendVideo;
|
|
6476
6478
|
return (sendVideo ? this.setLocalVideoQuality(level) : _promise.default.resolve()).then(function () {
|
|
6477
|
-
return receiveAudio || receiveVideo ?
|
|
6479
|
+
return receiveAudio || receiveVideo ? _this56.setRemoteQualityLevel(level) : _promise.default.resolve();
|
|
6478
6480
|
}).catch(function (error) {
|
|
6479
6481
|
// From troubleshooting it seems that the stream itself doesn't change the max-fs if the peer connection isn't stable
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
+
_this56.mediaProperties.setLocalQualityLevel(previousLevel.local);
|
|
6483
|
+
_this56.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
|
|
6482
6484
|
_loggerProxy.default.logger.error("Meeting:index#setMeetingQuality --> ".concat(error.message));
|
|
6483
6485
|
_metrics.default.sendBehavioralMetric(_constants2.default.SET_MEETING_QUALITY_FAILURE, {
|
|
6484
|
-
correlation_id:
|
|
6485
|
-
locus_id:
|
|
6486
|
+
correlation_id: _this56.correlationId,
|
|
6487
|
+
locus_id: _this56.locusUrl.split('/').pop(),
|
|
6486
6488
|
reason: error.message,
|
|
6487
6489
|
stack: error.stack
|
|
6488
6490
|
}, {
|
|
@@ -6508,7 +6510,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6508
6510
|
}, {
|
|
6509
6511
|
key: "shareScreen",
|
|
6510
6512
|
value: function shareScreen() {
|
|
6511
|
-
var
|
|
6513
|
+
var _this57 = this;
|
|
6512
6514
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
6513
6515
|
_loggerProxy.default.logger.log('Meeting:index#shareScreen --> Getting local share');
|
|
6514
6516
|
var shareConstraints = _objectSpread({
|
|
@@ -6518,9 +6520,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6518
6520
|
|
|
6519
6521
|
// @ts-ignore - config coming from registerPlugin
|
|
6520
6522
|
return _media.default.getDisplayMedia(shareConstraints, this.config).then(function (shareStream) {
|
|
6521
|
-
return
|
|
6523
|
+
return _this57.updateShare({
|
|
6522
6524
|
sendShare: true,
|
|
6523
|
-
receiveShare:
|
|
6525
|
+
receiveShare: _this57.mediaProperties.mediaDirection.receiveShare,
|
|
6524
6526
|
stream: shareStream
|
|
6525
6527
|
});
|
|
6526
6528
|
}).catch(function (error) {
|
|
@@ -6533,8 +6535,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6533
6535
|
// TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
|
|
6534
6536
|
var metricName = _constants2.default.GET_DISPLAY_MEDIA_FAILURE;
|
|
6535
6537
|
var data = {
|
|
6536
|
-
correlation_id:
|
|
6537
|
-
locus_id:
|
|
6538
|
+
correlation_id: _this57.correlationId,
|
|
6539
|
+
locus_id: _this57.locusUrl.split('/').pop(),
|
|
6538
6540
|
reason: error.message,
|
|
6539
6541
|
stack: error.stack
|
|
6540
6542
|
};
|
|
@@ -6829,7 +6831,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6829
6831
|
}, {
|
|
6830
6832
|
key: "endMeetingForAll",
|
|
6831
6833
|
value: function endMeetingForAll() {
|
|
6832
|
-
var
|
|
6834
|
+
var _this58 = this;
|
|
6833
6835
|
_metrics.default.postEvent({
|
|
6834
6836
|
event: _config.eventType.LEAVE,
|
|
6835
6837
|
meeting: this,
|
|
@@ -6844,25 +6846,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6844
6846
|
locus_id: this.locusId
|
|
6845
6847
|
});
|
|
6846
6848
|
return _util.default.endMeetingForAll(this).then(function (end) {
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
+
_this58.meetingFiniteStateMachine.end();
|
|
6850
|
+
_this58.clearMeetingData();
|
|
6849
6851
|
// upload logs on leave irrespective of meeting delete
|
|
6850
|
-
_triggerProxy.default.trigger(
|
|
6852
|
+
_triggerProxy.default.trigger(_this58, {
|
|
6851
6853
|
file: 'meeting/index',
|
|
6852
6854
|
function: 'endMeetingForAll'
|
|
6853
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
6855
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this58);
|
|
6854
6856
|
return end;
|
|
6855
6857
|
}).catch(function (error) {
|
|
6856
|
-
|
|
6858
|
+
_this58.meetingFiniteStateMachine.fail(error);
|
|
6857
6859
|
_loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
|
|
6858
6860
|
// upload logs on leave irrespective of meeting delete
|
|
6859
|
-
_triggerProxy.default.trigger(
|
|
6861
|
+
_triggerProxy.default.trigger(_this58, {
|
|
6860
6862
|
file: 'meeting/index',
|
|
6861
6863
|
function: 'endMeetingForAll'
|
|
6862
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
6864
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this58);
|
|
6863
6865
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
|
|
6864
|
-
correlation_id:
|
|
6865
|
-
locus_id:
|
|
6866
|
+
correlation_id: _this58.correlationId,
|
|
6867
|
+
locus_id: _this58.locusUrl.split('/').pop(),
|
|
6866
6868
|
reason: error.message,
|
|
6867
6869
|
stack: error.stack,
|
|
6868
6870
|
code: error.code
|