5

Are there currently solutions where your server can act as the peer of a WebRTC connection?

The reason I am interested in WebRTC is not the peer-to-peer part of it, but because it enables you to use UDP. You could let players participate in a fast-paced game like Quake without needing any plugins.

It seems that essentially this same question was asked before, but surely things must now be quite different as 2 years have passed.

Community
  • 1
  • 1
Bemmu
  • 17,849
  • 16
  • 76
  • 93
  • Interest Q, Look at emscripten tests project in latest version 3.40. Look at cube2 or bananaBread project. Looks like under construction yet but this feature will come soon. – Nikola Lukic Jul 29 '19 at 17:51

3 Answers3

4

Yes, it is possible to deploy your WebRTC peer code on server. But since you need to run it on server, it's essentially different from how you run the WebRTC code within the browser - i.e. through a Java Script.

For server based WebRTC peer, you would need to use the WebRTC native code available on platforms - Windows, Mac OS X, Linux, Android and iOS. You can get the WebRTC native code from - https://webrtc.org/native-code/development/

Follow the instructions here to download and build the environment. Sample applications are also present in the repository at the locations - src/webrtc/examples and src/talk/examples

In summary you have use the WebRTC source code that is embedded in the browser in your application code and call the relevant methods / API for the WebRTC functionality.

3

I have answered similar question at: WebRTC Data Channel server to clients UDP communication. Is it currently possible?

We have implemented the exact same thing: a server/client way of using WebRTC. Besides we also implemented data port multiplexing, so that server would only need to expose one data port for all rtcdata channels.

Miao ZhiCheng
  • 617
  • 7
  • 9
2

Here is 2018 update for you: your off-the-shelf solutions are: Red 5 Pro, Wowza, Kurento, Unreal Media Server, Flashphoner

Also note that in modern public networks TCP is not much slower than UDP; but UDP may have a considerable packet loss, so try WebRTC-TCP for your Quake idea.

user1390208
  • 1,866
  • 20
  • 20