SlideShare a Scribd company logo
1 of 27
WebRTC
FUTURE OF THE WEB
@folio_3 www.folio3.com Copyright 2015
WebRTC
 Web Real-Time Communication
 free
 open-source
 high quality
 Real Time Communications
 right in the browser.
@folio_3 www.folio3.com Copyright 2015
No plugins...!!!
 Support browser-to-browser applications for:
 voice calling
 video chat
 and P2P file sharing
without the need of either internal or external plugins.
@folio_3 www.folio3.com Copyright 2015
Yes, you got it right..!!!
 Simple JavaScript APIs and HTML5
 No downloads required
 No installing and updating plugins of any sort.
@folio_3 www.folio3.com Copyright 2015
So, what's the big idea?
 Flash Player is like patching an incomplete system.
 With WebRTC there is no external dependency beyond the basic
web browser.
 You know HTML and Javascript, right?
 What about Actionscript/MXML???
@folio_3 www.folio3.com Copyright 2015
Browser Support
Desktop: 17+
Mobile: 29+
Desktop: 18+
Mobile: 20+
Desktop: 18+
Mobile: 24+
@folio_3 www.folio3.com Copyright 2015
Quality
 WebRTC - High quality video codec
 Flash Player - Outdated Sorenson codec
(which is difficult to interoperate with non-Flash products)
@folio_3 Copyright 2015www.folio3.com
But lets face it...
 Many users are reluctant to change/update their browser (IE,
Safari,...)
 Flash Player has shown more ubiquitous availability on user's
desktops and laptops than any specific web browser.
@folio_3 www.folio3.com Copyright 2015
Cross-compatibility
 In the past, incompatibility in HTML among browsers has been a
nightmare for web developers
(remember IE6...? Dark ages...? anyone...?)
 Solution:
adapter.js
or similar shims
@folio_3 www.folio3.com Copyright 2015
The main problem with Flash?!!?!
 It's PROPRIETARY..!!!
(the protocol for end-to-end media path is proprietary so interoperating with existing
VoIP gears is inefficient without buying server pieces from the plugin vendor.)
@folio_3 www.folio3.com Copyright 2015
So What it takes for a browser to
support WebRTC?
 Lets look at some boring jargons...
 Media Engine
The technology that manages microphones, cameras, and
speakers and gets audio and video onto and off the internet.
 Transport layer
(ISO-OSI) which is relatively simple, but hard to tweak for real-time
communications
 CODECs
Audio/Video encoders and decoders (something that is usually
acquired from third parties)
@folio_3 www.folio3.com Copyright 2015
@folio_3 www.folio3.com Copyright 2015
How about the network?
 NAT
an Internet standard that enables a local-area network (LAN) to use one set of IP
addresses for internal traffic and a second set of addresses for external traffic.
 STUN
(Session Traversal Utilities for NAT) is a standardized set of methods and a network
protocol that allows an end host to discover its public IP address if it is located behind
a NAT.
 TURN
Traversal Using Relays around NAT (TURN) is a protocol that allows a client behind a
network address translator (NAT) or firewall to receive incoming data over TCP or UDP
connections.
@folio_3 www.folio3.com Copyright 2015
 ICE
Interactive Connectivity Establishment (ICE) is a technique used in computer
networking involving network address translators (NATs) in Internet applications of
Voice over Internet Protocol (VoIP), peer-to-peer communications, video, instant
messaging and other interactive media. [Wikipedia]
 Stream
An abstraction referring to any flow of data from a source (or sender, producer) to a
single sink (or receiver, consumer). A stream usually flows through a channel of some
kind.
 SDP
