@webex/plugin-meetings 3.1.0-next.5 → 3.1.0-next.7

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.
@@ -209,7 +209,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
209
209
  sessionId: this.sessionId
210
210
  });
211
211
  },
212
- version: "3.1.0-next.5"
212
+ version: "3.1.0-next.7"
213
213
  });
214
214
  var _default = exports.default = Breakout;
215
215
  //# sourceMappingURL=breakout.js.map
@@ -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.1.0-next.5"
1044
+ version: "3.1.0-next.7"
1045
1045
  });
1046
1046
  var _default = exports.default = Breakouts;
1047
1047
  //# sourceMappingURL=index.js.map
@@ -373,7 +373,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
373
373
  throw error;
374
374
  });
375
375
  },
376
- version: "3.1.0-next.5"
376
+ version: "3.1.0-next.7"
377
377
  });
378
378
  var _default = exports.default = SimultaneousInterpretation;
379
379
  //# sourceMappingURL=index.js.map
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
18
18
  languageCode: 'number',
19
19
  languageName: 'string'
20
20
  },
21
- version: "3.1.0-next.5"
21
+ version: "3.1.0-next.7"
22
22
  });
23
23
  var _default = exports.default = SILanguage;
24
24
  //# sourceMappingURL=siLanguage.js.map
@@ -15,6 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
15
15
  var _constants = require("../constants");
16
16
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
17
17
  var _MediaConnectionAwaiter = _interopRequireDefault(require("./MediaConnectionAwaiter"));
18
+ /* eslint-disable class-methods-use-this */
18
19
  /**
19
20
  * @class MediaProperties
20
21
  */
@@ -203,85 +204,129 @@ var MediaProperties = exports.default = /*#__PURE__*/function () {
203
204
  return mediaConnectionAwaiter.waitForMediaConnectionConnected();
204
205
  }
205
206
 
207
+ /**
208
+ * Returns ICE transport information:
209
+ * - selectedCandidatePairChanges - number of times the selected candidate pair was changed, it should be at least 1 for successful connections
210
+ * it will be -1 if browser doesn't supply this information
211
+ * - numTransports - number of transports (should be 1 if we're using bundle)
212
+ *
213
+ * @param {Array<any>} allStatsReports array of RTC stats reports
214
+ * @returns {Object}
215
+ */
216
+ }, {
217
+ key: "getTransportInfo",
218
+ value: function getTransportInfo(allStatsReports) {
219
+ var transports = allStatsReports.filter(function (report) {
220
+ return report.type === 'transport';
221
+ });
222
+ if (transports.length > 1) {
223
+ _loggerProxy.default.logger.warn("Media:properties#getSelectedCandidatePairChanges --> found more than 1 transport: ".concat(transports.length));
224
+ }
225
+ return {
226
+ selectedCandidatePairChanges: transports.length > 0 && transports[0].selectedCandidatePairChanges !== undefined ? transports[0].selectedCandidatePairChanges : -1,
227
+ numTransports: transports.length
228
+ };
229
+ }
230
+
206
231
  /**
207
232
  * Returns the type of a connection that has been established
233
+ * It should be 'UDP' | 'TCP' | 'TURN-TLS' | 'TURN-TCP' | 'TURN-UDP' | 'unknown'
234
+ *
235
+ * If connection was not established, it returns 'unknown'
236
+ *
237
+ * @param {Array<any>} allStatsReports array of RTC stats reports
238
+ * @returns {string}
239
+ */
240
+ }, {
241
+ key: "getConnectionType",
242
+ value: function getConnectionType(allStatsReports) {
243
+ var successfulCandidatePairs = allStatsReports.filter(function (report) {
244
+ var _report$state;
245
+ return report.type === 'candidate-pair' && ((_report$state = report.state) === null || _report$state === void 0 ? void 0 : _report$state.toLowerCase()) === 'succeeded';
246
+ });
247
+ var foundConnectionType = 'unknown';
248
+
249
+ // all of the successful pairs should have the same connection type, so just return the type for the first one
250
+ successfulCandidatePairs.some(function (pair) {
251
+ var localCandidate = allStatsReports.find(function (report) {
252
+ return report.type === 'local-candidate' && report.id === pair.localCandidateId;
253
+ });
254
+ if (localCandidate === undefined) {
255
+ _loggerProxy.default.logger.warn("Media:properties#getConnectionType --> failed to find local candidate \"".concat(pair.localCandidateId, "\" in getStats() results"));
256
+ return false;
257
+ }
258
+ var connectionType;
259
+ if (localCandidate.relayProtocol) {
260
+ connectionType = "TURN-".concat(localCandidate.relayProtocol.toUpperCase());
261
+ } else {
262
+ var _localCandidate$proto;
263
+ connectionType = (_localCandidate$proto = localCandidate.protocol) === null || _localCandidate$proto === void 0 ? void 0 : _localCandidate$proto.toUpperCase(); // it will be UDP or TCP
264
+ }
265
+
266
+ if (connectionType) {
267
+ foundConnectionType = connectionType;
268
+ return true;
269
+ }
270
+ _loggerProxy.default.logger.warn("Media:properties#getConnectionType --> missing localCandidate.protocol, candidateType=".concat(localCandidate.candidateType));
271
+ return false;
272
+ });
273
+ if (foundConnectionType === 'unknown') {
274
+ var candidatePairStates = allStatsReports.filter(function (report) {
275
+ return report.type === 'candidate-pair';
276
+ }).map(function (report) {
277
+ return report.state;
278
+ });
279
+ _loggerProxy.default.logger.warn("Media:properties#getConnectionType --> all candidate pair states: ".concat((0, _stringify.default)(candidatePairStates)));
280
+ }
281
+ return foundConnectionType;
282
+ }
283
+
284
+ /**
285
+ * Returns information about current webrtc media connection
208
286
  *
209
- * @returns {Promise<'UDP' | 'TCP' | 'TURN-TLS' | 'TURN-TCP' | 'TURN-UDP' | 'unknown'>}
287
+ * @returns {Promise<Object>}
210
288
  */
211
289
  }, {
212
- key: "getCurrentConnectionType",
290
+ key: "getCurrentConnectionInfo",
213
291
  value: (function () {
214
- var _getCurrentConnectionType = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
215
- var allStatsReports, statsResult, successfulCandidatePairs, foundConnectionType, candidatePairStates;
292
+ var _getCurrentConnectionInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
293
+ var allStatsReports, statsResult, connectionType, _this$getTransportInf, selectedCandidatePairChanges, numTransports;
216
294
  return _regenerator.default.wrap(function _callee$(_context) {
217
295
  while (1) switch (_context.prev = _context.next) {
218
296
  case 0:
219
- _context.next = 2;
220
- return this.waitForMediaConnectionConnected();
221
- case 2:
222
297
  allStatsReports = [];
223
- _context.prev = 3;
224
- _context.next = 6;
298
+ _context.prev = 1;
299
+ _context.next = 4;
225
300
  return this.webrtcMediaConnection.getStats();
226
- case 6:
301
+ case 4:
227
302
  statsResult = _context.sent;
228
303
  statsResult.forEach(function (report) {
229
304
  return allStatsReports.push(report);
230
305
  });
231
- _context.next = 13;
306
+ _context.next = 11;
232
307
  break;
233
- case 10:
234
- _context.prev = 10;
235
- _context.t0 = _context["catch"](3);
236
- _loggerProxy.default.logger.warn("Media:properties#getCurrentConnectionType --> getStats() failed: ".concat(_context.t0));
237
- case 13:
238
- successfulCandidatePairs = allStatsReports.filter(function (report) {
239
- var _report$state;
240
- return report.type === 'candidate-pair' && ((_report$state = report.state) === null || _report$state === void 0 ? void 0 : _report$state.toLowerCase()) === 'succeeded';
241
- });
242
- foundConnectionType = 'unknown'; // all of the successful pairs should have the same connection type, so just return the type for the first one
243
- successfulCandidatePairs.some(function (pair) {
244
- var localCandidate = allStatsReports.find(function (report) {
245
- return report.type === 'local-candidate' && report.id === pair.localCandidateId;
246
- });
247
- if (localCandidate === undefined) {
248
- _loggerProxy.default.logger.warn("Media:properties#getCurrentConnectionType --> failed to find local candidate \"".concat(pair.localCandidateId, "\" in getStats() results"));
249
- return false;
250
- }
251
- var connectionType;
252
- if (localCandidate.relayProtocol) {
253
- connectionType = "TURN-".concat(localCandidate.relayProtocol.toUpperCase());
254
- } else {
255
- var _localCandidate$proto;
256
- connectionType = (_localCandidate$proto = localCandidate.protocol) === null || _localCandidate$proto === void 0 ? void 0 : _localCandidate$proto.toUpperCase(); // it will be UDP or TCP
257
- }
258
-
259
- if (connectionType) {
260
- foundConnectionType = connectionType;
261
- return true;
262
- }
263
- _loggerProxy.default.logger.warn("Media:properties#getCurrentConnectionType --> missing localCandidate.protocol, candidateType=".concat(localCandidate.candidateType));
264
- return false;
308
+ case 8:
309
+ _context.prev = 8;
310
+ _context.t0 = _context["catch"](1);
311
+ _loggerProxy.default.logger.warn("Media:properties#getCurrentConnectionInfo --> getStats() failed: ".concat(_context.t0));
312
+ case 11:
313
+ connectionType = this.getConnectionType(allStatsReports);
314
+ _this$getTransportInf = this.getTransportInfo(allStatsReports), selectedCandidatePairChanges = _this$getTransportInf.selectedCandidatePairChanges, numTransports = _this$getTransportInf.numTransports;
315
+ return _context.abrupt("return", {
316
+ connectionType: connectionType,
317
+ selectedCandidatePairChanges: selectedCandidatePairChanges,
318
+ numTransports: numTransports
265
319
  });
266
- if (foundConnectionType === 'unknown') {
267
- candidatePairStates = allStatsReports.filter(function (report) {
268
- return report.type === 'candidate-pair';
269
- }).map(function (report) {
270
- return report.state;
271
- });
272
- _loggerProxy.default.logger.warn("Media:properties#getCurrentConnectionType --> all candidate pair states: ".concat((0, _stringify.default)(candidatePairStates)));
273
- }
274
- return _context.abrupt("return", foundConnectionType);
275
- case 18:
320
+ case 14:
276
321
  case "end":
277
322
  return _context.stop();
278
323
  }
279
- }, _callee, this, [[3, 10]]);
324
+ }, _callee, this, [[1, 8]]);
280
325
  }));
