quickvo-sdk-js 0.4.1 → 0.4.2

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
@@ -7423,7 +7423,7 @@ class RoomBase {
7423
7423
  // 是否禁止通知
7424
7424
  F(this, "isEarly", !1);
7425
7425
  // 是否提前建连
7426
- F(this, "taskQueue", new j(["createWs", "createSession", "ice", "createTrack", "subscribe", "closeTrack"]));
7426
+ F(this, "taskQueue", new j(["createWs", "createSession", "ice", "createTrack", "subscribe", "closeTrack", "publish"]));
7427
7427
  // 条件队列
7428
7428
  F(this, "roomState", "ready");
7429
7429
  // 房间状态
@@ -7443,7 +7443,7 @@ class RoomBase {
7443
7443
  screenSharing_audio: ""
7444
7444
  });
7445
7445
  F(this, "initAsyncQueue", () => {
7446
- this.taskQueue.clear(), this.taskQueue.setCondition("createTrack", !0), this.taskQueue.setCondition("closeTrack", !0), this.taskQueue.setCondition("subscribe", !0);
7446
+ this.taskQueue.clear(), this.taskQueue.setCondition("createTrack", !0), this.taskQueue.setCondition("closeTrack", !0), this.taskQueue.setCondition("subscribe", !0), this.taskQueue.setCondition("publish", !0);
7447
7447
  });
7448
7448
  /**
7449
7449
  * 获取房间信息
@@ -8582,7 +8582,7 @@ class RoomCalls extends RoomPeer {
8582
8582
  F(this, "publish", (_) => new Promise(async (q, k) => {
8583
8583
  const $ = async () => {
8584
8584
  try {
8585
- _.includes("screenSharing_audio") && !_.includes("screenSharing_video") && (_ = [..._, "screenSharing_video"]), await this.replaceSenderStream(_, !1);
8585
+ this.taskQueue.setCondition("publish", !1), _.includes("screenSharing_audio") && !_.includes("screenSharing_video") && (_ = [..._, "screenSharing_video"]), await this.replaceSenderStream(_, !1);
8586
8586
  const e = await this.getCaller();
8587
8587
  for (const P of _)
8588
8588
  this.getUserStream(e.id, P).getTracks().length === 0 && await this.setLocalStream(P, !0);
@@ -8595,16 +8595,16 @@ class RoomCalls extends RoomPeer {
8595
8595
  {
8596
8596
  await this.emitNotifyUpdateUsers();
8597
8597
  const P = await this.getCaller();
8598
- q(P);
8598
+ this.taskQueue.setCondition("publish", !0), q(P);
8599
8599
  }
8600
8600
  } catch (e) {
8601
8601
  console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->Breathe: error", e);
8602
8602
  for (const o of _)
8603
8603
  await this.setLocalStream(o, !1);
8604
- k(`publish is error: ${e.message || e}`);
8604
+ this.taskQueue.setCondition("publish", !0), k(`publish is error: ${e.message || e}`);
8605
8605
  }
8606
8606
  };
8607
- this.taskQueue.addTask($, ["createWs", "createSession", "ice", "createTrack", "subscribe"], { describe: "publish" });
8607
+ this.taskQueue.addTask($, ["createWs", "createSession", "ice", "createTrack", "subscribe", "publish"], { describe: "publish" });
8608
8608
  }));
8609
8609
  /**
8610
8610
  * 停止发布流
@@ -8816,7 +8816,7 @@ class RoomCalls extends RoomPeer {
8816
8816
  * 创建cf会话
8817
8817
  */
8818
8818
  F(this, "createSession", () => new Promise((_) => {
8819
- const q = async () => ["connecting", "connected"].includes(this.roomState) ? _(!0) : (this.setRoomState("connecting"), this.taskQueue.setCondition("createSession", !1), await this.addSenders(), this.cwsIns.sendMessage({
8819
+ const q = async () => ["connecting", "connected"].includes(this.roomState) ? _(!0) : (this.setRoomState("connecting"), this.taskQueue.setCondition("ice", !1), this.taskQueue.setCondition("createSession", !1), await this.addSenders(), this.cwsIns.sendMessage({
8820
8820
  event: "connectCF",
8821
8821
  data: { sdp: this.getSdp() }
8822
8822
  }).then(async (k) => {