The stream:added event for a call can be emitted more than once for a given stream in the following situation:
In, calls.start:
streams contains the results of pc.getRemoteStreams() - which includes a given stream.
- The
onstreamadded events are registered
- The
onstreamadded event gets fired for the stream that is currently in pc.getRemoteStreams() (unsure as to why, given it probably shouldn't - but this behaviour only exhibits itself on Firefox, so perhaps no more needs to be said). Emits a stream:added event
- The
receiveRemoteStream function gets called for each stream in streams. Results in a second stream:added