Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebRTC Server Java implementation

I am starter in WebRTC , I want to create simple application with call, but i can not understand what is the server? Is the WebSocket enough? or I need other server?

my scenario is very simple two chrome users A and B, A call B

like image 595
javagc Avatar asked Jul 31 '14 12:07

javagc


2 Answers

It depends on your application but you probably want to use server for signaling. The browsers are after establishing session connected peer-to-peer. (it isn't going through your server)

For more detail http://www.html5rocks.com/en/tutorials/webrtc/basics/.

like image 104
jakub.petr Avatar answered Oct 18 '22 00:10

jakub.petr


Agree you will probably need a server for signaling. My company OnSIP offers a hosted solution for this, so you would not need to manage servers, but whether you decide to or not - here is an explainer vid on signaling & why you'll need it. Rather than write an explanation here, I'm just going to link it:

https://www.youtube.com/watch?v=-waKd_edBGw

Also, if you intend to run an application that reliably sets up calls 90%+ time, you'll also need media relay (TURN) servers. This is to handle NAT and firewall traversal, which can mess with P2P call setup in real life networking situations as the endpoints have private IP addresses. Media relay servers have a public IP address and literally relay the media stream. These require a lot of bandwidth to run— I don't believe any cloud hosting service will suffice. Again, my company offers this as part of a hosted solution with simple APIs. It is doable to do this all on your own.

Competitive services that handle signaling & media relay & provide developer APIs: EasyRTC & TokBox.

like image 35
HelloNicole Avatar answered Oct 17 '22 22:10

HelloNicole