Tristan F.-R.
Tristan F.-R.

Reputation: 4204

How can I have a server stream a video with WebRTC?

My current use case is that I'm trying to mock a system that uses WebRTC for live video streaming (for a robot). This way, I don't have to be connected to the robot to develop the client.

My issue as of now is that I have no idea how to stream a video using WebRTC to connected peers. I've seen many examples of how to do this from client to client using a signaling server, but other than directly sending the video buffer using socket.io, I haven't seen an example of server -> client WebRTC streaming.

I'm planning to use Node.JS for mocking the video stream as I've been using it for the rest of the robot's systems.

Upvotes: 2

Views: 1467

Answers (1)

Nikulsinh Sodha
Nikulsinh Sodha

Reputation: 411

It really isn't that different though client to client or server to client. You want to stream/broadcast a video to all the connected peers. Think of your server will be a client in the setup.

You can also use a WebRTC solution like Janus Repo it is a simple gateway and completely open source. Refer to - WebRTC & Dev API's for more info.

If you find latency issues after peers have increased in number you can check - Mesh, Routing, Multi peer architecture for some solutions for it.

Hope it helps.

Upvotes: 1

Related Questions