SlideShare a Scribd company logo
Web rtc 핵심 기술에 대한 이해
WebRTC
Web
Real-Time
Communication
WebRTC & VOIP
WebRTC & VOIP
NOT NEW!
WebRTC Service Companies
Veckon
NOW
Web rtc 핵심 기술에 대한 이해
History On Web
P2P
WebRTC & JINGLE
Extensible Messaging and Presence Protocol
Voice Streaming
Video Streaming
File-Sharing Session
Initiate & maintain
peer to peer connection
RTP
Real-time Transport Protocol
ICE
Interactive Connectivity Establishment
SDP
Session Description Protocol
WebRTC & ORTC
WebRTC (Shim )
SIP/SDP
API Layer
WebRTC Roadmap
FPWD : First Public Working Draft
CR : Candidate Recommendations
PR : Proposed Recommenedations
Rec : Recommendations
Support
Web Browser
Mobile
29+ 24+
WebVie
w
5.x
23+ 22+ 18+ ??? Not Yet
AppRTC ???20+ AppRTC Browser
적용 버전이 다소 차이가 있을 수 있음
Support
Web rtc 핵심 기술에 대한 이해
KEYWORDs
P2P
SDP
ICE
NAT
TURN
STUN
Signaling
RTP
SCTP
DTLS
Architect
P2P
P2P
Find
(+Discovery)
Connection
(Communication)
P2P
Super Node
Super Node
Super Node
P2P
Server
Signaling
Signaling
ICE
ICE Framework (Interactive Connectivity Establishment)
A framework for connecting peers
Tries to find the best path for each call
Session description
v= (protocol version number, currently only 0)
o= (originator and session identifier : username, id, version number, network address)
s= (session name : mandatory with at least one UTF-8-encoded character)
i=* (session title or short information)
u=* (URI of description)
e=* (zero or more email address with optional name of contacts)
p=* (zero or more phone number with optional name of contacts)
c=* (connection information—not required if included in all media)
b=* (zero or more bandwidth information lines)
Time description (mandatory)
t= (time the session is active)
r=* (zero or more repeat times)
z=* (time zone adjustments)
k=* (encryption key)
a=* (zero or more session attribute lines)
Media description (if present)
m= (media name and transport address)
i=* (media title or information field)
c=* (connection information — optional if included at session level)
b=* (zero or more bandwidth information lines)
k=* (encryption key)
a=* (zero or more media attribute lines — overriding the Session attribute lines)
SDP
SDP
v=0
o=- 7614219274584779017 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS
m=audio 1 RTP/SAVPF 111 103 104 0 8 107 106 105 13 126
c=IN IP4 0.0.0.0
a=rtcp:1 IN IP4 0.0.0.0
a=ice-ufrag:W2TGCZw2NZHuwlnf
a=ice-pwd:xdQEccP40E+P0L5qTyzDgfmW
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=mid:audio
a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:9c1AHz27dZ9xPI91YNfSlI67/EMkjHHIHORiClQe
a=rtpmap:111 opus/48000/2
...
v=0
o=- 7614219274584779017 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS
m=audio 1 RTP/SAVPF 111 103 104 0 8 107 106 105 13 126
c=IN IP4 0.0.0.0
a=rtcp:1 IN IP4 0.0.0.0
a=ice-ufrag:W2TGCZw2NZHuwlnf
a=ice-pwd:xdQEccP40E+P0L5qTyzDgfmW
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=mid:audio
a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:9c1AHz27dZ9xPI91YNfSlI67/EMkjHHIHORiClQe
a=rtpmap:111 opus/48000/2
...
SDP
Session description
a=* (zero or more session attribute lines)
v=0
o=- 7614219274584779017 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS
m=audio 1 RTP/SAVPF 111 103 104 0 8 107 106 105 13 126
c=IN IP4 0.0.0.0
a=rtcp:1 IN IP4 0.0.0.0
a=ice-ufrag:W2TGCZw2NZHuwlnf
a=ice-pwd:xdQEccP40E+P0L5qTyzDgfmW
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=mid:audio
a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:9c1AHz27dZ9xPI91YNfSlI67/EMkjHHIHORiClQe
a=rtpmap:111 opus/48000/2
...
SDP
Session description
Media description (if present)
m= (media name and transport
address)
Ideal Network Environments
Real Network Environments
NAT ( Network Address Translation )
Corn NAT
Semmetric NAT
STUN (Session Traversal Utilities for NAT)
TURN (Traversal Using Relays around NAT)
UDP : User Datagram Protocol
DTLS (Datagram Transport Layer Security)
No 3-Way HandShake
Simple Header
UDP + TCP
SCTP (Stream Control Transmission Protocol)
4-Way HandShake
Stream Oriented
Stream ID
Stream Sequence Number
Multi Association
DATA 신뢰도 UP
DATA 전송속도 UP
MULTI HOMING MULTI Streaming
RTP ( Real-time Transport Protocol )
network protocol for delivering audio and video over IP networks
RTP
IP
TCP
RTP
IP
TCP
Network
RTP Security
SRTP
WebRTC Connection Sequence Diagram
Web rtc 핵심 기술에 대한 이해
WebRTC Target
VOICE
VIDEO
File Sharing
Media
Data
WebRTC APIs
Main APIs
MediaStream (aka getUserMedia)
RTCPeerConnection
RTCDataChannel
MediaStream ( getUserMedia )
var constraints = {video: true}; // {video:true, audio:true}
function successCallback(stream) {
var video = document.querySelector("video");
video.src = window.URL.createObjectURL(stream);
}
function errorCallback(error) {
console.log("navigator.getUserMedia error: ", error);
}
navigator.getUserMedia(constraints, successCallback, errorCallback);
MediaStream ( constraints )
video: {
mandatory: {
minWidth: 640,
minHeight: 360
},
optional [{
minWidth: 1280,
minHeight: 720
}]
}
Controls the contents
Media type
Resolution
Frame Rate
RTCPeerConnection
pc = new RTCPeerConnection(null);
pc.onaddstream = gotRemoteStream;
pc.addStream(localStream);
pc.createOffer(gotOffer);
function gotOffer(desc) {
pc.setLocalDescription(desc);
sendOffer(desc);
}
function gotAnswer(desc) {
pc.setRemoteDescription(desc);
}
function gotRemoteStream(e) {
attachMediaStream(remoteVideo, e.stream);
}
RTCPeerConnection ( Configuration / Optional )
var configuration = {
iceServers: [
{url: "stun:23.21.150.121"},
{url: "stun:stun.l.google.com:19302"},
{url: "turn:numb.viagenie.ca", credential: "webrtcdemo", username: "louis%40mozilla.com"}
]
}
var options = {
optional: [
{DtlsSrtpKeyAgreement: true},
{RtpDataChannels: true}
]
}
RTCDataChannel
var pc = new webkitRTCPeerConnection(servers,
{optional: [{RtpDataChannels: true}]});
pc.ondatachannel = function(event) {
receiveChannel = event.channel;
receiveChannel.onmessage = function(event){
document.querySelector("div#receive").innerHTML = event.data;
};
};
sendChannel = pc.createDataChannel("sendDataChannel", {reliable: false});
document.querySelector("button#send").onclick = function (){
var data = document.querySelector("textarea#send").value;
sendChannel.send(data);
};
ORTC APIs
RTCDtlsTransport / RTCIceTransport / RTCIceListener / RTCRtpSender / RTCRtpReceiver /
RTCRtpListener / RTCDtmfSender / RTCDataChannel / RTCSctpTransport
Singnaling Server
How to make signaling server?
WebSocket
Channel APIChannel API
Socket.IO
References
Thanks to VECKON!
And Special Thanks To WonJae Sama!
WebRTC.org
http://www.webrtc.org/
AppRTC Demo Site
https://apprtc.webrtc.org/
Interactive Connectivity Establishment (ICE)
https://tools.ietf.org/html/rfc5245
Session Description Protocol (SDP)
https://tools.ietf.org/html/rfc4566
http://en.wikipedia.org/wiki/Session_Description_Protocol
jnigle
http://xmpp.org/about-xmpp/technology-overview/jingle/
Real-time Transport Protocol (RTP)
http://xmpp.org/extensions/xep-0167.html
ORTC
http://ortc.org/wp-content/uploads/2014/04/ortc.html
Google I/O 2013 WebRTC Presentation
http://io13webrtc.appspot.com/
Best Referece Site (한글도 지원됨!)
http://www.html5rocks.com/en/search?q=WebRTC
(Thanks to )
Thanks To Wikipedia!
http://en.wikipedia.org/
Q & A

