Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebRTC - help me understand a few concepts

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.

like image 685
None None Avatar asked Nov 21 '13 20:11

None None


1 Answers

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.

like image 159
Muaz Khan Avatar answered Oct 11 '22 18:10

Muaz Khan