quickvo-sdk-js 0.6.5 → 0.6.6

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/index.js CHANGED
@@ -8448,13 +8448,13 @@ class RoomPeer extends RoomUsers {
8448
8448
  Z(this, "closeUserTracks", async (u, E = [], _ = !1) => {
8449
8449
  const k = [];
8450
8450
  for (const $ of E) {
8451
- const { trackName: N, msid: D } = $;
8452
- k.push(N), D && k.push(D);
8451
+ const { mid: N, trackName: D, msid: q } = $;
8452
+ k.push(D), N && k.push(N), q && k.push(q);
8453
8453
  }
8454
8454
  const e = ($) => k.includes($), n = this.peerIns.getTransceivers();
8455
8455
  for (const $ of n) {
8456
- const { sender: N, receiver: D } = $;
8457
- N.track && e(N.track.id) && (console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", `------->quickvo: sender: ${N.track.id} is stop.`, $), $.stop()), D.track && e(D.track.id) && (console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", `------->quickvo: receiver: ${D.track.id} is stop.`, $), $.stop());
8456
+ const { mid: N } = $;
8457
+ N && e(N) && ($.stop(), console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", `------->quickvo: transceiver: ${N} is stop.`, $));
8458
8458
  }
8459
8459
  const O = await this.getUser(u);
8460
8460
  if (O) {
@@ -8716,7 +8716,9 @@ class RoomCalls extends RoomPeer {
8716
8716
  const _ = async () => {
8717
8717
  try {
8718
8718
  this.taskQueue.setCondition("createTrack", !1);
8719
- const k = await this.addSenders(u), e = await this.getSenderTracks(k);
8719
+ const k = await this.addSenders(u);
8720
+ await this.replaceSenderStream(u, !1);
8721
+ const e = await this.getSenderTracks(k);
8720
8722
  if (e.length === 0)
8721
8723
  return this.taskQueue.setCondition("createTrack", !0), E(!0);
8722
8724
  await this.cwsIns.sendMessage({
@@ -8933,7 +8935,7 @@ class RoomCalls extends RoomPeer {
8933
8935
  await this.emitNotifyUpdateUsers(), E($);
8934
8936
  };
8935
8937
  if (n.length === 0) return O();
8936
- await this.closeUserTracks(e.id, n, !0), await this.removeSenders(u);
8938
+ await this.replaceSenderStream(u, !0), await this.closeUserTracks(e.id, n, !0), await this.removeSenders(u);
8937
8939
  {
8938
8940
  const $ = await this.getCallAction(e.tracks);
8939
8941
  await J(this, Et).call(this, $);