More Related Content

PDF
Webrtc 동향과 이슈 2016.08
PDF
[1C2]webrtc 개발, 현재와 미래
PDF
The future of WebRTC - Sept 2021
PDF
Getting Started with WebRTC
PPTX
The WebRTC Data Channel
PDF
Html5 for N-Screen
PDF
WebRTC
PDF
WebRTC Check-in (from WebRTC Boston 6)
Webrtc 동향과 이슈 2016.08
[1C2]webrtc 개발, 현재와 미래
The future of WebRTC - Sept 2021
Getting Started with WebRTC
The WebRTC Data Channel
Html5 for N-Screen
WebRTC
WebRTC Check-in (from WebRTC Boston 6)

What's hot (20)

PDF
Kamailio World 2017: Getting Real with WebRTC
PPT
Introduction To Webrtc
PDF
WebRTC standards update (Jul 2014)
PPTX
Introduction to WebRTC
PDF
WebRTC standards update (April 2015)
PDF
WebRTC Tutorial by Dean Bubley of Disruptive Analysis & Tim Panton of Westhaw...
PPTX
Implementation Lessons using WebRTC in Asterisk
PPTX
WebRTC
PDF
Upperside WebRTC conference - WebRTC intro
PDF
WebRTC DataChannels demystified
PDF
Webrtc world tour_2019_2nd edition_ed1_uprism_syson
PPTX
WebRTC overview
PDF
WebRTC eduCONF
PDF
Видео+Конференция 2015: Секреты WebRTC: как вендоры извлекают пользу из проры...
PDF
Baby Steps: A WebRTC Tutorial
PPTX
WebRTC presentation
PDF
WebRTC standards update - November 2014
PDF
WebRTC - On Standards, Identity and Telco Strategy
PPTX
Kurento v6 Development Guide
PDF
Building a WebRTC Communication and collaboration platform - techleash barcamp
Kamailio World 2017: Getting Real with WebRTC
Introduction To Webrtc
WebRTC standards update (Jul 2014)
Introduction to WebRTC
WebRTC standards update (April 2015)
WebRTC Tutorial by Dean Bubley of Disruptive Analysis & Tim Panton of Westhaw...
Implementation Lessons using WebRTC in Asterisk
WebRTC
Upperside WebRTC conference - WebRTC intro
WebRTC DataChannels demystified
Webrtc world tour_2019_2nd edition_ed1_uprism_syson
WebRTC overview
WebRTC eduCONF
Видео+Конференция 2015: Секреты WebRTC: как вендоры извлекают пользу из проры...
Baby Steps: A WebRTC Tutorial
WebRTC presentation
WebRTC standards update - November 2014
WebRTC - On Standards, Identity and Telco Strategy
Kurento v6 Development Guide
Building a WebRTC Communication and collaboration platform - techleash barcamp
Ad

