WebRTC - scalable live stream broadcasting / multicasting

前端 未结 12 728
别跟我提以往
别跟我提以往 2020-11-30 16:47

PROBLEM:

WebRTC gives us peer-to-peer video/audio connections. It is perfect for p2p calls, hangouts. But what about broadcasting (one-to-many, for

12条回答
  •  清歌不尽
    2020-11-30 17:15

    I am working on a Relay version of WebRTC but I am not sure if it will work. My test is just for one user Johnny and see if that stream can be relayed to other users.

    1. We have two browser windows open. The first is user Johnny, the 2nd is special user Relay
    2. In the display you will have a local and a remote video element for testing.
    3. When start browsing the connected users to the Hub are automatically displayed in the browser window.
    4. Click in the first window on user Relay and that user will show up in the remote video element of the first browser window and Johnny will show in the remote window of the second browser window.
    5. Now comes the big trick all other users that want to connect to Johnny will have to connect to the remote window of the special user relay. This example is with one user but the relay window could have more windows (RTCPeerConnections) for more users to connect.
    6. The relay browser window will be the server to other users. All users connect to the relay browser window. RTCPeerConnections will be created for each connected user.

    In my example I visualize it with elements but in the relay browser window RTCPeerConnections should be enough.

    Is this Idea logic or am I missing something?

提交回复
热议问题