@webex/plugin-meetings 2.31.3 → 2.32.0

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.
@@ -189,6 +189,7 @@ var MEDIA_UPDATE_TYPE = {
189
189
  * @property {String} audio.deviceId
190
190
  * @property {Object} video
191
191
  * @property {String} video.deviceId
192
+ * @property {String} video.localVideoQuality // [240p, 360p, 480p, 720p, 1080p]
192
193
  */
193
194
 
194
195
  /**
@@ -496,6 +497,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
496
497
  _loggerProxy.default.logger.warn('Meeting:index#getMediaStreams --> Enabling `sendShare` along with `sendAudio` & `sendVideo`, on Safari, causes a failure while setting up a screen share at the same time as the camera+mic stream');
497
498
 
498
499
  _loggerProxy.default.logger.warn('Meeting:index#getMediaStreams --> Please use `meeting.shareScreen()` to manually start the screen share after successfully joining the meeting');
500
+ }
501
+
502
+ if (!audioVideo.video) {
503
+ audioVideo = _objectSpread(_objectSpread({}, audioVideo), {}, {
504
+ video: _objectSpread(_objectSpread({}, audioVideo.video), _constants.VIDEO_RESOLUTIONS[_this.mediaProperties.localQualityLevel].video)
505
+ });
499
506
  } // extract deviceId if exists otherwise default to null.
500
507
 
501
508
 
@@ -3185,6 +3192,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3185
3192
  width = _videoTrack$getSettin.width,
3186
3193
  deviceId = _videoTrack$getSettin.deviceId;
3187
3194
 
3195
+ var localQualityLevel = this.mediaProperties.localQualityLevel;
3196
+
3197
+ if (Number(localQualityLevel.slice(0, -1)) > height) {
3198
+ _loggerProxy.default.logger.error("Meeting:index#setLocalVideoTrack --> Local video quality of ".concat(localQualityLevel, " not supported,\n downscaling to highest possible resolution of ").concat(height, "p"));
3199
+
3200
+ this.mediaProperties.setLocalQualityLevel("".concat(height, "p"));
3201
+ }
3202
+
3188
3203
  this.mediaProperties.setLocalVideoTrack(videoTrack);
3189
3204
  if (this.video) this.video.applyClientStateLocally(this);
3190
3205
  this.mediaProperties.setMediaSettings('video', {
@@ -5757,7 +5772,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5757
5772
  /**
5758
5773
  * Sets the quality of the local video stream
5759
5774
  * @param {String} level {LOW|MEDIUM|HIGH}
5760
- * @returns {Promise}
5775
+ * @returns {Promise<MediaStream>} localStream
5761
5776
  */
5762
5777
 
5763
5778
  }, {
@@ -5788,17 +5803,43 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5788
5803
  sendAudio: this.mediaProperties.mediaDirection.sendAudio,
5789
5804
  sendVideo: this.mediaProperties.mediaDirection.sendVideo,
5790
5805
  sendShare: this.mediaProperties.mediaDirection.sendShare
5791
- };
5792
- return this.getMediaStreams(mediaDirection, _constants.VIDEO_RESOLUTIONS[level]).then(function (_ref13) {
5793
- var _ref14 = (0, _slicedToArray2.default)(_ref13, 1),
5794
- localStream = _ref14[0];
5795
-
5796
- return _this52.updateVideo({
5797
- sendVideo: true,
5798
- receiveVideo: true,
5799
- stream: localStream
5800
- });
5801
- });
5806
+ }; // When changing local video quality level
5807
+ // Need to stop current track first as chrome doesn't support resolution upscaling(for eg. changing 480p to 720p)
5808
+ // Without feeding it a new track
5809
+ // open bug link: https://bugs.chromium.org/p/chromium/issues/detail?id=943469
5810
+
5811
+ if (isBrowser('chrome') && this.mediaProperties.videoTrack) _media.default.stopTracks(this.mediaProperties.videoTrack);
5812
+ return this.getMediaStreams(mediaDirection, _constants.VIDEO_RESOLUTIONS[level]).then( /*#__PURE__*/function () {
5813
+ var _ref14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(_ref13) {
5814
+ var _ref15, localStream;
5815
+
5816
+ return _regenerator.default.wrap(function _callee6$(_context6) {
5817
+ while (1) {
5818
+ switch (_context6.prev = _context6.next) {
5819
+ case 0:
5820
+ _ref15 = (0, _slicedToArray2.default)(_ref13, 1), localStream = _ref15[0];
5821
+ _context6.next = 3;
5822
+ return _this52.updateVideo({
5823
+ sendVideo: true,
5824
+ receiveVideo: true,
5825
+ stream: localStream
5826
+ });
5827
+
5828
+ case 3:
5829
+ return _context6.abrupt("return", localStream);
5830
+
5831
+ case 4:
5832
+ case "end":
5833
+ return _context6.stop();
5834
+ }
5835
+ }
5836
+ }, _callee6);
5837
+ }));
5838
+
5839
+ return function (_x4) {
5840
+ return _ref14.apply(this, arguments);
5841
+ };
5842
+ }());
5802
5843
  }