281
- function getCurrentConnectionType() {
282
- return _getCurrentConnectionType.apply(this, arguments);
326
+ function getCurrentConnectionInfo() {
327
+ return _getCurrentConnectionInfo.apply(this, arguments);
283
328
  }
284
- return getCurrentConnectionType;
329
+ return getCurrentConnectionInfo;
285
330
  }())
286
331
  }]);
287
332
  return MediaProperties;
@@ -1 +1 @@
1
- {"version":3,"names":["_constants","require","_loggerProxy","_interopRequireDefault","_MediaConnectionAwaiter","MediaProperties","exports","default","_classCallCheck2","_defineProperty2","MEETINGS","webrtcMediaConnection","mediaDirection","receiveAudio","receiveVideo","receiveShare","sendAudio","sendVideo","sendShare","videoStream","audioStream","shareVideoStream","shareAudioStream","remoteShareStream","undefined","remoteAudioStream","remoteVideoStream","remoteQualityLevel","QUALITY_LEVELS","HIGH","mediaSettings","videoDeviceId","_createClass2","key","value","getVideoDeviceId","setMediaDirection","setMediaSettings","type","values","setMediaPeerConnection","mediaPeerConnection","setLocalVideoStream","setLocalAudioStream","setLocalShareVideoStream","setLocalShareAudioStream","setRemoteQualityLevel","setRemoteShareStream","setRemoteAudioStream","setRemoteVideoStream","setVideoDeviceId","deviceId","unsetPeerConnection","unsetRemoteMedia","unsetRemoteShareStream","unsetRemoteStreams","hasLocalShareStream","waitForMediaConnectionConnected","mediaConnectionAwaiter","MediaConnectionAwaiter","_getCurrentConnectionType","_asyncToGenerator2","_regenerator","mark","_callee","allStatsReports","statsResult","successfulCandidatePairs","foundConnectionType","candidatePairStates","wrap","_callee$","_context","prev","next","getStats","sent","forEach","report","push","t0","LoggerProxy","logger","warn","concat","filter","_report$state","state","toLowerCase","some","pair","localCandidate","find","id","localCandidateId","connectionType","relayProtocol","toUpperCase","_localCandidate$proto","protocol","candidateType","map","_stringify","abrupt","stop","getCurrentConnectionType","apply","arguments"],"sources":["properties.ts"],"sourcesContent":["import {\n LocalCameraStream,\n LocalMicrophoneStream,\n LocalDisplayStream,\n LocalSystemAudioStream,\n RemoteStream,\n} from '@webex/media-helpers';\n\nimport {MEETINGS, QUALITY_LEVELS} from '../constants';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport MediaConnectionAwaiter from './MediaConnectionAwaiter';\n\nexport type MediaDirection = {\n sendAudio: boolean;\n sendVideo: boolean;\n sendShare: boolean;\n receiveAudio: boolean;\n receiveVideo: boolean;\n receiveShare: boolean;\n};\n\n/**\n * @class MediaProperties\n */\nexport default class MediaProperties {\n audioStream?: LocalMicrophoneStream;\n mediaDirection: MediaDirection;\n mediaSettings: any;\n webrtcMediaConnection: any;\n remoteAudioStream: RemoteStream;\n remoteQualityLevel: any;\n remoteShareStream: RemoteStream;\n remoteVideoStream: RemoteStream;\n shareVideoStream?: LocalDisplayStream;\n shareAudioStream?: LocalSystemAudioStream;\n videoDeviceId: any;\n videoStream?: LocalCameraStream;\n namespace = MEETINGS;\n\n /**\n * @param {Object} [options] -- to auto construct\n * @returns {MediaProperties}\n */\n constructor() {\n this.webrtcMediaConnection = null;\n this.mediaDirection = {\n receiveAudio: false,\n receiveVideo: false,\n receiveShare: false,\n sendAudio: false,\n sendVideo: false,\n sendShare: false,\n };\n this.videoStream = null;\n this.audioStream = null;\n this.shareVideoStream = null;\n this.shareAudioStream = null;\n this.remoteShareStream = undefined;\n this.remoteAudioStream = undefined;\n this.remoteVideoStream = undefined;\n this.remoteQualityLevel = QUALITY_LEVELS.HIGH;\n this.mediaSettings = {};\n this.videoDeviceId = null;\n }\n\n /**\n * Retrieves the preferred video input device\n * @returns {Object|null}\n */\n getVideoDeviceId() {\n return this.videoDeviceId || null;\n }\n\n setMediaDirection(mediaDirection) {\n this.mediaDirection = mediaDirection;\n }\n\n setMediaSettings(type, values) {\n this.mediaSettings[type] = values;\n }\n\n setMediaPeerConnection(mediaPeerConnection) {\n this.webrtcMediaConnection = mediaPeerConnection;\n }\n\n setLocalVideoStream(videoStream?: LocalCameraStream) {\n this.videoStream = videoStream;\n }\n\n setLocalAudioStream(audioStream?: LocalMicrophoneStream) {\n this.audioStream = audioStream;\n }\n\n setLocalShareVideoStream(shareVideoStream?: LocalDisplayStream) {\n this.shareVideoStream = shareVideoStream;\n }\n\n setLocalShareAudioStream(shareAudioStream?: LocalSystemAudioStream) {\n this.shareAudioStream = shareAudioStream;\n }\n\n setRemoteQualityLevel(remoteQualityLevel) {\n this.remoteQualityLevel = remoteQualityLevel;\n }\n\n setRemoteShareStream(remoteShareStream: RemoteStream) {\n this.remoteShareStream = remoteShareStream;\n }\n\n /**\n * Sets the remote audio stream\n * @param {RemoteStream} remoteAudioStream RemoteStream to save\n * @returns {void}\n */\n setRemoteAudioStream(remoteAudioStream: RemoteStream) {\n this.remoteAudioStream = remoteAudioStream;\n }\n\n /**\n * Sets the remote video stream\n * @param {RemoteStream} remoteVideoStream RemoteStream to save\n * @returns {void}\n */\n setRemoteVideoStream(remoteVideoStream: RemoteStream) {\n this.remoteVideoStream = remoteVideoStream;\n }\n\n /**\n * Stores the preferred video input device\n * @param {string} deviceId Preferred video input device\n * @returns {void}\n */\n setVideoDeviceId(deviceId: string) {\n this.videoDeviceId = deviceId;\n }\n\n unsetPeerConnection() {\n this.webrtcMediaConnection = null;\n }\n\n /**\n * Removes both remote audio and video from class instance\n * @returns {void}\n */\n unsetRemoteMedia() {\n this.remoteAudioStream = null;\n this.remoteVideoStream = null;\n }\n\n unsetRemoteShareStream() {\n this.remoteShareStream = null;\n }\n\n /**\n * Unsets all remote streams\n * @returns {void}\n */\n unsetRemoteStreams() {\n this.unsetRemoteMedia();\n this.unsetRemoteShareStream();\n }\n\n /**\n * Returns if we have at least one local share stream or not.\n * @returns {Boolean}\n */\n hasLocalShareStream() {\n return !!(this.shareAudioStream || this.shareVideoStream);\n }\n\n /**\n * Waits for the webrtc media connection to be connected.\n *\n * @returns {Promise<void>}\n */\n waitForMediaConnectionConnected(): Promise<void> {\n const mediaConnectionAwaiter = new MediaConnectionAwaiter({\n webrtcMediaConnection: this.webrtcMediaConnection,\n });\n\n return mediaConnectionAwaiter.waitForMediaConnectionConnected();\n }\n\n /**\n * Returns the type of a connection that has been established\n *\n * @returns {Promise<'UDP' | 'TCP' | 'TURN-TLS' | 'TURN-TCP' | 'TURN-UDP' | 'unknown'>}\n */\n async getCurrentConnectionType() {\n // we can only get the connection type after ICE connection has been established\n await this.waitForMediaConnectionConnected();\n\n const allStatsReports = [];\n\n try {\n const statsResult = await this.webrtcMediaConnection.getStats();\n statsResult.forEach((report) => allStatsReports.push(report));\n } catch (error) {\n LoggerProxy.logger.warn(\n `Media:properties#getCurrentConnectionType --> getStats() failed: ${error}`\n );\n }\n\n const successfulCandidatePairs = allStatsReports.filter(\n (report) => report.type === 'candidate-pair' && report.state?.toLowerCase() === 'succeeded'\n );\n\n let foundConnectionType = 'unknown';\n\n // all of the successful pairs should have the same connection type, so just return the type for the first one\n successfulCandidatePairs.some((pair) => {\n const localCandidate = allStatsReports.find(\n (report) => report.type === 'local-candidate' && report.id === pair.localCandidateId\n );\n\n if (localCandidate === undefined) {\n LoggerProxy.logger.warn(\n `Media:properties#getCurrentConnectionType --> failed to find local candidate \"${pair.localCandidateId}\" in getStats() results`\n );\n\n return false;\n }\n\n let connectionType;\n\n if (localCandidate.relayProtocol) {\n connectionType = `TURN-${localCandidate.relayProtocol.toUpperCase()}`;\n } else {\n connectionType = localCandidate.protocol?.toUpperCase(); // it will be UDP or TCP\n }\n\n if (connectionType) {\n foundConnectionType = connectionType;\n\n return true;\n }\n LoggerProxy.logger.warn(\n `Media:properties#getCurrentConnectionType --> missing localCandidate.protocol, candidateType=${localCandidate.candidateType}`\n );\n\n return false;\n });\n\n if (foundConnectionType === 'unknown') {\n const candidatePairStates = allStatsReports\n .filter((report) => report.type === 'candidate-pair')\n .map((report) => report.state);\n\n LoggerProxy.logger.warn(\n `Media:properties#getCurrentConnectionType --> all candidate pair states: ${JSON.stringify(\n candidatePairStates\n )}`\n );\n }\n\n return foundConnectionType;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAQA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,uBAAA,GAAAD,sBAAA,CAAAF,OAAA;AAWA;AACA;AACA;AAFA,IAGqBI,eAAe,GAAAC,OAAA,CAAAC,OAAA;EAelC;AACF;AACA;AACA;EACE,SAAAF,gBAAA,EAAc;IAAA,IAAAG,gBAAA,CAAAD,OAAA,QAAAF,eAAA;IAAA,IAAAI,gBAAA,CAAAF,OAAA;IAAA,IAAAE,gBAAA,CAAAF,OAAA;IAAA,IAAAE,gBAAA,CAAAF,OAAA;IAAA,IAAAE,gBAAA,CAAAF,OAAA;IAAA,IAAAE,gBAAA,CAAAF,OAAA;IAAA,IAAAE,gBAAA,CAAAF,OAAA;IAAA,IAAAE,gBAAA,CAAAF,OAAA;IAAA,IAAAE,gBAAA,CAAAF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;QAAA,GAAAxC,OAAA;MAAA,CAC3B;MAAA,SAAAyC,yBAAA;QAAA,OAAA7C,yBAAA,CAAA8C,KAAA,OAAAC,SAAA;MAAA;MAAA,OAAAF,wBAAA;IAAA;EAAA;EAAA,OAAApG,eAAA;AAAA"}
1
+ {"version":3,"names":["_constants","require","_loggerProxy","_interopRequireDefault","_MediaConnectionAwaiter","MediaProperties","exports","default","_classCallCheck2","_defineProperty2","MEETINGS","webrtcMediaConnection","mediaDirection","receiveAudio","receiveVideo","receiveShare","sendAudio","sendVideo","sendShare","videoStream","audioStream","shareVideoStream","shareAudioStream","remoteShareStream","undefined","remoteAudioStream","remoteVideoStream","remoteQualityLevel","QUALITY_LEVELS","HIGH","mediaSettings","videoDeviceId","_createClass2","key","value","getVideoDeviceId","setMediaDirection","setMediaSettings","type","values","setMediaPeerConnection","mediaPeerConnection","setLocalVideoStream","setLocalAudioStream","setLocalShareVideoStream","setLocalShareAudioStream","setRemoteQualityLevel","setRemoteShareStream","setRemoteAudioStream","setRemoteVideoStream","setVideoDeviceId","deviceId","unsetPeerConnection","unsetRemoteMedia","unsetRemoteShareStream","unsetRemoteStreams","hasLocalShareStream","waitForMediaConnectionConnected","mediaConnectionAwaiter","MediaConnectionAwaiter","getTransportInfo","allStatsReports","transports","filter","report","length","LoggerProxy","logger","warn","concat","selectedCandidatePairChanges","numTransports","getConnectionType","successfulCandidatePairs","_report$state","state","toLowerCase","foundConnectionType","some","pair","localCandidate","find","id","localCandidateId","connectionType","relayProtocol","toUpperCase","_localCandidate$proto","protocol","candidateType","candidatePairStates","map","_stringify","_getCurrentConnectionInfo","_asyncToGenerator2","_regenerator","mark","_callee","statsResult","_this$getTransportInf","wrap","_callee$","_context","prev","next","getStats","sent","forEach","push","t0","abrupt","stop","getCurrentConnectionInfo","apply","arguments"],"sources":["properties.ts"],"sourcesContent":["/* eslint-disable class-methods-use-this */\nimport {\n LocalCameraStream,\n LocalMicrophoneStream,\n LocalDisplayStream,\n LocalSystemAudioStream,\n RemoteStream,\n} from '@webex/media-helpers';\n\nimport {MEETINGS, QUALITY_LEVELS} from '../constants';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport MediaConnectionAwaiter from './MediaConnectionAwaiter';\n\nexport type MediaDirection = {\n sendAudio: boolean;\n sendVideo: boolean;\n sendShare: boolean;\n receiveAudio: boolean;\n receiveVideo: boolean;\n receiveShare: boolean;\n};\n\n/**\n * @class MediaProperties\n */\nexport default class MediaProperties {\n audioStream?: LocalMicrophoneStream;\n mediaDirection: MediaDirection;\n mediaSettings: any;\n webrtcMediaConnection: any;\n remoteAudioStream: RemoteStream;\n remoteQualityLevel: any;\n remoteShareStream: RemoteStream;\n remoteVideoStream: RemoteStream;\n shareVideoStream?: LocalDisplayStream;\n shareAudioStream?: LocalSystemAudioStream;\n videoDeviceId: any;\n videoStream?: LocalCameraStream;\n namespace = MEETINGS;\n\n /**\n * @param {Object} [options] -- to auto construct\n * @returns {MediaProperties}\n */\n constructor() {\n this.webrtcMediaConnection = null;\n this.mediaDirection = {\n receiveAudio: false,\n receiveVideo: false,\n receiveShare: false,\n sendAudio: false,\n sendVideo: false,\n sendShare: false,\n };\n this.videoStream = null;\n this.audioStream = null;\n this.shareVideoStream = null;\n this.shareAudioStream = null;\n this.remoteShareStream = undefined;\n this.remoteAudioStream = undefined;\n this.remoteVideoStream = undefined;\n this.remoteQualityLevel = QUALITY_LEVELS.HIGH;\n this.mediaSettings = {};\n this.videoDeviceId = null;\n }\n\n /**\n * Retrieves the preferred video input device\n * @returns {Object|null}\n */\n getVideoDeviceId() {\n return this.videoDeviceId || null;\n }\n\n setMediaDirection(mediaDirection) {\n this.mediaDirection = mediaDirection;\n }\n\n setMediaSettings(type, values) {\n this.mediaSettings[type] = values;\n }\n\n setMediaPeerConnection(mediaPeerConnection) {\n this.webrtcMediaConnection = mediaPeerConnection;\n }\n\n setLocalVideoStream(videoStream?: LocalCameraStream) {\n this.videoStream = videoStream;\n }\n\n setLocalAudioStream(audioStream?: LocalMicrophoneStream) {\n this.audioStream = audioStream;\n }\n\n setLocalShareVideoStream(shareVideoStream?: LocalDisplayStream) {\n this.shareVideoStream = shareVideoStream;\n }\n\n setLocalShareAudioStream(shareAudioStream?: LocalSystemAudioStream) {\n this.shareAudioStream = shareAudioStream;\n }\n\n setRemoteQualityLevel(remoteQualityLevel) {\n this.remoteQualityLevel = remoteQualityLevel;\n }\n\n setRemoteShareStream(remoteShareStream: RemoteStream) {\n this.remoteShareStream = remoteShareStream;\n }\n\n /**\n * Sets the remote audio stream\n * @param {RemoteStream} remoteAudioStream RemoteStream to save\n * @returns {void}\n */\n setRemoteAudioStream(remoteAudioStream: RemoteStream) {\n this.remoteAudioStream = remoteAudioStream;\n }\n\n /**\n * Sets the remote video stream\n * @param {RemoteStream} remoteVideoStream RemoteStream to save\n * @returns {void}\n */\n setRemoteVideoStream(remoteVideoStream: RemoteStream) {\n this.remoteVideoStream = remoteVideoStream;\n }\n\n /**\n * Stores the preferred video input device\n * @param {string} deviceId Preferred video input device\n * @returns {void}\n */\n setVideoDeviceId(deviceId: string) {\n this.videoDeviceId = deviceId;\n }\n\n unsetPeerConnection() {\n this.webrtcMediaConnection = null;\n }\n\n /**\n * Removes both remote audio and video from class instance\n * @returns {void}\n */\n unsetRemoteMedia() {\n this.remoteAudioStream = null;\n this.remoteVideoStream = null;\n }\n\n unsetRemoteShareStream() {\n this.remoteShareStream = null;\n }\n\n /**\n * Unsets all remote streams\n * @returns {void}\n */\n unsetRemoteStreams() {\n this.unsetRemoteMedia();\n this.unsetRemoteShareStream();\n }\n\n /**\n * Returns if we have at least one local share stream or not.\n * @returns {Boolean}\n */\n hasLocalShareStream() {\n return !!(this.shareAudioStream || this.shareVideoStream);\n }\n\n /**\n * Waits for the webrtc media connection to be connected.\n *\n * @returns {Promise<void>}\n */\n waitForMediaConnectionConnected(): Promise<void> {\n const mediaConnectionAwaiter = new MediaConnectionAwaiter({\n webrtcMediaConnection: this.webrtcMediaConnection,\n });\n\n return mediaConnectionAwaiter.waitForMediaConnectionConnected();\n }\n\n /**\n * Returns ICE transport information:\n * - selectedCandidatePairChanges - number of times the selected candidate pair was changed, it should be at least 1 for successful connections\n * it will be -1 if browser doesn't supply this information\n * - numTransports - number of transports (should be 1 if we're using bundle)\n *\n * @param {Array<any>} allStatsReports array of RTC stats reports\n * @returns {Object}\n */\n private getTransportInfo(allStatsReports: any[]): {\n selectedCandidatePairChanges: number;\n numTransports: number;\n } {\n const transports = allStatsReports.filter((report) => report.type === 'transport');\n\n if (transports.length > 1) {\n LoggerProxy.logger.warn(\n `Media:properties#getSelectedCandidatePairChanges --> found more than 1 transport: ${transports.length}`\n );\n }\n\n return {\n selectedCandidatePairChanges:\n transports.length > 0 && transports[0].selectedCandidatePairChanges !== undefined\n ? transports[0].selectedCandidatePairChanges\n : -1,\n numTransports: transports.length,\n };\n }\n\n /**\n * Returns the type of a connection that has been established\n * It should be 'UDP' | 'TCP' | 'TURN-TLS' | 'TURN-TCP' | 'TURN-UDP' | 'unknown'\n *\n * If connection was not established, it returns 'unknown'\n *\n * @param {Array<any>} allStatsReports array of RTC stats reports\n * @returns {string}\n */\n private getConnectionType(allStatsReports: any[]) {\n const successfulCandidatePairs = allStatsReports.filter(\n (report) => report.type === 'candidate-pair' && report.state?.toLowerCase() === 'succeeded'\n );\n\n let foundConnectionType = 'unknown';\n\n // all of the successful pairs should have the same connection type, so just return the type for the first one\n successfulCandidatePairs.some((pair) => {\n const localCandidate = allStatsReports.find(\n (report) => report.type === 'local-candidate' && report.id === pair.localCandidateId\n );\n\n if (localCandidate === undefined) {\n LoggerProxy.logger.warn(\n `Media:properties#getConnectionType --> failed to find local candidate \"${pair.localCandidateId}\" in getStats() results`\n );\n\n return false;\n }\n\n let connectionType;\n\n if (localCandidate.relayProtocol) {\n connectionType = `TURN-${localCandidate.relayProtocol.toUpperCase()}`;\n } else {\n connectionType = localCandidate.protocol?.toUpperCase(); // it will be UDP or TCP\n }\n\n if (connectionType) {\n foundConnectionType = connectionType;\n\n return true;\n }\n LoggerProxy.logger.warn(\n `Media:properties#getConnectionType --> missing localCandidate.protocol, candidateType=${localCandidate.candidateType}`\n );\n\n return false;\n });\n\n if (foundConnectionType === 'unknown') {\n const candidatePairStates = allStatsReports\n .filter((report) => report.type === 'candidate-pair')\n .map((report) => report.state);\n\n LoggerProxy.logger.warn(\n `Media:properties#getConnectionType --> all candidate pair states: ${JSON.stringify(\n candidatePairStates\n )}`\n );\n }\n\n return foundConnectionType;\n }\n\n /**\n * Returns information about current webrtc media connection\n *\n * @returns {Promise<Object>}\n */\n async getCurrentConnectionInfo(): Promise<{\n connectionType: string;\n selectedCandidatePairChanges: number;\n numTransports: number;\n }> {\n const allStatsReports = [];\n\n try {\n const statsResult = await this.webrtcMediaConnection.getStats();\n statsResult.forEach((report) => allStatsReports.push(report));\n } catch (error) {\n LoggerProxy.logger.warn(\n `Media:properties#getCurrentConnectionInfo --> getStats() failed: ${error}`\n );\n }\n\n const connectionType = this.getConnectionType(allStatsReports);\n const {selectedCandidatePairChanges, numTransports} = this.getTransportInfo(allStatsReports);\n\n return {\n connectionType,\n selectedCandidatePairChanges,\n numTransports,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AASA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,uBAAA,GAAAD,sBAAA,CAAAF,OAAA;AAXA;AAsBA;AACA;AACA;AAFA,IAGqBI,eAAe,GAAAC,OAAA,CAAAC,OAAA;EAelC;AACF;AACA;AACA;EACE,SAAAF,gBAAA,EAAc;IAAA,IAAAG,gBAAA,CAAAD,OAAA,QAAAF,eAAA;IAAA,IAAAI,gBAAA,CAAAF,OAAA;IAAA,IAAAE,gBAAA,CAAAF,OAAA;IAAA,IAAAE,gBAAA,CAAAF,OAAA;IAAA,IAAAE,gBAAA,CAAAF,OAAA;IAAA,IAAAE,gBAAA,CAAAF,OAAA;IAAA,IAAAE,gBAAA,CAAAF,OA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529,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
529
529
  // used for waiting for a response
530
530
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "sdpResponseTimer", void 0);
531
531
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "hasMediaConnectionConnectedAtLeastOnce", void 0);
532
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "joinWithMediaRetryInfo", void 0);
532
533
  /**
533
534
  * Callback called when a relay event is received from meeting LLM Connection
534
535
  * @param {RelayEvent} e Event object coming from LLM Connection
@@ -2041,6 +2042,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2041
2042
  * @memberof Meeting
2042
2043
  */
