|
|
|
|
|
by hootener
4081 days ago
|
|
I think you've hit the nail on the head, here. WebRTC is really great for a handful of people. Implementation using some third party was never the difficult part, but scale was and is still a total nightmare. I'd love to see WebRTC done by a service provider in a highly scalable way, so I can stop relying on RTMP (and typically embedding a flash player to support it) to deliver live streaming audio/video on a large scale. As someone who has only leveraged WebRTC through third party providers (e.g., OpenTOK, etc.), I have no idea the complexity of what I'm asking for. Perhaps it's boil the ocean difficult, but it sure would be nice to have! |
|
Here was my basic approach:
An end user creates a PeerConnection with a Publisher node and starts sending a MediaStream using a string identifier.
Then another user can create a PeerConnection with a Subscriber node using the same identifier.
The Subscriber node then makes a request to the Publisher to make another PeerConnection to a Registry that exists on the same node as the Subscriber.
The replicated MediaStream can then be attached to the Subscriber.
Since the replicated MediaStream is in a Registry, any additional subscribers can attach the MediaStream on the same node as well.
The code is a huge mess but it is here (The scala server is in the media directory): https://github.com/jgrowl/livehq
There is a vagrant file that brings up the whole system at the root of the project (using docker). I have not tested it recently on anything other than ubuntu.