Intro to WebRTC
@thanpolas
Who is Thanasis
Professional
Community
Open Source
- Today CTO at Alacrity
- Startup CTO pos...
- Many of them on WebRTC startups
- Over 40 NPM packages
- Contributor to major Node.js packages
- Avid OSS author
- Local Node.js Meetup organizer (Greece)
- skgtech.io founder
- DEVit Conference organizer
- Software Engineer, CTO, founder
- Recently moved to London from Greece
Today's Menu
- Brief Intro to WebRTC
- How to build a WebRTC App
- Service Solutions
What is WebRTC?
- Provides browsers with Real Time Communication
- Free & Open Source
- Supported by all modern browsers*
- Feb 2014, first cross-browser connection
WebRTC Features
- Real Time Voice and Video communication
- Peer to Peer Communication
- State of the art Codecs (VP8)
What is WebRTC
WebRTC Adoption
- Thousands of verticals in health, legal, services
- Sobered after 1st wave of startups
- Safari support opens up new opportunities
What is WebRTC
WebRTC, The Good Parts
- Made Real Time Communication ubiquitous
- Provides free & open-source APIs
- Lowered the bar to entry
What is WebRTC
WebRTC, The Ugly Parts
- Cheap start, expensive end game
- Costly development
- Connectivity problems
What is WebRTC
How WebRTC Works
- WebRTC APIs
- Handshake of a WebRTC call
- Services needed for WebRTC
We'll see the following:
WebRTC APIs
- getUserMedia acquires audio / video
- RTCPeerConnection audio / video communication
- RTCDataChannel Data communication
How WebRTC Works
- getStats Statistics
Handshake of a WebRTC call
How WebRTC works
Peer 1
Peer 2
STUN Server
Signal Server
- Peer 1 asks their IP from STUN
- Peer 1 offers SDP to Signal --> Peer 2
- Peer 2 asks their IP from STUN
- Peer 2 responds with their SDP via Signal
- Peer 1 & 2 send ICE Candidates via Signal
- Winning Candidate establishes connection
Notes
* Simplified version, TURN missing
* SDP: Session Description Protocol
* ICE: Interactive Connectivity Establishment
Services Needed for WebRTC
- Signal Server: Your implementation to enable communication between peers.
- STUN Server: Session Traversal Utilities for NAT, low resource daemon.
- TURN Server: Traversal Using Relays around NAT, extreme resource server.
How WebRTC Works
Building WebRTC Apps
- Prototype using public WebRTC services
- MVP using third-party WebRTC services
- Grow using your infrastructure
The general rule of thumb 👍
Third-Party WebRTC Services
TokBox https://tokbox.com/
One stop shop service, oldest in the market.
Xirsys https://xirsys.com/
A la carte WebRTC services, as old as TokBox.
Also: Vidyo, Twillio WebRTC
The rest: https://www.callstats.io/2017/10/17/sdk-comparison/
Building WebRTC Apps
WebRTC in summary
- Revolutionizing Technology
- Vertical & Niche applications
- Costly development
- Costly infrastructure
- Connectivity risks your service delivery
Thank you
Thank you
Questions?
Intro to WebRTC
By thanpolas
Intro to WebRTC
- 766