2043
2044
  _this.hasMediaConnectionConnectedAtLeastOnce = false;
2045
+
2046
+ /**
2047
+ * Information needed for a retry of a call to joinWithMedia
2048
+ * @instance
2049
+ * @type {{isRetry: boolean; prevJoinResponse?: any}}
2050
+ * @private
2051
+ * @memberof Meeting
2052
+ */
2053
+ _this.joinWithMediaRetryInfo = {
2054
+ isRetry: false,
2055
+ prevJoinResponse: undefined
2056
+ };
2044
2057
  return _this;
2045
2058
  }
2046
2059
 
@@ -4898,11 +4911,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4898
4911
  mediaOptions,
4899
4912
  _options$joinOptions,
4900
4913
  joinOptions,
4914
+ _this$joinWithMediaRe,
4915
+ isRetry,
4916
+ prevJoinResponse,
4901
4917
  joined,
4918
+ joinResponse,
4902
4919
  turnServerInfo,
4903
4920
  turnDiscoverySkippedReason,
4904
4921
  turnDiscoveryRequest,
4905
- joinResponse,
4906
4922
  _yield$this$roap$hand,
4907
4923
  mediaResponse,
4908
4924
  _this$locusUrl,
@@ -4914,38 +4930,46 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4914
4930
  case 0:
