Szymon Nowak
@szimek
Cowbell Labs
what is
WebRTC
?
peer-to-peer
peer-to-peer
audio
peer-to-peer
video
peer-to-peer
data
audio / video
plugin-free video calls
© Microsoft
© Amazon
data
encrypted real-time
communication
low-latency networking
file sharing
BitTorrent
feross / webtorrent
CDN augmentation
how does
WebRTC
work?
SDP Session Description Protocol
ICE Interactive Connectivity Establishment
STUN Session Traversal Utilities for NAT
TURN Traversal Using Relay NAT
RTP Real-time Transport Protocol
SCTP Stream Control Transmission Protocol
© Sony Pictures
© Sony Pictures
// Stir in the WebRTC object var webrtc = new SimpleWebRTC({ localVideoEl: 'localVideo', remoteVideosEl: 'remotesVideos', autoRequestMedia: true }); // Join when ready webrtc.on('readyToCall', function () { webrtc.joinRoom('your awesome room name'); });
// Send data webrtc.sendDirectlyToAll('data channel name', 'label', message); // Receive data webrtc.on('channelMessage', function (peer, channelName, data) { // Handle message // data.type -> label // data.payload -> message });
browser support
© Sony Pictures
© Sony Pictures