@webex/plugin-meetings 2.31.4 → 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.
- package/dist/constants.js +60 -36
- package/dist/constants.js.map +1 -1
- package/dist/media/properties.js +1 -1
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/index.js +72 -30
- package/dist/meeting/index.js.map +1 -1
- package/dist/peer-connection-manager/index.js +9 -11
- package/dist/peer-connection-manager/index.js.map +1 -1
- package/dist/peer-connection-manager/util.js +99 -3
- package/dist/peer-connection-manager/util.js.map +1 -1
- package/package.json +18 -17
- package/src/constants.ts +45 -19
- package/src/media/properties.js +1 -1
- package/src/meeting/index.js +28 -5
- package/src/peer-connection-manager/index.js +11 -12
- package/src/peer-connection-manager/util.ts +117 -0
- package/test/unit/spec/meeting/index.js +56 -50
- package/test/unit/spec/peerconnection-manager/utils.js +30 -7
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +389 -0
- package/src/peer-connection-manager/util.js +0 -19
package/dist/meeting/index.js
CHANGED
|
@@ -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
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
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
|
-
*
|
|
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(
|
|
6011
|
-
var audioTrack =
|
|
6012
|
-
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
|
|
6351
|
+
var _internal_enableBNR = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(audioTrack) {
|
|
6310
6352
|
var bnrAudioTrack;
|
|
6311
|
-
return _regenerator.default.wrap(function
|
|
6353
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
6312
6354
|
while (1) {
|
|
6313
|
-
switch (
|
|
6355
|
+
switch (_context7.prev = _context7.next) {
|
|
6314
6356
|
case 0:
|
|
6315
|
-
|
|
6357
|
+
_context7.prev = 0;
|
|
6316
6358
|
|
|
6317
6359
|
_loggerProxy.default.logger.info('Meeting:index#internal_enableBNR. Internal enable BNR called');
|
|
6318
6360
|
|
|
6319
|
-
|
|
6361
|
+
_context7.next = 4;
|
|
6320
6362
|
return _internalMediaCore.Media.Effects.BNR.enableBNR(audioTrack);
|
|
6321
6363
|
|
|
6322
6364
|
case 4:
|
|
6323
|
-
bnrAudioTrack =
|
|
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
|
|
6369
|
+
return _context7.abrupt("return", bnrAudioTrack);
|
|
6328
6370
|
|
|
6329
6371
|
case 9:
|
|
6330
|
-
|
|
6331
|
-
|
|
6372
|
+
_context7.prev = 9;
|
|
6373
|
+
_context7.t0 = _context7["catch"](0);
|
|
6332
6374
|
|
|
6333
|
-
_loggerProxy.default.logger.error('Meeting:index#internal_enableBNR.',
|
|
6375
|
+
_loggerProxy.default.logger.error('Meeting:index#internal_enableBNR.', _context7.t0);
|
|
6334
6376
|
|
|
6335
|
-
throw
|
|
6377
|
+
throw _context7.t0;
|
|
6336
6378
|
|
|
6337
6379
|
case 13:
|
|
6338
6380
|
case "end":
|
|
6339
|
-
return
|
|
6381
|
+
return _context7.stop();
|
|
6340
6382
|
}
|
|
6341
6383
|
}
|
|
6342
|
-
},
|
|
6384
|
+
}, _callee7, null, [[0, 9]]);
|
|
6343
6385
|
}));
|
|
6344
6386
|
|
|
6345
|
-
function internal_enableBNR(
|
|
6387
|
+
function internal_enableBNR(_x5) {
|
|
6346
6388
|
return _internal_enableBNR.apply(this, arguments);
|
|
6347
6389
|
}
|
|
6348
6390
|
|