4915
4931
  options = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
4916
4932
  mediaOptions = options.mediaOptions, _options$joinOptions = options.joinOptions, joinOptions = _options$joinOptions === void 0 ? {} : _options$joinOptions;
4933
+ _this$joinWithMediaRe = this.joinWithMediaRetryInfo, isRetry = _this$joinWithMediaRe.isRetry, prevJoinResponse = _this$joinWithMediaRe.prevJoinResponse;
4917
4934
  if (mediaOptions !== null && mediaOptions !== void 0 && mediaOptions.allowMediaInLobby) {
4918
- _context15.next = 4;
4935
+ _context15.next = 5;
4919
4936
  break;
4920
4937
  }
4921
4938
  return _context15.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
4922
- case 4:
4939
+ case 5:
4923
4940
  this.allowMediaInLobby = true;
4924
4941
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia called');
4925
4942
  joined = false;
4926
- _context15.prev = 7;
4927
- _context15.next = 10;
4943
+ joinResponse = prevJoinResponse;
4944
+ _context15.prev = 9;
4945
+ _context15.next = 12;
4928
4946
  return this.webex.meetings.reachability.getReachabilityResults();
4929
- case 10:
4947
+ case 12:
4930
4948
  joinOptions.reachability = _context15.sent;
4931
- _context15.next = 13;
4949
+ _context15.next = 15;
4932
4950
  return this.roap.generateTurnDiscoveryRequestMessage(this, true);
