@lvce-editor/renderer-process 30.29.0 → 30.29.1
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.
|
@@ -9665,7 +9665,8 @@ const startWebRtcAudioStream = async options => {
|
|
|
9665
9665
|
micAnalyzer,
|
|
9666
9666
|
micStream,
|
|
9667
9667
|
port,
|
|
9668
|
-
remoteAnalyzer: remoteAnalyzerInstance
|
|
9668
|
+
remoteAnalyzer: remoteAnalyzerInstance,
|
|
9669
|
+
remoteAudio
|
|
9669
9670
|
};
|
|
9670
9671
|
return offer.sdp;
|
|
9671
9672
|
};
|
|
@@ -9689,10 +9690,7 @@ const setRemoteDescription = async options => {
|
|
|
9689
9690
|
};
|
|
9690
9691
|
|
|
9691
9692
|
// TODO this has a race conditon when start/stop is pressed fast
|
|
9692
|
-
const stopWebRtcAudioStream = async
|
|
9693
|
-
const {
|
|
9694
|
-
uid
|
|
9695
|
-
} = options;
|
|
9693
|
+
const stopWebRtcAudioStream = async uid => {
|
|
9696
9694
|
const pc = pcs[uid];
|
|
9697
9695
|
if (!pc) {
|
|
9698
9696
|
return;
|
|
@@ -9703,15 +9701,18 @@ const stopWebRtcAudioStream = async options => {
|
|
|
9703
9701
|
connection,
|
|
9704
9702
|
dataChannel,
|
|
9705
9703
|
micStream,
|
|
9706
|
-
port
|
|
9704
|
+
port,
|
|
9705
|
+
remoteAudio
|
|
9707
9706
|
} = pc;
|
|
9708
9707
|
delete pcs[uid];
|
|
9708
|
+
connection.ontrack = null;
|
|
9709
9709
|
connection.close();
|
|
9710
9710
|
dataChannel.close();
|
|
9711
9711
|
for (const t of micStream.getTracks()) {
|
|
9712
9712
|
t.stop();
|
|
9713
9713
|
}
|
|
9714
9714
|
port.close();
|
|
9715
|
+
remoteAudio.srcObject = null;
|
|
9715
9716
|
if (audioCtx) {
|
|
9716
9717
|
await audioCtx.close();
|
|
9717
9718
|
}
|