WebRTC introduction

In notebook:
FrontEndMasters Real-Time Web with Node.js
Created at:
JavaScript Fundamentals DOM
4:48:50 - 4:58:55 WebRTC Introduction Web Real-Time-Communication or WebRTC allows for extremely low-latency peer-to-peer communication. This low-latency communication opens up more possibilities for real-time games and collaboration. - http://www.webrtc.orginflexion point where we move to peer to peer web 
given our concerns regarding privacy and security 

two computers can talk to each other, no server middle man, the latency is between the two clients. latency can be 15-40ms. Depending of course on geography. 

first it was getusermedia - peer to peer video and sound
mozilla team called the chrome team - first time ever two browser makers communicated directly with each other

how it works

webcam capture

  1. ​getUserMedia(...)​ access your camera
  2. feedback on a ​<video>​ element
  3. video element fires an event every time it receives so it can be piped to
  4. ​ctx.drawImage(..)​ with ​<canvas>​ and then do effects and transformations
  5. save a frame from the canvas/video with ​can.toDataURL(...)​ that the user can save