simple-peer
simple-peer copied to clipboard
addStream does not run if it is used inside a setTimeout
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.
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?