@webex/calling 3.0.0-next.20 → 3.0.0-next.22

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.
@@ -193,7 +193,7 @@ var Call = /*#__PURE__*/function (_Eventing) {
193
193
  }
194
194
  });
195
195
  /**
196
- * .
196
+ * Mutes/Unmutes the call.
197
197
  *
198
198
  * @param localAudioTrack -.
199
199
  */
@@ -207,6 +207,24 @@ var Call = /*#__PURE__*/function (_Eventing) {
207
207
  _this.muted = true;
208
208
  }
209
209
  });
210
+ /**
211
+ * Change the audio stream of the call.
212
+ *
213
+ * @param newAudioStream - The new audio stream to be used in the call.
214
+ */
215
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateMedia", function (newAudioStream) {
216
+ var localAudioTrack = newAudioStream.outputStream.getAudioTracks()[0];
217
+ if (!localAudioTrack) {
218
+ _Logger.default.warn("Did not find a local track while updating media for call ".concat(_this.getCorrelationId(), ". Will not update media"), {
219
+ file: _constants.CALL_FILE,
220
+ method: 'updateMedia'
221
+ });
222
+ return;
223
+ }
224
+ _this.mediaConnection.updateLocalTracks({
225
+ audio: localAudioTrack
226
+ });
227
+ });
210
228
  _this.destination = destination;
211
229
  _this.direction = direction;
212
230
  _this.sdkConnector = _SDKConnector.default;
@@ -2306,7 +2324,7 @@ var Call = /*#__PURE__*/function (_Eventing) {
2306
2324
  _context18.next = 6;
2307
2325
  break;
2308
2326
  }
2309
- _Logger.default.warn("Did not find a local track while dialling the call ".concat(this.getCorrelationId()), {
2327
+ _Logger.default.warn("Did not find a local track while dialing the call ".concat(this.getCorrelationId()), {
2310
2328
  file: _constants.CALL_FILE,
2311
2329
  method: 'dial'
2312
2330
  });