@webex/plugin-meetings 2.4.1 → 2.6.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/meeting/index.js +150 -0
- package/dist/meeting/index.js.map +1 -1
- package/package.json +7 -6
- package/src/meeting/index.js +70 -0
- package/test/unit/spec/meeting/index.js +167 -0
package/dist/meeting/index.js
CHANGED
|
@@ -64,6 +64,8 @@ var _uuid = _interopRequireDefault(require("uuid"));
|
|
|
64
64
|
|
|
65
65
|
var _webexCore = require("@webex/webex-core");
|
|
66
66
|
|
|
67
|
+
var _internalMediaCore = require("@webex/internal-media-core");
|
|
68
|
+
|
|
67
69
|
var _webexErrors = require("../common/errors/webex-errors");
|
|
68
70
|
|
|
69
71
|
var _statsAnalyzer = _interopRequireDefault(require("../statsAnalyzer"));
|
|
@@ -6155,6 +6157,154 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6155
6157
|
* @memberof Meeting
|
|
6156
6158
|
*/
|
|
6157
6159
|
|
|
6160
|
+
}, {
|
|
6161
|
+
key: "enableBNR",
|
|
6162
|
+
value:
|
|
6163
|
+
/**
|
|
6164
|
+
* enableBNR API
|
|
6165
|
+
* @returns {Promise<Boolean>}
|
|
6166
|
+
* @public
|
|
6167
|
+
* @memberof Meeting
|
|
6168
|
+
*/
|
|
6169
|
+
function () {
|
|
6170
|
+
var _enableBNR = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
6171
|
+
var isSuccess, audioStream;
|
|
6172
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
6173
|
+
while (1) {
|
|
6174
|
+
switch (_context4.prev = _context4.next) {
|
|
6175
|
+
case 0:
|
|
6176
|
+
_loggerProxy.default.logger.info('Meeting:index#enableBNR. Enable BNR called');
|
|
6177
|
+
|
|
6178
|
+
isSuccess = false;
|
|
6179
|
+
_context4.prev = 2;
|
|
6180
|
+
|
|
6181
|
+
if (!(typeof this.mediaProperties === 'undefined' || typeof this.mediaProperties.audioTrack === 'undefined')) {
|
|
6182
|
+
_context4.next = 5;
|
|
6183
|
+
break;
|
|
6184
|
+
}
|
|
6185
|
+
|
|
6186
|
+
throw new Error("Meeting doesn't have an audioTrack attached");
|
|
6187
|
+
|
|
6188
|
+
case 5:
|
|
6189
|
+
_context4.next = 7;
|
|
6190
|
+
return _internalMediaCore.Media.Effects.BNR.enableBNR(this.mediaProperties.audioTrack);
|
|
6191
|
+
|
|
6192
|
+
case 7:
|
|
6193
|
+
this.mediaProperties.audioTrack = _context4.sent;
|
|
6194
|
+
audioStream = _util2.default.createMediaStream([this.mediaProperties.audioTrack]);
|
|
6195
|
+
|
|
6196
|
+
_loggerProxy.default.logger.info('Meeting:index#enableBNR. BNR enabled track obtained from WebRTC & sent to updateAudio');
|
|
6197
|
+
|
|
6198
|
+
_context4.next = 12;
|
|
6199
|
+
return this.updateAudio({
|
|
6200
|
+
sendAudio: true,
|
|
6201
|
+
receiveAudio: true,
|
|
6202
|
+
stream: audioStream
|
|
6203
|
+
});
|
|
6204
|
+
|
|
6205
|
+
case 12:
|
|
6206
|
+
this.isBnrEnabled = true;
|
|
6207
|
+
isSuccess = true;
|
|
6208
|
+
_context4.next = 20;
|
|
6209
|
+
break;
|
|
6210
|
+
|
|
6211
|
+
case 16:
|
|
6212
|
+
_context4.prev = 16;
|
|
6213
|
+
_context4.t0 = _context4["catch"](2);
|
|
6214
|
+
|
|
6215
|
+
_loggerProxy.default.logger.error("Meeting:index#enableBNR. ".concat(_context4.t0));
|
|
6216
|
+
|
|
6217
|
+
throw _context4.t0;
|
|
6218
|
+
|
|
6219
|
+
case 20:
|
|
6220
|
+
return _context4.abrupt("return", isSuccess);
|
|
6221
|
+
|
|
6222
|
+
case 21:
|
|
6223
|
+
case "end":
|
|
6224
|
+
return _context4.stop();
|
|
6225
|
+
}
|
|
6226
|
+
}
|
|
6227
|
+
}, _callee4, this, [[2, 16]]);
|
|
6228
|
+
}));
|
|
6229
|
+
|
|
6230
|
+
function enableBNR() {
|
|
6231
|
+
return _enableBNR.apply(this, arguments);
|
|
6232
|
+
}
|
|
6233
|
+
|
|
6234
|
+
return enableBNR;
|
|
6235
|
+
}()
|
|
6236
|
+
/**
|
|
6237
|
+
* disableBNR API
|
|
6238
|
+
* @returns {Promise<Boolean>}
|
|
6239
|
+
* @public
|
|
6240
|
+
* @memberof Meeting
|
|
6241
|
+
*/
|
|
6242
|
+
|
|
6243
|
+
}, {
|
|
6244
|
+
key: "disableBNR",
|
|
6245
|
+
value: function () {
|
|
6246
|
+
var _disableBNR = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
6247
|
+
var isSuccess, audioStream;
|
|
6248
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
6249
|
+
while (1) {
|
|
6250
|
+
switch (_context5.prev = _context5.next) {
|
|
6251
|
+
case 0:
|
|
6252
|
+
_loggerProxy.default.logger.info('Meeting:index#disableBNR. Disable BNR called');
|
|
6253
|
+
|
|
6254
|
+
isSuccess = false;
|
|
6255
|
+
_context5.prev = 2;
|
|
6256
|
+
|
|
6257
|
+
if (!(typeof this.mediaProperties === 'undefined' || typeof this.mediaProperties.audioTrack === 'undefined')) {
|
|
6258
|
+
_context5.next = 5;
|
|
6259
|
+
break;
|
|
6260
|
+
}
|
|
6261
|
+
|
|
6262
|
+
throw new Error("Meeting doesn't have an audioTrack attached");
|
|
6263
|
+
|
|
6264
|
+
case 5:
|
|
6265
|
+
this.mediaProperties.audioTrack = _internalMediaCore.Media.Effects.BNR.disableBNR(this.mediaProperties.audioTrack);
|
|
6266
|
+
audioStream = _util2.default.createMediaStream([this.mediaProperties.audioTrack]);
|
|
6267
|
+
|
|
6268
|
+
_loggerProxy.default.logger.info('Meeting:index#disableBNR. Raw media track obtained from WebRTC & sent to updateAudio');
|
|
6269
|
+
|
|
6270
|
+
_context5.next = 10;
|
|
6271
|
+
return this.updateAudio({
|
|
6272
|
+
sendAudio: true,
|
|
6273
|
+
receiveAudio: true,
|
|
6274
|
+
stream: audioStream
|
|
6275
|
+
});
|
|
6276
|
+
|
|
6277
|
+
case 10:
|
|
6278
|
+
this.isBnrEnabled = false;
|
|
6279
|
+
isSuccess = true;
|
|
6280
|
+
_context5.next = 18;
|
|
6281
|
+
break;
|
|
6282
|
+
|
|
6283
|
+
case 14:
|
|
6284
|
+
_context5.prev = 14;
|
|
6285
|
+
_context5.t0 = _context5["catch"](2);
|
|
6286
|
+
|
|
6287
|
+
_loggerProxy.default.logger.error("Meeting:index#disableBNR. ".concat(_context5.t0));
|
|
6288
|
+
|
|
6289
|
+
throw _context5.t0;
|
|
6290
|
+
|
|
6291
|
+
case 18:
|
|
6292
|
+
return _context5.abrupt("return", isSuccess);
|
|
6293
|
+
|
|
6294
|
+
case 19:
|
|
6295
|
+
case "end":
|
|
6296
|
+
return _context5.stop();
|
|
6297
|
+
}
|
|
6298
|
+
}
|
|
6299
|
+
}, _callee5, this, [[2, 14]]);
|
|
6300
|
+
}));
|
|
6301
|
+
|
|
6302
|
+
function disableBNR() {
|
|
6303
|
+
return _disableBNR.apply(this, arguments);
|
|
6304
|
+
}
|
|
6305
|
+
|
|
6306
|
+
return disableBNR;
|
|
6307
|
+
}()
|
|
6158
6308
|
}]);
|
|
6159
6309
|
return Meeting;
|
|
6160
6310
|
}(_webexCore.StatelessWebexPlugin);
|