WebRTC Hacks:
Lessons Learned
Twilio Signal 2016
What would Macguyver do..
with WebRTC?
2May 26, 2016
Hi!
CHAD HART
Independent Consultant,
Chief Editor, webrtcHacks
https://webrtcHacks.com
@webrtcHacks
@chadwallacehart
chad@chadwallacehart.com
May 26, 2016 3
May 26, 2016 4
May 26, 2016 5
6May 26, 2016
Hack #1: Motion Detecting Baby Monitor
https://webrtchacks.com/baby-motion-detector/
7May 26, 2016
Detecting motion
https://github.com/ReallyGood/js-motion-detection
8May 26, 2016
Hack #1: Motion Detecting Baby Monitor
https://webrtchacks.com/baby-motion-detector/
9May 26, 2016
Lessons Learned
• SDKs & cloud services make WebRTC super simple
• Use HTML5 Canvas on your media stream
• You don’t need to know what you’re doing
9
10May 26, 2016
Hack #2: Build your own phone company with
WebRTC and a weekend
https://webrtchacks.com/own-phoneco-with-webrtc/
11May 26, 2016
Build your own WebRTC Server
Back-end Stack Server Logic
12May 26, 2016
Lessons Learned:
Building out a Back-end
• Signaling: easier than expected
• Cloud setup wasn’t so bad
• Don’t skip SSL for HTTPS
• Don’t skip TURN server
• Don’t get detached from UX
12
13May 26, 2016
Hack #3: How to train a dog with JavaScript
https://webrtchacks.com/javascript-dog-trainer/
14May 26, 2016
This is Levy
15May 26, 2016
Levy liked our
old couch
16May 26, 2016
We got a new couch.
Levy wasn’t welcome here.
17May 26, 2016
Levy didn’t care
18May 26, 2016
Fun with my kids toys (& IoT)
19May 26, 2016
Quick proof-of-concept
Could I mix WebRTC &
IoT to train my dog?
20May 26, 2016
Not fun:
getting organized
• Signaling Server
• Web server
• IoT device
• Browser-based monitor app
• Browser-based viewing app
• MMS API
21May 26, 2016
Fun: seeing it work
https://webrtchacks.com/javascript-dog-trainer/
MMS Alert
22May 26, 2016
Fun: seeing it work
https://webrtchacks.com/javascript-dog-trainer/
23May 26, 2016
Lessons Learned
• New features for free: recording
• MMS is easier than writing an app to get mobile notifications
• Apple makes things difficult
• More “things” means more opportunities for short RTC sessions
24May 26, 2016
Hack 4: ThirdEye: WebRTC + Computer vision
eyes when & where you need them
ThirdEye
25May 26, 2016
Start boring..
26May 26, 2016
Adding computer vision
27May 26, 2016
28May 26, 2016
Solving real problems
29May 26, 2016
30May 26, 2016
Other lessons learned
• Gathering context from real time streams isn’t so hard
• Don’t make the signaling harder than it needs to be
• Someone really needs to make a wifi WebRTC camera
31May 26, 2016
Thinking about machines & RTC
P2P M2P
P2M M2M
Person to person calling
because of machines
Machine makes a call
when something happens
Send machine real time
audio/video for processing
Machines send other
machines audio/video for
real time processing
Whole new categories of interactions that will drive RTC growth
32May 26, 2016
My Next Hack: Adding WebRTC to Toys?
33May 26, 2016
WebRTC hacks in the wild
35May 26, 2016
The browser as a real time media processor
Canvas Web Audio
http://www.html5rocks.com/en/tutorials/webaudio/games/http://diveinto.html5doctor.com/canvas.html
36May 26, 2016
Hacks that are new:
make your own conferencing server
https://webrtchacks.com/web-audio-conference/
37May 26, 2016
Hacks we don’t like
https://webrtchacks.com/dear-ny-times/
38May 26, 2016
http://randomwalker.info/publications/OpenWPM_1_million_site_tracking_measurement.pdf
39May 26, 2016
Hacking a hack – the WebRTC notifier
https://webrtchacks.com/webrtc-notify/
40May 26, 2016
Production Hack: skip the P2P
https://webrtchacks.com/slack-webrtc-slacking/
41May 26, 2016
Retrospective: long, but not impossible jump
from a hack to reality
• Security
• TURN service
• Elasticity
• Redundancy
• Versioning
• Compliance
• Multi-party
• Monitoring
• Active test
• Security
• iOS
• Android
• Internet Explorer
• Safari
• UX timing
• Bandwidth checks
• Device checks
• Failure recovery
Server-side
Client-side
https://upload.wikimedia.org/wikipedia/commons/2/26/USAF_EOD_explosion.jpg

WebRTC Hacks: Lessons Learned

Editor's Notes

  • #2 https://c1.staticflickr.com/1/658/21755244141_c6e6826585_b.jpg
  • #3 I am an independent analyst, product management & marketing consultant, and advisor focusing on RTC, especially WebRTC. Personally, I care a lot about where technology and products are headed. I focus at lot on trying to understand the future and luckily I was able to do this often career wise as an industry analyst, doing business intelligence, and strategic product planning. I also run a blog for webrtc developers – webrtcHacks. It was great to see so many WebRTC hacks during the hackathon. It is amazing to see how far WebRTC has come, even on my own blog. webrtcHacks is pretty specific about being for developers – our content is generally pretty technical and not something you would care about unless you are at least involved in WebRTC development. We have grown from a few thousand pageviews a month in 2013 to 30 to 40,000 now.
  • #4 Lots of definitions of Hack
  • #5 This is probably my favorite. Quick or inelegant solution
  • #7 September 2013 My first hack
  • #8 Using the HTML5 Canvas to detect motion
  • #9 September 2013 My first hack
  • #10 September 2013
  • #11 January 7, 2014 What would it take to make my own personal VoIP service
  • #12 EasyRTC for WebRTC signaling Express & Node AWS – Ubuntu image from Bitnami
  • #14 November 2014
  • #15 I had a bull dog He liked to sleep on the couch
  • #17 But them we bought a new couch Sleeping on the couch was a no-no
  • #19 Tessel.io Elenco Snap Circuits rover
  • #21 Lots of nodes Signaling server from OSS – Simple WebRTC Node for my web server tessel-based rover also running now Light weight monitor app that does motion detection Browser app that does recording Twilio for MMS
  • #25 June 2015
  • #32 P2P: something happens – get someone on the phone to talk about it M2P: dog trainer example where you get called P2M: computer vision example where you just want to process the stream Looking forward to the day when AI bots talk to other AI bots using real time voice & video
  • #33 Raspberry Pi
  • #35 https://upload.wikimedia.org/wikipedia/commons/9/90/Flickr_-_brewbooks_-_Palm_Jungle_-_Hawaii_Tropical_Botanical_Garden.jpg
  • #36 Media stream = canvas.captureStream(framerate) https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/webrtc-integration.html
  • #39 http://randomwalker.info/publications/OpenWPM_1_million_site_tracking_measurement.pdf This is a real problem with more than 700 of the top 1M sites using WebRTC tracking Still small vs. other forms
  • #40 Han-Ka
  • #43 https://upload.wikimedia.org/wikipedia/commons/2/26/USAF_EOD_explosion.jpg