@webex/web-client-media-engine 3.6.1 → 3.7.1

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/esm/index.js CHANGED
@@ -1225,6 +1225,14 @@ class _Stream {
1225
1225
  track.removeEventListener('unmute', this.handleTrackUnmuted);
1226
1226
  track.removeEventListener('ended', this.handleTrackEnded);
1227
1227
  }
1228
+ /**
1229
+ * Get the ID of the output stream.
1230
+ *
1231
+ * @returns The ID of the output stream.
1232
+ */
1233
+ get id() {
1234
+ return this.outputStream.id;
1235
+ }
1228
1236
  /**
1229
1237
  * Get the track of the output stream.
1230
1238
  *
@@ -1301,6 +1309,14 @@ class _LocalStream extends Stream {
1301
1309
  get label() {
1302
1310
  return this.inputTrack.label;
1303
1311
  }
1312
+ /**
1313
+ * Get the readyState of the input track on this stream.
1314
+ *
1315
+ * @returns The readyState of the track.
1316
+ */
1317
+ get readyState() {
1318
+ return this.inputTrack.readyState;
1319
+ }
1304
1320
  /**
1305
1321
  * Change the track of the output stream to a different track.
1306
1322
  *
@@ -1382,6 +1398,14 @@ class _LocalStream extends Stream {
1382
1398
  var _c;
1383
1399
  return (_c = this.effects.find((e) => e.name === name)) === null || _c === void 0 ? void 0 : _c.effect;
1384
1400
  }
1401
+ /**
1402
+ * Get all the effects from the effects list.
1403
+ *
1404
+ * @returns A list of effect items, each containing the name and the effect itself.
1405
+ */
1406
+ getAllEffects() {
1407
+ return this.effects;
1408
+ }
1385
1409
  /**
1386
1410
  * Cleanup the local effects.
1387
1411
  */
@@ -14322,18 +14346,20 @@ class MultistreamConnection extends EventEmitter$2 {
14322
14346
  if (!this.pc.getLocalDescription()) {
14323
14347
  this.midPredictor.allocateMidForDatachannel();
14324
14348
  }
14325
- return new Promise((createOfferResolve) => {
14349
+ return new Promise((createOfferResolve, createOfferReject) => {
14326
14350
  this.offerAnswerQueue.push(() => __awaiter(this, void 0, void 0, function* () {
14327
14351
  var _a;
14328
14352
  if (this.setAnswerResolve !== undefined) {
14329
- throw new Error(`Tried to start a new createOffer flow before the old one had finished`);
14353
+ createOfferReject(new Error(`Tried to start a new createOffer flow before the old one had finished`));
14354
+ return;
14330
14355
  }
14331
14356
  const setAnswerPromise = new Promise((resolve) => {
14332
14357
  this.setAnswerResolve = resolve;
14333
14358
  });
14334
14359
  const offer = yield this.pc.createOffer();
14335
14360
  if (!offer.sdp) {
14336
- throw new Error('No SDP offer');
14361
+ createOfferReject(new Error('No SDP offer'));
14362
+ return;
14337
14363
  }
14338
14364
  offer.sdp = this.preProcessLocalOffer(offer.sdp);
14339
14365
  yield this.pc.setLocalDescription(offer);