Open yarekc opened 7 years ago
Yes it can. Seems, however, that you need to pass a single stream to the swarm when creating it. From what I understand - this stream will then be used for all peers. This doesn't give you the best control of who sees your data, etc.
When a new peer is connected, you can pick up their stream and show it on your web page.
See also other issues on this project - and this thread on adding streams to connections after they are added: https://github.com/feross/simple-peer/issues/50
WebRTC spec requires that you initiate a peer with getUserMedia stream at the time the peer is created. If you create a peer with only a dataChannel, you cannot upgrade it. You must create another peer instance on both ends!
I wonder if this project is uitable as SFU server for webrtc audio/video chats ?