How to completely kill the WebRTC media stream?
MediaStream.stop()
is not working anymore.
Testing in Chrome 47, Mac OS 10.11.
How to completely kill the WebRTC media stream?
MediaStream.stop()
is not working anymore.
Testing in Chrome 47, Mac OS 10.11.
Use stream.getTracks().forEach(track => track.stop());
.
stream.stop()
was deprecated.
For all browsers
if (microphone_data.media_stream) {
microphone_data.media_stream.getTracks().forEach(function (track) { track.stop(); });
}