The Session Description Protocol (SDP) is a format for describing streaming media
initialization parameters.
SDP does not deliver media itself but is used for negotiation
between end points of media type, format, and all associated
properties.
@folio_3 www.folio3.com Copyright 2015
How all of this fits together?
@folio_3 www.folio3.com Copyright 2015
Ready...steady...RT.........
peerConnection = new mozRTCPeerConnection();
peerConnection.onaddstream = pconaddstream;
navigator.mozGetUserMedia({video: true, audio: true}, mediaSuccess,
mediaFailure);
@folio_3 www.folio3.com Copyright 2015
function mediaSuccess(media) {
localVideo = document.querySelector('#vidLocalVideo');
//Add stream obtained to <video> to start media flow.
localVideo.mozSrcObject = media;
localVideo.play();
peerConnection.addStream(media);
if (userType === "caller") {
peerConnection.createOffer(createLocalDesc, callFailed);
}
else {
peerConnection.createAnswer(createLocalDesc, callFailed);
}
}
@folio_3 www.folio3.com Copyright 2015
function createLocalDesc(sessionObj) {
peerConnection.setLocalDescription(sessionObj, doNothing,
callFailed);
sessionJson = JSON.stringify(sessionObj);
if (userType === "caller") {
sendOfferToServer(sessionJson);
}
else {
sendAnswerToServer(sessionJson);
}
}
@folio_3 www.folio3.com Copyright 2015
function setRemoteDesc(connectionString) {
var connectionObj = JSON.parse(connectionString);
var sessionObj = new mozRTCSessionDescription();
sessionObj.type = connectionObj.type;
sessionObj.sdp = connectionObj.sdp;
peerConnection.setRemoteDescription(sessionObj, doNothing,
callFailed);
}
@folio_3 www.folio3.com Copyright 2015
function pconaddstream(obj) {
pcvideo = document.querySelector('#vidRemoteVideo');
pcvideo.mozSrcObject = obj.stream;
pcvideo.play();
}
var pconicecandidate = function (iceEvent) {
if (iceEvent.candidate) {
var candidate = new mozRTCIceCandidate({
sdpMLineIndex: userType,
candidate: iceEvent.candidate.candidate
});
peerConnection.addIceCandidate(candidate);
}
else {
console.log(iceEvent);
}
}
@folio_3 www.folio3.com Copyright 2015
WebRTC beyond peer-to-peer
 3 types of architectures:
 Mesh
 Mixing
 Routing
@folio_3 www.folio3.com Copyright 2015
Mesh
 Powerful clients
 High network bandwidth
 Best quality
 Minimal Latency
@folio_3 www.folio3.com Copyright 2015
Mixing
 MCU (Multipoint Conferencing Unit)
 Powerful server
 Compromised Quality
 High Latency
@folio_3 www.folio3.com Copyright 2015
Routing
 SFU (Selective Forwarding Unit)
 Compression on clients
 Scalable
 Low Latency
@folio_3 www.folio3.com Copyright 2015
Is it all upon me???
Muaz Khan
on GitHub
@folio_3 www.folio3.com Copyright 2015
PetZam
 PetZam uses WebRTC
 using TokBox API
 peer-to-peer video calling
 for pet care
@folio_3 www.folio3.com Copyright 2015
Future
 Support on Safari and IE
 Unified standard API
 Lots of fun and interactivity
(screen sharing, video conferences, team collaboration, distance
learning, online gaming, real-time dashboards, ... ... ... ... ...)
www.folio3.com Copyright 2015@folio_3

More Related Content

More from Folio3 Software

A Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer TestingA Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer TestingFolio3 Software
 
OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)Folio3 Software
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)Folio3 Software
 
Introduction to SharePoint 2013
Introduction to SharePoint 2013Introduction to SharePoint 2013
Introduction to SharePoint 2013Folio3 Software
 
An Overview of Blackberry 10
An Overview of Blackberry 10An Overview of Blackberry 10
An Overview of Blackberry 10Folio3 Software
 
StackOverflow Architectural Overview
StackOverflow Architectural OverviewStackOverflow Architectural Overview
StackOverflow Architectural OverviewFolio3 Software
 
Enterprise Mobility - An Introduction
Enterprise Mobility - An IntroductionEnterprise Mobility - An Introduction
Enterprise Mobility - An IntroductionFolio3 Software
 
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...Folio3 Software
 
Introduction to Enterprise Service Bus
Introduction to Enterprise Service BusIntroduction to Enterprise Service Bus
Introduction to Enterprise Service BusFolio3 Software
 
NOSQL Database: Apache Cassandra
NOSQL Database: Apache CassandraNOSQL Database: Apache Cassandra
NOSQL Database: Apache CassandraFolio3 Software
 
Regular Expression in Action
Regular Expression in ActionRegular Expression in Action
Regular Expression in ActionFolio3 Software
 
HTTP Server Push Techniques
HTTP Server Push TechniquesHTTP Server Push Techniques
HTTP Server Push TechniquesFolio3 Software
 
Best Practices of Software Development
Best Practices of Software DevelopmentBest Practices of Software Development
Best Practices of Software DevelopmentFolio3 Software
 
Offline Data Access in Enterprise Mobility
Offline Data Access in Enterprise MobilityOffline Data Access in Enterprise Mobility
Offline Data Access in Enterprise MobilityFolio3 Software
 
Realtime and Synchronous Applications
Realtime and Synchronous ApplicationsRealtime and Synchronous Applications
Realtime and Synchronous ApplicationsFolio3 Software
 
Web Performance & Scalability Tools
Web Performance & Scalability ToolsWeb Performance & Scalability Tools
Web Performance & Scalability ToolsFolio3 Software
 
Andriod - Technical Review
Andriod - Technical ReviewAndriod - Technical Review
Andriod - Technical ReviewFolio3 Software
 