4933
- case 13:
4951
+ case 15:
4934
4952
  turnDiscoveryRequest = _context15.sent;
4935
4953
  turnDiscoverySkippedReason = turnDiscoveryRequest.turnDiscoverySkippedReason;
4936
4954
  joinOptions.roapMessage = turnDiscoveryRequest.roapMessage;
4937
- _context15.next = 18;
4955
+ if (joinResponse) {
4956
+ _context15.next = 23;
4957
+ break;
4958
+ }
4959
+ _loggerProxy.default.logger.info('Meeting:index#joinWithMedia ---> calling join with joinOptions, ', joinOptions);
4960
+ _context15.next = 22;
4938
4961
  return this.join(joinOptions);
4939
- case 18:
4962
+ case 22:
4940
4963
  joinResponse = _context15.sent;
4964
+ case 23:
4941
4965
  joined = true;
4942
4966
  if (!joinOptions.roapMessage) {
4943
- _context15.next = 29;
4967
+ _context15.next = 33;
4944
4968
  break;
4945
4969
  }
4946
- _context15.next = 23;
4970
+ _context15.next = 27;
4947
4971
  return this.roap.handleTurnDiscoveryHttpResponse(this, joinResponse);
4948
- case 23:
4972
+ case 27:
4949
4973
  _yield$this$roap$hand = _context15.sent;
