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
The
stream:addedevent for a call can be emitted more than once for a given stream in the following situation:In,
calls.start:streamscontains the results ofpc.getRemoteStreams()- which includes a given stream.onstreamaddedevents are registeredonstreamaddedevent gets fired for the stream that is currently inpc.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 astream:addedeventreceiveRemoteStreamfunction gets called for each stream instreams. Results in a secondstream:added