If I open two separate local WebRTC video streams in Chrome 55, and I stop and start the second stream three times, the first stream is interrupted (and there are no more streams after this point).
https://jsfiddle.net/kqjmt7a0/1/
For easy playback, run the fiddle above in Chrome 55 and click "Restart vid2" three times. The third time you click on it, you will notice that:
- The first video frame (which is not touched by a click!) Freezes
- Second video frame no longer plays
- There are no errors (getUserMedia () returns a new local thread that looks great, except that it does not work)
In particular, this is a call to MediaStreamTrack :: stop (), which messed up Chrome (in the end). Commenting on the following issues, follow these steps:
var tracks = stream.getTracks(); for(var i = 0; i < tracks.length; ++i) { tracks[i].stop(); }
Is there something I'm doing wrong here or is it just a Chrome bug?
Notes:
- It just works fine in Chrome
- This works great in Firefox.
- Re-editing in Chrome 55.0.2883.87 (for both Mac and Windows)
Update:
After that, I'm more sure that this is just a Chrome bug. I entered the following:
https://bugs.chromium.org/p/chromium/issues/detail?id=674965
I still appreciate the feedback that something is wrong with my code, which can tickle the error.
source share