4950
4974
  turnServerInfo = _yield$this$roap$hand.turnServerInfo;
4951
4975
  turnDiscoverySkippedReason = _yield$this$roap$hand.turnDiscoverySkippedReason;
@@ -4954,55 +4978,73 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4954
4978
  if (turnServerInfo === undefined) {
4955
4979
  this.roap.abortTurnDiscovery();
4956
4980
  }
4957
- case 29:
4958
- _context15.next = 31;
4981
+ case 33:
4982
+ _context15.next = 35;
4959
4983
  return this.addMedia(mediaOptions, turnServerInfo);
4960
- case 31:
4984
+ case 35:
4961
4985
  mediaResponse = _context15.sent;
4986
+ this.joinWithMediaRetryInfo = {
4987
+ isRetry: false,
4988
+ prevJoinResponse: undefined
4989
+ };
4962
4990
  return _context15.abrupt("return", {
4963
4991
  join: joinResponse,
4964
4992
  media: mediaResponse
4965
4993
  });
4966
- case 35:
4967
- _context15.prev = 35;
4968
- _context15.t0 = _context15["catch"](7);
4994
+ case 40:
4995
+ _context15.prev = 40;
4996
+ _context15.t0 = _context15["catch"](9);
4969
4997
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _context15.t0);
4970
4998
  this.roap.abortTurnDiscovery();