Viewers also liked (20)

PPT
Webrt integration by altanai bisht
PDF
Introduction to WebRTC
PDF
Webrtc 허영남 20150528
PDF
Tdevelopers forum web_rtc 기술 및 api 활용
PDF
From NAT to NAT Traversal
PDF
WebRTC in 2014
PDF
2016-09-17 03 Василий Полозов. WebRTC
PPT
PPTX
AnyFirewall Engine & Server by Eyeball Networks
PPTX
MSA를 이용해 구현하는 고가용/고확장성 서비스
PPTX
마이크로서비스 아키텍처로 개발하기
DOC
Sca Jmp Profile 2011
PPS
East india 2010 - 15 - madurai - sri meenkashi temple-2
PPT
Chapter5.7
PPT
Can the web save social care for bsg
PDF
Ladies and Gentlemen Start Your Blogging
PPTX
Poch dela rosa_how to use survey monkey.ppt
PAGES
Arts webquest
PPT
How should policymakers respond to the new challenges and opportunities of ag...
PPT
Chapter5.6
Webrt integration by altanai bisht
Introduction to WebRTC
Webrtc 허영남 20150528
Tdevelopers forum web_rtc 기술 및 api 활용
From NAT to NAT Traversal
WebRTC in 2014
2016-09-17 03 Василий Полозов. WebRTC
AnyFirewall Engine & Server by Eyeball Networks
MSA를 이용해 구현하는 고가용/고확장성 서비스
마이크로서비스 아키텍처로 개발하기
Sca Jmp Profile 2011
East india 2010 - 15 - madurai - sri meenkashi temple-2
Chapter5.7
Can the web save social care for bsg
Ladies and Gentlemen Start Your Blogging
Poch dela rosa_how to use survey monkey.ppt
Arts webquest
How should policymakers respond to the new challenges and opportunities of ag...
Chapter5.6
Ad