5803
5844
  /**
5804
5845
  * Sets the quality level of the remote incoming media
@@ -5833,9 +5874,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5833
5874
  });
5834
5875
  }
5835
5876
  /**
5836
- * Sets the quality level of all meeting media (incoming/outgoing)
5877
+ * This is deprecated, please use setLocalVideoQuality for setting local and setRemoteQualityLevel for remote
5837
5878
  * @param {String} level {LOW|MEDIUM|HIGH}
5838
5879
  * @returns {Promise}
5880
+ * @deprecated After FHD support
5839
5881
  */
5840
5882
 
5841
5883
  }, {
@@ -6007,9 +6049,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6007
6049
 
6008
6050
  }, {
6009
6051
  key: "handleMediaLogging",
6010
- value: function handleMediaLogging(_ref15) {
6011
- var audioTrack = _ref15.audioTrack,
6012
- videoTrack = _ref15.videoTrack;
6052
+ value: function handleMediaLogging(_ref16) {
6053
+ var audioTrack = _ref16.audioTrack,
6054
+ videoTrack = _ref16.videoTrack;
6013
6055
 
6014
6056
  _util.default.handleVideoLogging(videoTrack);
6015
6057
 
@@ -6306,43 +6348,43 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6306
6348
  }, {
6307
6349
  key: "internal_enableBNR",
6308
6350
  value: function () {
6309
- var _internal_enableBNR = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(audioTrack) {
6351
+ var _internal_enableBNR = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(audioTrack) {
6310
6352
  var bnrAudioTrack;
6311
- return _regenerator.default.wrap(function _callee6$(_context6) {
6353
+ return _regenerator.default.wrap(function _callee7$(_context7) {
6312
6354
  while (1) {
6313
- switch (_context6.prev = _context6.next) {
6355
+ switch (_context7.prev = _context7.next) {
6314
6356
  case 0:
6315
- _context6.prev = 0;
6357
+ _context7.prev = 0;
6316
6358
 
6317
6359
  _loggerProxy.default.logger.info('Meeting:index#internal_enableBNR. Internal enable BNR called');
6318
6360
 
6319
- _context6.next = 4;
6361
+ _context7.next = 4;
6320
6362
  return _internalMediaCore.Media.Effects.BNR.enableBNR(audioTrack);
6321
6363
 
6322
6364
  case 4:
6323
- bnrAudioTrack = _context6.sent;
6365
+ bnrAudioTrack = _context7.sent;
6324
6366
 
6325
6367
  _loggerProxy.default.logger.info('Meeting:index#internal_enableBNR. BNR enabled track obtained from WebRTC & returned as stream');
6326
6368
 
6327
- return _context6.abrupt("return", bnrAudioTrack);
6369
+ return _context7.abrupt("return", bnrAudioTrack);
6328
6370
 
6329
6371
  case 9:
6330
- _context6.prev = 9;
6331
- _context6.t0 = _context6["catch"](0);
6372
+ _context7.prev = 9;
6373
+ _context7.t0 = _context7["catch"](0);
6332
6374
 
6333
- _loggerProxy.default.logger.error('Meeting:index#internal_enableBNR.', _context6.t0);
6375
+ _loggerProxy.default.logger.error('Meeting:index#internal_enableBNR.', _context7.t0);
6334
6376
 
6335
- throw _context6.t0;
6377
+ throw _context7.t0;
6336
6378
 
6337
6379
  case 13:
6338
6380
  case "end":
6339
- return _context6.stop();
6381
+ return _context7.stop();
6340
6382
  }
6341
6383
  }
6342
- }, _callee6, null, [[0, 9]]);
6384
+ }, _callee7, null, [[0, 9]]);
6343
6385
  }));
6344
6386
 
6345
- function internal_enableBNR(_x4) {
6387
+ function internal_enableBNR(_x5) {
6346
6388
  return _internal_enableBNR.apply(this, arguments);
6347
6389
  }
6348
6390