4971
- if (!joined) {
4972
- _context15.next = 49;
4999
+ if (!(joined && isRetry)) {
5000
+ _context15.next = 54;
4973
5001
  break;
4974
5002
  }
4975
- _context15.prev = 40;
4976
- _context15.next = 43;
5003
+ _context15.prev = 45;
5004
+ _context15.next = 48;
4977
5005
  return this.leave({
4978
5006
  resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
4979
5007
  reason: 'joinWithMedia failure'
4980
5008
  });
4981
- case 43:
4982
- _context15.next = 49;
5009
+ case 48:
5010
+ _context15.next = 54;
4983
5011
  break;
4984
- case 45:
4985
- _context15.prev = 45;
4986
- _context15.t1 = _context15["catch"](40);
5012
+ case 50:
5013
+ _context15.prev = 50;
5014
+ _context15.t1 = _context15["catch"](45);
4987
5015
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _context15.t1);
4988
5016
  leaveError = _context15.t1;
4989
- case 49:
5017
+ case 54:
4990
5018
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
4991
5019
  correlation_id: this.correlationId,
4992
5020
  locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
4993
5021
  // if join fails, we may end up with no locusUrl
4994
5022
  reason: _context15.t0.message,
4995
5023
  stack: _context15.t0.stack,
4996
- leaveErrorReason: (_leaveError = leaveError) === null || _leaveError === void 0 ? void 0 : _leaveError.message
5024
+ leaveErrorReason: (_leaveError = leaveError) === null || _leaveError === void 0 ? void 0 : _leaveError.message,
5025
+ isRetry: isRetry
4997
5026
  }, {
4998
5027
  type: _context15.t0.name
4999
5028
  });
5029
+ if (isRetry) {
5030
+ _context15.next = 60;
5031
+ break;
5032
+ }
5033
+ _loggerProxy.default.logger.warn('Meeting:index#joinWithMedia --> retrying call to joinWithMedia');
5034
+ this.joinWithMediaRetryInfo.isRetry = true;
5035
+ this.joinWithMediaRetryInfo.prevJoinResponse = joinResponse;
5036
+ return _context15.abrupt("return", this.joinWithMedia(options));
5037
+ case 60:
5038
+ this.joinWithMediaRetryInfo = {
5039
+ isRetry: false,
5040
+ prevJoinResponse: undefined
5041
+ };
5000
5042
  throw _context15.t0;
5001
- case 51:
5043
+ case 62:
5002
5044
  case "end":
5003
5045
  return _context15.stop();
5004
5046
  }
5005
- }, _callee15, this, [[7, 35], [40, 45]]);
5047
+ }, _callee15, this, [[9, 40], [45, 50]]);
5006
5048
  }));
