simple-peer icon indicating copy to clipboard operation
simple-peer copied to clipboard

addStream does not run if it is used inside a setTimeout

Open hypo-thesis opened this issue 3 years ago • 1 comments

What version of this package are you using? v9.11.0 What operating system, Node.js, and npm version? 7.8.0 What happened? peer.addStream(stream) works alright by its own but when I put it in a setTimeout it does not trigger anymore

What did you expect to happen? I expect the stream to be added to the peer at any given time.

hypo-thesis avatar Jul 17 '21 10:07 hypo-thesis

Did you get the addStream() call to even work without the setTimeout. For me it doesn't work at all. No 'stream' event is raised on the other peer when I do the call. Is there something else I have to do after the call to trigger the event?

Gruski avatar Sep 10 '21 19:09 Gruski