webrtc - comunicação na web em tempo real
DESCRIPTION
Imagine um mundo onde o seu telefone, televisão e computador pudessem se comunicar usando uma única plataforma. Imagine que seja muito fácil adicionar video-chat e compartilhamento peer-to-peer à sua aplicação web, com custos baixíssimos e sem precisar de plugins. Essa é a visão do WebRTC (Real-Time Communications).TRANSCRIPT
![Page 1: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/1.jpg)
WebRTC Comunicação na web em tempo real
RICARDO TORRES
![Page 2: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/2.jpg)
![Page 3: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/3.jpg)
![Page 4: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/4.jpg)
AMSTERDAM
![Page 5: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/5.jpg)
![Page 6: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/6.jpg)
O que é WebRTC?
![Page 7: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/7.jpg)
Tempo real
Peer-to-peer (P2P) - Audio, video, dados
Sem plugins
JavaScript API
![Page 8: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/8.jpg)
![Page 9: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/9.jpg)
Certo, mas e aí?
![Page 10: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/10.jpg)
RTC não é nada novo
![Page 11: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/11.jpg)
![Page 12: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/12.jpg)
Marcus Camila
Server
![Page 13: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/13.jpg)
Marcus Camila
![Page 14: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/14.jpg)
![Page 15: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/15.jpg)
![Page 16: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/16.jpg)
![Page 17: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/17.jpg)
![Page 18: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/18.jpg)
1.500.000.000+ WebRTC Endpoints
300.000.000+ Mobile
![Page 19: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/19.jpg)
WebRTC APIs
![Page 20: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/20.jpg)
WebRTC APIs
Media Stream API Peer Connection API Data Connection API
![Page 21: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/21.jpg)
Media Stream API
Obtém tracks (faixas) de audio e video Captura em tracks separadas Combina as tracks para formar uma
stream navigator.getUserMedia()
![Page 22: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/22.jpg)
getUserMedia
![Page 23: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/23.jpg)
![Page 24: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/24.jpg)
![Page 25: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/25.jpg)
Screen sharing
![Page 26: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/26.jpg)
Peer Connection API
![Page 27: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/27.jpg)
getUserMedia + RTCPeerConnection
![Page 28: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/28.jpg)
![Page 29: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/29.jpg)
Data Connection API
![Page 30: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/30.jpg)
Data Connection API
Websockets API Baixa latência Segura Confiável ou não confiável
![Page 31: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/31.jpg)
![Page 32: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/32.jpg)
![Page 33: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/33.jpg)
![Page 34: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/34.jpg)
![Page 35: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/35.jpg)
Signaling
![Page 36: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/36.jpg)
Por quê?
![Page 37: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/37.jpg)
Informações sobre a sessão - Quais formatos são suportados - O que eu quero enviar - Informações da rede
Qualquer mecanismo de mensagens Qualquer protocolo de mensagens
Signaling
![Page 38: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/38.jpg)
Signaling
![Page 39: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/39.jpg)
![Page 40: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/40.jpg)
![Page 41: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/41.jpg)
Marcus Camila
![Page 42: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/42.jpg)
http://www.html5rocks.com/en/tutorials/webrtc/infrastructure/
![Page 43: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/43.jpg)
http://www.html5rocks.com/en/tutorials/webrtc/infrastructure/
![Page 44: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/44.jpg)
Como eu acho um peer?
![Page 45: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/45.jpg)
Servers
![Page 46: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/46.jpg)
Qual o meu IP público?
Simples e barato
Comunicação P2P
STUN
![Page 47: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/47.jpg)
Cloud fallback
Dados são enviados através do servidor
Custo alto Garante o funcionamento
TURN
![Page 48: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/48.jpg)
Framework
Tenta achar a melhor rota
ICE
![Page 49: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/49.jpg)
Segurança
![Page 50: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/50.jpg)
![Page 51: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/51.jpg)
Arquitetura
![Page 52: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/52.jpg)
Marcus Camila
![Page 53: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/53.jpg)
![Page 54: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/54.jpg)
![Page 55: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/55.jpg)
Por onde começar?
![Page 56: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/56.jpg)
adapter.js (http://goo.gl/vJ1bbA)
SimpleWebRTC (https://github.com/henrikjoreteg/SimpleWebRTC)
easyRTC (https://github.com/priologic/easyrtc)
PeerJS (http://peerjs.com)
Sharefest (https://github.com/peer5/sharefest) TogetherJS (https://togetherjs.com)
Frameworks
![Page 57: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/57.jpg)
Capturing audio and video in HTML5 (http://goo.gl/4u7bQm)
Getting Started With WebRTC (http://goo.gl/r5NA66)
simpl.info (http://simpl.info/webrtc/)
WebRTC Experiment (http://goo.gl/ASqpwQ)
Referências
![Page 58: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/58.jpg)
Possibilidades…
![Page 59: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/59.jpg)
![Page 60: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/60.jpg)
![Page 61: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/61.jpg)
http://blog.vline.com/post/61581986806/live-tv-interview-powered-by-vline-customer-in-quality
![Page 62: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/62.jpg)
WebRTC precisa de mais coders!
![Page 63: WebRTC - Comunicação na web em tempo real](https://reader031.vdocuments.mx/reader031/viewer/2022020116/556ac451d8b42acd348b4afd/html5/thumbnails/63.jpg)
rictorres.com.br
github.com/rictorres
DANK JE WEL ;) (OBRIGADO)