5007
5049
  function joinWithMedia() {
5008
5050
  return _joinWithMedia.apply(this, arguments);
@@ -6568,7 +6610,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6568
6610
  remoteMediaManagerConfig,
6569
6611
  bundlePolicy,
6570
6612
  _this$remoteMediaMana,
6613
+ _yield$this$mediaProp,
6571
6614
  connectionType,
6615
+ selectedCandidatePairChanges,
6616
+ numTransports,
6572
6617
  reachabilityStats,
6573
6618
  _this$mediaProperties20,
6574
6619
  _this$mediaProperties21,
@@ -6592,6 +6637,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6592
6637
  _this$mediaProperties39,
6593
6638
  _this$mediaProperties40,
6594
6639
  reachabilityMetrics,
6640
+ _yield$this$mediaProp2,
6641
+ _selectedCandidatePairChanges,
6642
+ _numTransports,
6595
6643
  _args31 = arguments;
6596
6644
  return _regenerator.default.wrap(function _callee31$(_context31) {
6597
6645
  while (1) switch (_context31.prev = _context31.next) {
@@ -6708,19 +6756,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6708
6756
  return this.enqueueScreenShareFloorRequest();
6709
6757
  case 35:
6710
6758
  _context31.next = 37;
6711
- return this.mediaProperties.getCurrentConnectionType();
6759
+ return this.mediaProperties.getCurrentConnectionInfo();
6712
6760
  case 37:
6713
- connectionType = _context31.sent;
6714
- _context31.next = 40;
6761
+ _yield$this$mediaProp = _context31.sent;
6762
+ connectionType = _yield$this$mediaProp.connectionType;
6763
+ selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
6764
+ numTransports = _yield$this$mediaProp.numTransports;
6765
+ _context31.next = 43;
6715
6766
  return this.webex.meetings.reachability.getReachabilityMetrics();
6716
- case 40:
6767
+ case 43:
6717
6768
  reachabilityStats = _context31.sent;
6718
6769
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread({
6719
6770
  correlation_id: this.correlationId,
6720
6771
  locus_id: this.locusUrl.split('/').pop(),
6721
6772
  connectionType: connectionType,
6773
+ selectedCandidatePairChanges: selectedCandidatePairChanges,
6774
+ numTransports: numTransports,
6722
6775
  isMultistream: this.isMultistream,
6723
- retriedWithTurnServer: this.retriedWithTurnServer
6776
+ retriedWithTurnServer: this.retriedWithTurnServer,
6777
+ isJoinWithMediaRetry: this.joinWithMediaRetryInfo.isRetry
6724
6778
  }, reachabilityStats));
6725
6779
  // @ts-ignore
6726
6780
  this.webex.internal.newMetrics.submitClientEvent({
@@ -6733,35 +6787,44 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6733
6787
 
6734
6788
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
6735
6789
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
6736
- _context31.next = 59;
6790
+ _context31.next = 67;
6737
6791
  break;
6738
- case 47:
6739
- _context31.prev = 47;
6792
+ case 50:
6793
+ _context31.prev = 50;
6740
6794
  _context31.t0 = _context31["catch"](19);
6741
6795
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context31.t0);
6742
6796
 
6743
6797
  // @ts-ignore
6744
- _context31.next = 52;
6798
+ _context31.next = 55;
6745
6799
  return this.webex.meetings.reachability.getReachabilityMetrics();
6746
- case 52:
6800
+ case 55:
6747
6801
  reachabilityMetrics = _context31.sent;
6802
+ _context31.next = 58;
6803
+ return this.mediaProperties.getCurrentConnectionInfo();
6804
+ case 58:
6805
+ _yield$this$mediaProp2 = _context31.sent;
6806
+ _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
6807
+ _numTransports = _yield$this$mediaProp2.numTransports;
6748
6808
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread({
6749
6809
  correlation_id: this.correlationId,
6750
6810
  locus_id: this.locusUrl.split('/').pop(),
6751
6811
  reason: _context31.t0.message,
6752
6812
  stack: _context31.t0.stack,
6753
6813
  code: _context31.t0.code,
6814
+ selectedCandidatePairChanges: _selectedCandidatePairChanges,
6815
+ numTransports: _numTransports,
6754
6816
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
6755
6817
  turnServerUsed: this.turnServerUsed,
6756
6818
  retriedWithTurnServer: this.retriedWithTurnServer,
6757
6819
  isMultistream: this.isMultistream,
6820
+ isJoinWithMediaRetry: this.joinWithMediaRetryInfo.isRetry,
6758
6821
  signalingState: ((_this$mediaProperties20 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties20 === void 0 ? void 0 : (_this$mediaProperties21 = _this$mediaProperties20.multistreamConnection) === null || _this$mediaProperties21 === void 0 ? void 0 : (_this$mediaProperties22 = _this$mediaProperties21.pc) === null || _this$mediaProperties22 === void 0 ? void 0 : (_this$mediaProperties23 = _this$mediaProperties22.pc) === null || _this$mediaProperties23 === void 0 ? void 0 : _this$mediaProperties23.signalingState) || ((_this$mediaProperties24 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties24 === void 0 ? void 0 : (_this$mediaProperties25 = _this$mediaProperties24.mediaConnection) === null || _this$mediaProperties25 === void 0 ? void 0 : (_this$mediaProperties26 = _this$mediaProperties25.pc) === null || _this$mediaProperties26 === void 0 ? void 0 : _this$mediaProperties26.signalingState) || 'unknown',
6759
6822
  connectionState: ((_this$mediaProperties27 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties27 === void 0 ? void 0 : (_this$mediaProperties28 = _this$mediaProperties27.multistreamConnection) === null || _this$mediaProperties28 === void 0 ? void 0 : (_this$mediaProperties29 = _this$mediaProperties28.pc) === null || _this$mediaProperties29 === void 0 ? void 0 : (_this$mediaProperties30 = _this$mediaProperties29.pc) === null || _this$mediaProperties30 === void 0 ? void 0 : _this$mediaProperties30.connectionState) || ((_this$mediaProperties31 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties31 === void 0 ? void 0 : (_this$mediaProperties32 = _this$mediaProperties31.mediaConnection) === null || _this$mediaProperties32 === void 0 ? void 0 : (_this$mediaProperties33 = _this$mediaProperties32.pc) === null || _this$mediaProperties33 === void 0 ? void 0 : _this$mediaProperties33.connectionState) || 'unknown',
6760
6823
  iceConnectionState: ((_this$mediaProperties34 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties34 === void 0 ? void 0 : (_this$mediaProperties35 = _this$mediaProperties34.multistreamConnection) === null || _this$mediaProperties35 === void 0 ? void 0 : (_this$mediaProperties36 = _this$mediaProperties35.pc) === null || _this$mediaProperties36 === void 0 ? void 0 : (_this$mediaProperties37 = _this$mediaProperties36.pc) === null || _this$mediaProperties37 === void 0 ? void 0 : _this$mediaProperties37.iceConnectionState) || ((_this$mediaProperties38 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties38 === void 0 ? void 0 : (_this$mediaProperties39 = _this$mediaProperties38.mediaConnection) === null || _this$mediaProperties39 === void 0 ? void 0 : (_this$mediaProperties40 = _this$mediaProperties39.pc) === null || _this$mediaProperties40 === void 0 ? void 0 : _this$mediaProperties40.iceConnectionState) || 'unknown'
6761
6824
  }, reachabilityMetrics));
6762
- _context31.next = 56;
6825
+ _context31.next = 64;
6763
6826
  return this.cleanUpOnAddMediaFailure();
6764
- case 56:
6827
+ case 64:
6765
6828
  // Upload logs on error while adding media
6766
6829
  _triggerProxy.default.trigger(this, {
6767
6830
  file: 'meeting/index',
@@ -6773,11 +6836,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6773
6836
  });
6774
6837
  }
6775
6838
  throw _context31.t0;
6776
- case 59:
6839
+ case 67:
6777
6840
  case "end":
6778
6841
  return _context31.stop();
6779
6842
  }
6780
- }, _callee31, this, [[19, 47]]);
6843
+ }, _callee31, this, [[19, 50]]);
6781
6844
  }));
6782
6845
  function addMedia() {
6783
6846
  return _addMedia.apply(this, arguments);