webRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python, Mac, Linux, coffee, beers Follows: Google, Mozilla, echo.js, SmashingMag Don’t’ llike: IE (all versions), radio recurrent playlists
Intro Web Real Time Communications Enables peer-to-peer video, audio and data sharing between browsers Released as open source project in May 2011 by Google
Some definitions “WebRTC is a free, open project that enables web browsers with Real-Time Communications (RTC) capabilities via simple JavaScript APIs”[webrtc.org] The mission of the Web Real-Time Communications Working Group, part of the Ubiquitous Web Applications Activity, is to define client-side APIs to enable Real-Time Communications in Web browsers[w3.org]
The “web” The “web” is more important than the RTC on the term “webRTC” RTC is something that already exists ... but (until now) not on the browsers Define “web” Mozilla initiated a new meaning of the term “web”. It defines as “web” the browser platform (e.g. “Web vs Native”, “web application”)
Keep them for the moment. build a nation. think big. the web will win Pythia, the natives refuse to work out of their area, refuse to learn greek. What should I do?
Browsers support
How it works Gets streaming audio, video or other data Gets network info and exchanges it with other webRTC clients in order to enable connection through NATs and firewalls Coordinate signaling communication Exchange info about media and client capabilities Communicate streaming audio, video or data
Use Case 1. The user A provides to the browser access to his/her mic and camera (user B also) 2. The User A initiates a call to User B 3. User B receives the call and accepts it 4. The video and audio from each side (peer) is transmitted to other part (through p2p connection) 5. The two Users enjoy a video call directly from their browsers
Insights: MediaStream [1]
Insights: MediaStream [2] Internal mechanisms take care of all issues like: Noise reduction / echo cancellation / image quality Encode to audio and video codecs according to the bandwidth Take care of network jitter and packet loss Synchronizes the two streams Once all of this work is done the web app receives the output
Insights: MediaStream [3]
Insights: MediaStream [4] As easy as...
Insights: Protocols
Insights: RTCPeerConnection Responsible for making the connection between peers Responsible for keeping connections alive Responsible for exchanging info about (Session Description Protocol – Microsoft claims SDP to be “very difficult for the developers to use”) Needs Interactive Connectivity Establishment servers (STUN/TURN)
APIs OpenTOK (http://tokbox.com/opentok) EasyRTC (http://easyrtc.com) Lynckia (http://lynckia.com) SIP (http://sipjs.com) SimpleWebRTC (http://simplewebrtc.com) Apidaze (http://www.apidaze.io) Many more...
Applications of webRTC 1. click-to-call E-shops Insurances / other goods and services selling websites Support (e.g. Telecommunications companies) Medical help companies Why webRTC? For the first time structured applications (like websites) can include direct calls.
Applications of webRTC 2. video matters Web conferencing (internal companies / organizations meetings, conferences, online skype alternatives) Teaching / tutoring sessions Online medical help Why webRTC? Cost efficient (p2p) User friendly / instant / no hardware, no plugins, no installations / no third party software
Applications of webRTC 3. peer-to-peer Torrent Hybrid (p2p / server) media streaming hosting (video on demand, live streaming, any other case) why webRTC? Huge savings in bandwidth and cost (up to 80%)
Example apps CallMe on FB (https://apps.facebook.com/calllme/) Audio game (http://noisee.karenlabs.com/) Fitaborate (http://www.fitaborate.com/) Peer5 (http://peer5.com/) StremRoot (http://www.streamroot.io/) Experiment: http://elabs.gr/pseudo-hologram- chrome-experiment/
Tech Wars [1] Apple doesn't support webRTC (it just ignores the technology) Microsoft released its own competing technology called “CU-RTC” How about the standards Microsoft?!
Tech Wars [2] Fact: 4.7 billion mobile webRTC devices by 2018 [ABI Research report / Sept 25 2013] (Some of the) Supporters: Google, Mozilla, AT&T, Telefonica, Cisco, Bistri, Alcatel, Ericsson
Cons IE / Apple Still not on a mature technology (bleeding edge) Isn't programmed using php
References http://www.pubnub.com/blog/what-is-webrtc/ http://www.html5rocks.com/en/tutorials/webrtc/basics/ http://chimera.labs.oreilly.com/books/1230000000545/ch18.html http://webrtc.org
Thank you!