Closed vneznaikin closed 2 years ago
I am using MediaStreamAudioSourceNode to connect via WebRTC. Everything works fine until the moment when I need to end the call and open a new connection. What am I doing:
this.peerConnection.ontrack = (e) => { this.stream = e.streams[0]; ... this.source = this.context.createMediaStreamSource(this.stream); ...
this.peerConnection.close() ... this.stream.getAudioTracks().forEach(track => { track.stop() this.stream.removeTrack(track); }); ... this.source.disconnect(this.destination) this.source.disconnect() this.source = null
After remove all tracks MediaStream have status "inactive" But node MediaStreamAudioSource still EXIST. I can see it through the Chrome app "Audion"
I tried not to recreate MediaStreamAudioSourceNode , just delete tracks and add new ones to MediaStream, but it's not working
I found a similar issue on stackoverflow, without any solution
As a result I didn't find any way to destroy the MediaStreamAudioSourceNode . Maybe I'm missing something?
This looks like a GC issue and maybe browser-specific. Please file an issue to the bug tracker for the browser that you used.
This issue still there.
Chrome version: 116.0.5845.187(arm64) OS: macOS 13.5.1
Please file an issue here with a small repro case.
This forum is for spec discussion, and the problem reported above is an implementation issue.
I am using MediaStreamAudioSourceNode to connect via WebRTC. Everything works fine until the moment when I need to end the call and open a new connection. What am I doing:
After remove all tracks MediaStream have status "inactive" But node MediaStreamAudioSource still EXIST. I can see it through the Chrome app "Audion"
I tried not to recreate MediaStreamAudioSourceNode , just delete tracks and add new ones to MediaStream, but it's not working
I found a similar issue on stackoverflow, without any solution
As a result I didn't find any way to destroy the MediaStreamAudioSourceNode . Maybe I'm missing something?