quickvo-sdk-js 0.7.3 → 0.7.4
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 +5 -15
- package/dist/index.umd.cjs +1 -1
- package/dist/room/RoomPeer.d.ts +0 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8379,16 +8379,6 @@ class RoomPeer extends RoomUsers {
|
|
|
8379
8379
|
for (const E of a)
|
|
8380
8380
|
this.transceiverMap.has(E) && this.transceiverMap.delete(E);
|
|
8381
8381
|
});
|
|
8382
|
-
/**
|
|
8383
|
-
* 清理收发器
|
|
8384
|
-
*/
|
|
8385
|
-
Z(this, "clearTransceivers", async () => {
|
|
8386
|
-
const a = await this.getAllUserTrackMids(), E = this.peerIns.getTransceivers();
|
|
8387
|
-
for (const _ of E) {
|
|
8388
|
-
const { mid: k } = _;
|
|
8389
|
-
Number(k) === 0 || a.includes(k) || (_.stop(), console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", `------->quickvo: clearTransceivers: ${k} is stop.`, _));
|
|
8390
|
-
}
|
|
8391
|
-
});
|
|
8392
8382
|
/**
|
|
8393
8383
|
* 监听订阅轨道结果
|
|
8394
8384
|
*/
|
|
@@ -8480,13 +8470,13 @@ class RoomPeer extends RoomUsers {
|
|
|
8480
8470
|
Z(this, "closeUserTracks", async (a, E = [], _ = !1) => {
|
|
8481
8471
|
const k = [];
|
|
8482
8472
|
for (const $ of E) {
|
|
8483
|
-
const {
|
|
8484
|
-
k.push(
|
|
8473
|
+
const { trackName: N, msid: D } = $;
|
|
8474
|
+
k.push(N), D && k.push(D);
|
|
8485
8475
|
}
|
|
8486
8476
|
const e = ($) => k.includes($), n = this.peerIns.getTransceivers();
|
|
8487
8477
|
for (const $ of n) {
|
|
8488
|
-
const { mid: N } = $;
|
|
8489
|
-
|
|
8478
|
+
const { mid: N, sender: D, receiver: q } = $;
|
|
8479
|
+
D.track && e(D.track.id) && ($.stop(), this.options.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", `------->quickvo: transceiver.sender: ${N} is stop.`, $)), q.track && e(q.track.id) && ($.stop(), this.options.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", `------->quickvo: transceiver.receiver: ${N} is stop.`, $));
|
|
8490
8480
|
}
|
|
8491
8481
|
const O = await this.getUser(a);
|
|
8492
8482
|
if (O) {
|
|
@@ -9012,7 +9002,7 @@ class RoomCalls extends RoomPeer {
|
|
|
9012
9002
|
this.taskQueue.setCondition("closeTrack", !0), this.reportLogs("close_track_error", e.message || e), _(`stop publish is error: ${e.message || e}`);
|
|
9013
9003
|
}
|
|
9014
9004
|
};
|
|
9015
|
-
this.taskQueue.addTask(k, ["createWs", "createSession", "ice", "createTrack", "subscribe"], { describe: "stopPublish" });
|
|
9005
|
+
this.taskQueue.addTask(k, ["createWs", "createSession", "ice", "createTrack", "subscribe", "closeTrack"], { describe: "stopPublish" });
|
|
9016
9006
|
}));
|
|
9017
9007
|
/**
|
|
9018
9008
|
* 订阅流
|