Open baptisteArno opened 4 years ago
You do have the MediaStream
object sent once. The MediaStream
however contains two tracks of type MediaStreamTrack
. An audio and a video track
Because we fire on('stream')
when peerConnection.ontrack
called, so it called twice per one MediaStream with two tracks.
https://github.com/peers/peerjs/blob/master/lib/negotiator.ts#L145-L154
on("stream") event currently receives 2
MediaStream
objects from a unique peer. Both of these streams contain the audio and video tracks. We should only receive theMediaStream
once.