WebRTC DataChannel



WebRTC DataChannel

0 0


webrtc-presentation

Presentation about WebRTC

On Github rvanlaar / webrtc-presentation

WebRTC DataChannel

Roland van Laar

Entrepreneur

Education IT / Consultancy

twitter: @rvanlaar github: rvanlaar roland@micite.net

Projects

FairlyValued

Slack GreetBot

Questions?

Javascript Level?

WebSockets?

Promises?

WebRTC: What it is

P2P: Browser to Browser

Audio

Video

DataChannel AKA P2P websockets

Usecase: Teacher and SmartBoard

Demo Time: WebSockets

Edu-World Demo

WebRTC: What it's not

serverless: needs STUN/TURN

P2MultiPeer: unless using TURN

Easy to set up

Glossary

STUN: Session Traversal Utilities for NAT: external IP query

TURN: Traversals Using Relays around NAT: Media relay

ICE: Interactive Connectivity Establishment: IP-addresses

SDP: Session Description Protocol

Connection Establishment: Alice

create RTCPeerConnection object

create an offer (SDP session description) with RTCPeerConnection createOffer() method

calls setLocalDescription() offer

stringify the offer and pass it to Bob

Connection Establishment: Bob

call setRemoteDescription() with Alice's offer

call createAnswer(), and the success callback for this is passed a local session description: Bob's answer

Bob sets the answer as the local description by calling setLocalDescription()

Stringify the answer and pass it to Alice

Connection Establishment: Alice part 2

set Bob's answer with setRemoteDescription()

Was that everything?

Nope....

Demo Time: DataChannel

LocalStorage WebRTC

Thoughts

Spec is still in flux and getting better

Promise based

DataChannel setup changed

Hints

adapter.js for WebSockets

Usefull resources

WebRTC DataChannel Roland van Laar Entrepreneur Education IT / Consultancy twitter: @rvanlaar github: rvanlaar roland@micite.net