Similar to Web rtc 핵심 기술에 대한 이해 (20)

PDF
WebRTC
PDF
Webrtc overview
PPTX
DeveloperWeek 2015 - WebRTC - Where to start and how to scale
PDF
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdf
PDF
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdf
PDF
WebRTC Overview by Dan Burnett
PDF
DevCon 5 (December 2013) - WebRTC & WebSockets
PDF
An hour with WebRTC FIC UDC
PDF
WebRTC Standards Update (October 2014)
PDF
Janus/SIP @ OpenSIPS 2019
PPTX
WebRTC Seminar Report
PDF
WebRTC on Mobile
PDF
[workshop] The Revolutionary WebRTC
PDF
WebRTC - Is it ready? 2013
PPTX
WebRTC for Managers!
PDF
WebRTC 101 - How to get started building your first WebRTC application
PDF
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
PDF
ITSPA May 2013 - WebRTC, TURN, and WebSocket
PDF
WebRTC for Telco: Informa's WebRTC Global Summit Preconference
PPTX
Html5 rtc 2
WebRTC
Webrtc overview
DeveloperWeek 2015 - WebRTC - Where to start and how to scale
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdf
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdf
WebRTC Overview by Dan Burnett
DevCon 5 (December 2013) - WebRTC & WebSockets
An hour with WebRTC FIC UDC
WebRTC Standards Update (October 2014)
Janus/SIP @ OpenSIPS 2019
WebRTC Seminar Report
WebRTC on Mobile
[workshop] The Revolutionary WebRTC
WebRTC - Is it ready? 2013
WebRTC for Managers!
WebRTC 101 - How to get started building your first WebRTC application
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
ITSPA May 2013 - WebRTC, TURN, and WebSocket
WebRTC for Telco: Informa's WebRTC Global Summit Preconference
Html5 rtc 2

Recently uploaded (20)

PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Essential Infomation Tech presentation.pptx
PDF
top salesforce developer skills in 2025.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
System and Network Administration Chapter 2
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Digital Strategies for Manufacturing Companies
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Transform Your Business with a Software ERP System
wealthsignaloriginal-com-DS-text-... (1).pdf
Operating system designcfffgfgggggggvggggggggg
Essential Infomation Tech presentation.pptx
top salesforce developer skills in 2025.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
Internet Downloader Manager (IDM) Crack 6.42 Build 41
System and Network Administration Chapter 2
Design an Analysis of Algorithms I-SECS-1021-03
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Softaken Excel to vCard Converter Software.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How to Migrate SBCGlobal Email to Yahoo Easily
Digital Strategies for Manufacturing Companies
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Understanding Forklifts - TECH EHS Solution
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Transform Your Business with a Software ERP System

