simplewebrtc / SimpleWebRTC

Simplest WebRTC ever
Other
4.65k stars 1.19k forks source link

implementing star topology in simplewebrtc? #345

Open panther321 opened 8 years ago

panther321 commented 8 years ago

I am building a system, in which the host is responsible for broadcasting it's stream to 3-4 peers. and when new peers join, they will get the stream, from those 3-4 peers, not from the host itself. This will go on for new peers.

Similarly, I would like to implement the same topology for dataChannels. the host will transfer a file to some peers, and new peers will get the file from those peers, not from the host.

Is it possible to implement this topology, with the abstraction level of this library? or should I stick to the original WebRTC API?

fippo commented 8 years ago

while that sounds quite specialized, most of the abstractions in this library should still be helpful. You will have to modify https://github.com/andyet/SimpleWebRTC/blob/master/simplewebrtc.js#L82-L116 to change who is connecting to whom though.