5

I'm new to WebRTC, actually just heard about it a few days ago and I've read a lot about it. However, I still have a few questions.

What do I need to explore the usage of WebRTC? E.g.: do I need a server, any libraries etc.? I'm aware that new version of Chrome and Firefox support WebRTC, but besides these two browsers, is there anything else that is necessary?

What is the main purpose of WebRTC when addressing practical usage? To video chat? Audio chat? What about text-chatting?

Does WebRTC need a server for any kind of browser-to-browser interaction? I've seen some libraries, such as PeerJS that don't explicitly mention any kind of server... so is it possible to connect two clients directly? There's also a PeerServer, which supposedly helps broker connections between PeerJS clients. Can I use WebRTC without such a server?

What are the most commonly used libraries for WebRTC?

What's a good starting point for someone who's totally new in WebRTC? I'd like to setup a basic google-talk kind of service, to chat with one person.

Thank you so much guys.

None None
  • 537
  • 2
  • 8
  • 15
  • See also: http://stackoverflow.com/q/12739185/201952 – josh3736 Nov 21 '13 at 21:00
  • You should look at http://www.webrtc.org/ . No special sever is needed as such and you can use native support of the browser but some wrapper would be needed to make it work across browser implementations – avrono Nov 21 '13 at 21:00
  • 1
    ["In the real world, WebRTC needs servers"](http://www.html5rocks.com/en/tutorials/webrtc/basics/#toc-real) – Jason Nichols Nov 21 '13 at 21:11
  • Thank you everyone for your answers. However: "but some wrapper would be needed to make it work across browser implementations" what kind of wrappers are we talking about here? – None None Nov 21 '13 at 21:19
  • there are good tutorials on practical uses of webRTC on youtube by New Circle Training (formerly Marakana tech tv). i highly recommend that –  Nov 22 '13 at 17:32

2 Answers2

3

You can find many docs here E.g. this one, this one and this one!

You can find a few libraries here.

A simple multi-user WebRTC app needs following things:

  1. Signalling server to exchange sdp/ice/etc. ---- e.g. socket.io/websockets/xmpp/sip/XHR/etc.
  2. ICE server i.e. STUN and/or TURN; to make sure Firewalls doesn't block UDP/TCP ports
  3. JavaScript app to access/invoke RTCWeb JavaScript API i.e. RTCPeerConnection.

It just takes a few minutes to setup WebRTC peer-to-peer connection. You can setup peer-to-server connections as well where media-servers can be used to transcode/record/merge streams; or to relay to PSTN networks.

WebRTC DataChannels can be used for gaming, webpage synchronizing; fetching static contents, peer-to-peer or peer-to-server data transmission, etc.

Muaz Khan
  • 7,138
  • 9
  • 41
  • 77
2

What do I need to explore the usage of WebRTC? E.g.: do I need a server, any libraries etc.? I'm aware that new version of Chrome and Firefox support WebRTC, but besides these two browsers, is there anything else that is necessary?

WebRTC it is JavaScript API for web developers which can be used for audio and video streaming.

But there are 2 notices:

  1. You need a signaling path. For example, if your first user is Alice using Firefox and second user is Bob using Chrome, they should negotiate used codecs and streams. WebRTC does not offer the signalling implementation. So you need to implement the signaling yourself. It is quite simple. You need to send SDP(stream config) to participant and receive an SDP answer. You can use plain HTTP via apahe server or use Websockets or any other transport to negotiate SDP. So, it seems you need an intermediary signaling server workning with websockets or HTTP/HTTPS.

  2. Once you negotiated the streams you are sending your audio or video stream, but the distanation user might have a simmetric NAT. It means that you stream will not be delivered to the target user. In such situation you need a TURN server to traverse the NAT.

Finally you will need 2 server-side logic items: 1) Signaling server 2) TURN or proxy server

To start, take a look Web Call Server. The server implements HTML5 Websocket signaling and SRTP proxying as a TURN server. You can also learn the webrtc application open source code.

First steps: 1. Download the signaling and streaming server. 2. Download and unzip web client. 3. Start the web client and debug javascript code to learn more how webrtc works.

Nick
  • 587
  • 1
  • 5
  • 9