Web Application Security - Folio3
Web Application Security - Folio3Web Application Security - Folio3
Web Application Security - Folio3Folio3 Software
 

More from Folio3 Software (20)

A Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer TestingA Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer Testing
 
OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)
 
Introduction to Go-Lang
Introduction to Go-LangIntroduction to Go-Lang
Introduction to Go-Lang
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)
 
Introduction to SharePoint 2013
Introduction to SharePoint 2013Introduction to SharePoint 2013
Introduction to SharePoint 2013
 
An Overview of Blackberry 10
An Overview of Blackberry 10An Overview of Blackberry 10
An Overview of Blackberry 10
 
StackOverflow Architectural Overview
StackOverflow Architectural OverviewStackOverflow Architectural Overview
StackOverflow Architectural Overview
 
Enterprise Mobility - An Introduction
Enterprise Mobility - An IntroductionEnterprise Mobility - An Introduction
Enterprise Mobility - An Introduction
 
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Introduction to Enterprise Service Bus
Introduction to Enterprise Service BusIntroduction to Enterprise Service Bus
Introduction to Enterprise Service Bus
 
NOSQL Database: Apache Cassandra
NOSQL Database: Apache CassandraNOSQL Database: Apache Cassandra
NOSQL Database: Apache Cassandra
 
Regular Expression in Action
Regular Expression in ActionRegular Expression in Action
Regular Expression in Action
 
HTTP Server Push Techniques
HTTP Server Push TechniquesHTTP Server Push Techniques
HTTP Server Push Techniques
 
Best Practices of Software Development
Best Practices of Software DevelopmentBest Practices of Software Development
Best Practices of Software Development
 
Offline Data Access in Enterprise Mobility
Offline Data Access in Enterprise MobilityOffline Data Access in Enterprise Mobility
Offline Data Access in Enterprise Mobility
 
Realtime and Synchronous Applications
Realtime and Synchronous ApplicationsRealtime and Synchronous Applications
Realtime and Synchronous Applications
 
Web Performance & Scalability Tools
Web Performance & Scalability ToolsWeb Performance & Scalability Tools
Web Performance & Scalability Tools
 
Andriod - Technical Review
Andriod - Technical ReviewAndriod - Technical Review
Andriod - Technical Review
 
Web Application Security - Folio3
Web Application Security - Folio3Web Application Security - Folio3
Web Application Security - Folio3
 

