WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software...

25
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

Transcript of WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software...

Page 1: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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

Page 2: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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

Page 3: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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]

Page 4: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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”)

Page 5: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

Keep them forthe moment.

build a nation.think big.

the web will win

Pythia, the natives refuse to work out

of their area, refuseto learn greek.

What should I do?

Page 6: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

Browsers support

Page 7: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,
Page 8: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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

Page 9: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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

Page 10: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

Insights: MediaStream [1]

Page 11: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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 [2]

Page 12: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

Insights: MediaStream [3]

Page 13: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

Insights: MediaStream [4]As easy as...

Page 14: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

Insights: Protocols

Page 15: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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)

Insights: RTCPeerConnection

Page 16: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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...

APIs

Page 17: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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 webRTC1. click-to-call

Page 18: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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 webRTC2. video matters

Page 19: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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%)

Applications of webRTC3. peer-to-peer

Page 20: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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/

Example apps

Page 21: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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?!

Page 22: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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

Page 23: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

Cons

IE / Apple

Still not on a mature technology (bleeding edge)

Isn't programmed using php

Page 24: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

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

Page 25: WebRTC Andreas Trantidis Lead Developer e-labs.gr / Full Stack Web Developer MSc Software Engineering and Telecommunications Likes: javascript, Python,

Thank you!