quickvo-sdk-js 0.6.1 → 0.6.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 +13 -9
- package/dist/index.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -747,9 +747,16 @@ class AudioMediaContext {
|
|
|
747
747
|
* 停止
|
|
748
748
|
*/
|
|
749
749
|
Z(this, "stop", () => {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
750
|
+
{
|
|
751
|
+
const I = this.destination.stream.getTracks();
|
|
752
|
+
for (const u of I)
|
|
753
|
+
u.enabled = !1, u.stop(), this.stream.removeTrack(u);
|
|
754
|
+
}
|
|
755
|
+
{
|
|
756
|
+
const I = this.stream.getTracks();
|
|
757
|
+
for (const u of I)
|
|
758
|
+
u.enabled = !1, u.stop(), this.stream.removeTrack(u);
|
|
759
|
+
}
|
|
753
760
|
});
|
|
754
761
|
/**
|
|
755
762
|
* 替换媒体
|
|
@@ -8699,6 +8706,7 @@ class RoomCalls extends RoomPeer {
|
|
|
8699
8706
|
this.removeUserMediaStreamContext(e, O);
|
|
8700
8707
|
continue;
|
|
8701
8708
|
}
|
|
8709
|
+
if (E === !1) return;
|
|
8702
8710
|
if (u.includes("microphoneCamera_audio") && u.includes("microphoneCamera_video") && await this.initLocalStream("microphoneCamera"), u.includes("microphoneCamera_audio") && await this.initLocalStream("microphoneCamera_audio"), u.includes("microphoneCamera_video") && await this.initLocalStream("microphoneCamera_video"), u.includes("screenSharing_audio") && u.includes("screenSharing_video") && await this.initLocalStream("screenSharing"), u.includes("screenSharing_audio") && !u.includes("screenSharing_video") && await this.initLocalStream("screenSharing_audio"), u.includes("screenSharing_video") && !u.includes("screenSharing_audio") && await this.initLocalStream("screenSharing_video"), u.includes("screenSharing_audio")) {
|
|
8703
8711
|
const $ = this.getUserStream(e, "screenSharing_audio").getTracks();
|
|
8704
8712
|
for (const N of $)
|
|
@@ -8790,9 +8798,7 @@ class RoomCalls extends RoomPeer {
|
|
|
8790
8798
|
Z(this, "quitRoom", () => new Promise(async (u) => {
|
|
8791
8799
|
const { roomId: E, userId: _ } = this.options, k = { roomId: E, user: { id: _ } };
|
|
8792
8800
|
try {
|
|
8793
|
-
this.isInRoom = !1, this.
|
|
8794
|
-
this.stopSubscribe(), this.stopGetPeerStats(), this.clearUsers(), this.clearUserStreams(), this.cwsIns.clearEvents(), this.setRoomState("ready");
|
|
8795
|
-
});
|
|
8801
|
+
this.isInRoom = !1, this.setLocalStream(["microphoneCamera_audio", "microphoneCamera_video", "screenSharing_audio", "screenSharing_video"], !1), this.stopSubscribe(), this.stopGetPeerStats(), this.clearUsers(), this.clearUserStreams(), this.cwsIns.clearEvents(), this.setRoomState("ready");
|
|
8796
8802
|
} catch (e) {
|
|
8797
8803
|
this.reportLogs("quit_room_error", e.message || e);
|
|
8798
8804
|
}
|
|
@@ -8806,9 +8812,7 @@ class RoomCalls extends RoomPeer {
|
|
|
8806
8812
|
Z(this, "quitRoomEx", () => new Promise(async (u) => {
|
|
8807
8813
|
const { roomId: E, userId: _ } = this.options, k = { roomId: E, user: { id: _ } };
|
|
8808
8814
|
try {
|
|
8809
|
-
this.isInRoom = !1, this.
|
|
8810
|
-
this.stopSubscribe(), this.stopGetPeerStats(), this.clearUsers(), this.clearUserStreams();
|
|
8811
|
-
});
|
|
8815
|
+
this.isInRoom = !1, this.setLocalStream(["microphoneCamera_audio", "microphoneCamera_video", "screenSharing_audio", "screenSharing_video"], !1), this.stopSubscribe(), this.stopGetPeerStats(), this.clearUsers(), this.clearUserStreams();
|
|
8812
8816
|
} catch (e) {
|
|
8813
8817
|
this.reportLogs("quit_room_error", e.message || e);
|
|
8814
8818
|
}
|