Web rtc 핵심 기술에 대한 이해

  • 8. P2P WebRTC & JINGLE Extensible Messaging and Presence Protocol Voice Streaming Video Streaming File-Sharing Session Initiate & maintain peer to peer connection RTP Real-time Transport Protocol ICE Interactive Connectivity Establishment SDP Session Description Protocol
  • 9. WebRTC & ORTC WebRTC (Shim ) SIP/SDP API Layer
  • 10. WebRTC Roadmap FPWD : First Public Working Draft CR : Candidate Recommendations PR : Proposed Recommenedations Rec : Recommendations
  • 11. Support Web Browser Mobile 29+ 24+ WebVie w 5.x 23+ 22+ 18+ ??? Not Yet AppRTC ???20+ AppRTC Browser 적용 버전이 다소 차이가 있을 수 있음
  • 16. P2P
  • 22. ICE ICE Framework (Interactive Connectivity Establishment) A framework for connecting peers Tries to find the best path for each call
  • 23. Session description v= (protocol version number, currently only 0) o= (originator and session identifier : username, id, version number, network address) s= (session name : mandatory with at least one UTF-8-encoded character) i=* (session title or short information) u=* (URI of description) e=* (zero or more email address with optional name of contacts) p=* (zero or more phone number with optional name of contacts) c=* (connection information—not required if included in all media) b=* (zero or more bandwidth information lines) Time description (mandatory) t= (time the session is active) r=* (zero or more repeat times) z=* (time zone adjustments) k=* (encryption key) a=* (zero or more session attribute lines) Media description (if present) m= (media name and transport address) i=* (media title or information field) c=* (connection information — optional if included at session level) b=* (zero or more bandwidth information lines) k=* (encryption key) a=* (zero or more media attribute lines — overriding the Session attribute lines) SDP
  • 24. SDP v=0 o=- 7614219274584779017 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS m=audio 1 RTP/SAVPF 111 103 104 0 8 107 106 105 13 126 c=IN IP4 0.0.0.0 a=rtcp:1 IN IP4 0.0.0.0 a=ice-ufrag:W2TGCZw2NZHuwlnf a=ice-pwd:xdQEccP40E+P0L5qTyzDgfmW a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=mid:audio a=rtcp-mux a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:9c1AHz27dZ9xPI91YNfSlI67/EMkjHHIHORiClQe a=rtpmap:111 opus/48000/2 ...
  • 25. v=0 o=- 7614219274584779017 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS m=audio 1 RTP/SAVPF 111 103 104 0 8 107 106 105 13 126 c=IN IP4 0.0.0.0 a=rtcp:1 IN IP4 0.0.0.0 a=ice-ufrag:W2TGCZw2NZHuwlnf a=ice-pwd:xdQEccP40E+P0L5qTyzDgfmW a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=mid:audio a=rtcp-mux a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:9c1AHz27dZ9xPI91YNfSlI67/EMkjHHIHORiClQe a=rtpmap:111 opus/48000/2 ... SDP Session description a=* (zero or more session attribute lines)
  • 26. v=0 o=- 7614219274584779017 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS m=audio 1 RTP/SAVPF 111 103 104 0 8 107 106 105 13 126 c=IN IP4 0.0.0.0 a=rtcp:1 IN IP4 0.0.0.0 a=ice-ufrag:W2TGCZw2NZHuwlnf a=ice-pwd:xdQEccP40E+P0L5qTyzDgfmW a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=mid:audio a=rtcp-mux a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:9c1AHz27dZ9xPI91YNfSlI67/EMkjHHIHORiClQe a=rtpmap:111 opus/48000/2 ... SDP Session description Media description (if present) m= (media name and transport address)
  • 29. NAT ( Network Address Translation ) Corn NAT Semmetric NAT
  • 30. STUN (Session Traversal Utilities for NAT)
  • 31. TURN (Traversal Using Relays around NAT)
  • 32. UDP : User Datagram Protocol DTLS (Datagram Transport Layer Security) No 3-Way HandShake Simple Header
  • 33. UDP + TCP SCTP (Stream Control Transmission Protocol) 4-Way HandShake Stream Oriented Stream ID Stream Sequence Number Multi Association DATA 신뢰도 UP DATA 전송속도 UP MULTI HOMING MULTI Streaming
  • 34. RTP ( Real-time Transport Protocol ) network protocol for delivering audio and video over IP networks RTP IP TCP RTP IP TCP Network RTP Security SRTP
  • 38. WebRTC APIs Main APIs MediaStream (aka getUserMedia) RTCPeerConnection RTCDataChannel
  • 39. MediaStream ( getUserMedia ) var constraints = {video: true}; // {video:true, audio:true} function successCallback(stream) { var video = document.querySelector("video"); video.src = window.URL.createObjectURL(stream); } function errorCallback(error) { console.log("navigator.getUserMedia error: ", error); } navigator.getUserMedia(constraints, successCallback, errorCallback);
  • 40. MediaStream ( constraints ) video: { mandatory: { minWidth: 640, minHeight: 360 }, optional [{ minWidth: 1280, minHeight: 720 }] } Controls the contents Media type Resolution Frame Rate
  • 41. RTCPeerConnection pc = new RTCPeerConnection(null); pc.onaddstream = gotRemoteStream; pc.addStream(localStream); pc.createOffer(gotOffer); function gotOffer(desc) { pc.setLocalDescription(desc); sendOffer(desc); } function gotAnswer(desc) { pc.setRemoteDescription(desc); } function gotRemoteStream(e) { attachMediaStream(remoteVideo, e.stream); }
  • 42. RTCPeerConnection ( Configuration / Optional ) var configuration = { iceServers: [ {url: "stun:23.21.150.121"}, {url: "stun:stun.l.google.com:19302"}, {url: "turn:numb.viagenie.ca", credential: "webrtcdemo", username: "louis%40mozilla.com"} ] } var options = { optional: [ {DtlsSrtpKeyAgreement: true}, {RtpDataChannels: true} ] }
  • 43. RTCDataChannel var pc = new webkitRTCPeerConnection(servers, {optional: [{RtpDataChannels: true}]}); pc.ondatachannel = function(event) { receiveChannel = event.channel; receiveChannel.onmessage = function(event){ document.querySelector("div#receive").innerHTML = event.data; }; }; sendChannel = pc.createDataChannel("sendDataChannel", {reliable: false}); document.querySelector("button#send").onclick = function (){ var data = document.querySelector("textarea#send").value; sendChannel.send(data); };
  • 44. ORTC APIs RTCDtlsTransport / RTCIceTransport / RTCIceListener / RTCRtpSender / RTCRtpReceiver / RTCRtpListener / RTCDtmfSender / RTCDataChannel / RTCSctpTransport
  • 45. Singnaling Server How to make signaling server? WebSocket Channel APIChannel API Socket.IO
  • 46. References Thanks to VECKON! And Special Thanks To WonJae Sama! WebRTC.org http://www.webrtc.org/ AppRTC Demo Site https://apprtc.webrtc.org/ Interactive Connectivity Establishment (ICE) https://tools.ietf.org/html/rfc5245 Session Description Protocol (SDP) https://tools.ietf.org/html/rfc4566 http://en.wikipedia.org/wiki/Session_Description_Protocol jnigle http://xmpp.org/about-xmpp/technology-overview/jingle/ Real-time Transport Protocol (RTP) http://xmpp.org/extensions/xep-0167.html ORTC http://ortc.org/wp-content/uploads/2014/04/ortc.html Google I/O 2013 WebRTC Presentation http://io13webrtc.appspot.com/ Best Referece Site (한글도 지원됨!) http://www.html5rocks.com/en/search?q=WebRTC (Thanks to ) Thanks To Wikipedia! http://en.wikipedia.org/
  • 47. Q & A