Recently uploaded

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Recently uploaded (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

AG Tech Presentation WebRTC

  • 1. WebRTC FUTURE OF THE WEB @folio_3 www.folio3.com Copyright 2015
  • 2. WebRTC  Web Real-Time Communication  free  open-source  high quality  Real Time Communications  right in the browser. @folio_3 www.folio3.com Copyright 2015
  • 3. No plugins...!!!  Support browser-to-browser applications for:  voice calling  video chat  and P2P file sharing without the need of either internal or external plugins. @folio_3 www.folio3.com Copyright 2015
  • 4. Yes, you got it right..!!!  Simple JavaScript APIs and HTML5  No downloads required  No installing and updating plugins of any sort. @folio_3 www.folio3.com Copyright 2015
  • 5. So, what's the big idea?  Flash Player is like patching an incomplete system.  With WebRTC there is no external dependency beyond the basic web browser.  You know HTML and Javascript, right?  What about Actionscript/MXML??? @folio_3 www.folio3.com Copyright 2015
  • 6. Browser Support Desktop: 17+ Mobile: 29+ Desktop: 18+ Mobile: 20+ Desktop: 18+ Mobile: 24+ @folio_3 www.folio3.com Copyright 2015
  • 7. Quality  WebRTC - High quality video codec  Flash Player - Outdated Sorenson codec (which is difficult to interoperate with non-Flash products) @folio_3 Copyright 2015www.folio3.com
  • 8. But lets face it...  Many users are reluctant to change/update their browser (IE, Safari,...)  Flash Player has shown more ubiquitous availability on user's desktops and laptops than any specific web browser. @folio_3 www.folio3.com Copyright 2015
  • 9. Cross-compatibility  In the past, incompatibility in HTML among browsers has been a nightmare for web developers (remember IE6...? Dark ages...? anyone...?)  Solution: adapter.js or similar shims @folio_3 www.folio3.com Copyright 2015
  • 10. The main problem with Flash?!!?!  It's PROPRIETARY..!!! (the protocol for end-to-end media path is proprietary so interoperating with existing VoIP gears is inefficient without buying server pieces from the plugin vendor.) @folio_3 www.folio3.com Copyright 2015
  • 11. So What it takes for a browser to support WebRTC?  Lets look at some boring jargons...  Media Engine The technology that manages microphones, cameras, and speakers and gets audio and video onto and off the internet.  Transport layer (ISO-OSI) which is relatively simple, but hard to tweak for real-time communications  CODECs Audio/Video encoders and decoders (something that is usually acquired from third parties) @folio_3 www.folio3.com Copyright 2015
  • 13. How about the network?  NAT an Internet standard that enables a local-area network (LAN) to use one set of IP addresses for internal traffic and a second set of addresses for external traffic.  STUN (Session Traversal Utilities for NAT) is a standardized set of methods and a network protocol that allows an end host to discover its public IP address if it is located behind a NAT.  TURN Traversal Using Relays around NAT (TURN) is a protocol that allows a client behind a network address translator (NAT) or firewall to receive incoming data over TCP or UDP connections. @folio_3 www.folio3.com Copyright 2015
  • 14.  ICE Interactive Connectivity Establishment (ICE) is a technique used in computer networking involving network address translators (NATs) in Internet applications of Voice over Internet Protocol (VoIP), peer-to-peer communications, video, instant messaging and other interactive media. [Wikipedia]  Stream An abstraction referring to any flow of data from a source (or sender, producer) to a single sink (or receiver, consumer). A stream usually flows through a channel of some kind.  SDP The Session Description Protocol (SDP) is a format for describing streaming media initialization parameters. SDP does not deliver media itself but is used for negotiation between end points of media type, format, and all associated properties. @folio_3 www.folio3.com Copyright 2015
  • 15. How all of this fits together? @folio_3 www.folio3.com Copyright 2015
  • 16. Ready...steady...RT......... peerConnection = new mozRTCPeerConnection(); peerConnection.onaddstream = pconaddstream; navigator.mozGetUserMedia({video: true, audio: true}, mediaSuccess, mediaFailure); @folio_3 www.folio3.com Copyright 2015
  • 17. function mediaSuccess(media) { localVideo = document.querySelector('#vidLocalVideo'); //Add stream obtained to <video> to start media flow. localVideo.mozSrcObject = media; localVideo.play(); peerConnection.addStream(media); if (userType === "caller") { peerConnection.createOffer(createLocalDesc, callFailed); } else { peerConnection.createAnswer(createLocalDesc, callFailed); } } @folio_3 www.folio3.com Copyright 2015
  • 18. function createLocalDesc(sessionObj) { peerConnection.setLocalDescription(sessionObj, doNothing, callFailed); sessionJson = JSON.stringify(sessionObj); if (userType === "caller") { sendOfferToServer(sessionJson); } else { sendAnswerToServer(sessionJson); } } @folio_3 www.folio3.com Copyright 2015
  • 19. function setRemoteDesc(connectionString) { var connectionObj = JSON.parse(connectionString); var sessionObj = new mozRTCSessionDescription(); sessionObj.type = connectionObj.type; sessionObj.sdp = connectionObj.sdp; peerConnection.setRemoteDescription(sessionObj, doNothing, callFailed); } @folio_3 www.folio3.com Copyright 2015
  • 20. function pconaddstream(obj) { pcvideo = document.querySelector('#vidRemoteVideo'); pcvideo.mozSrcObject = obj.stream; pcvideo.play(); } var pconicecandidate = function (iceEvent) { if (iceEvent.candidate) { var candidate = new mozRTCIceCandidate({ sdpMLineIndex: userType, candidate: iceEvent.candidate.candidate }); peerConnection.addIceCandidate(candidate); } else { console.log(iceEvent); } } @folio_3 www.folio3.com Copyright 2015
  • 21. WebRTC beyond peer-to-peer  3 types of architectures:  Mesh  Mixing  Routing @folio_3 www.folio3.com Copyright 2015
  • 22. Mesh  Powerful clients  High network bandwidth  Best quality  Minimal Latency @folio_3 www.folio3.com Copyright 2015
  • 23. Mixing  MCU (Multipoint Conferencing Unit)  Powerful server  Compromised Quality  High Latency @folio_3 www.folio3.com Copyright 2015
  • 24. Routing  SFU (Selective Forwarding Unit)  Compression on clients  Scalable  Low Latency @folio_3 www.folio3.com Copyright 2015
  • 25. Is it all upon me??? Muaz Khan on GitHub @folio_3 www.folio3.com Copyright 2015
  • 26. PetZam  PetZam uses WebRTC  using TokBox API  peer-to-peer video calling  for pet care @folio_3 www.folio3.com Copyright 2015
  • 27. Future  Support on Safari and IE  Unified standard API  Lots of fun and interactivity (screen sharing, video conferences, team collaboration, distance learning, online gaming, real-time dashboards, ... ... ... ... ...) www.folio3.com Copyright 2015@folio_3