Introduction to WebRTC

pc.connect() doesn't respond

01 February 2016

After playing a bit with stop motion, I wanted to build something a bit bigger. The topic was missing but it came very quickly: WebRTC. It was the first time I tried to explain something in video. It took me ages to write the storyboard, draw and cut all the different pieces, pass one complete night to take the shots then take some courage to record my voice. The result hold in 4 minutes of video. This is definitely perfectible.

‘‘South Park animation is not as easy as people think!’’

11 January 2016

Over the years and projects I had to use different environment setup, for work and personal projects. Usually, I hate it. It takes ages to set up, the procedure never works correctly. Sometimes your changes doesn’t work on production only because the context is different.

I remember a project where the QA website was build every night and no developer had the access to run the build script during the day. Unfortunately, if a bug appear we had no other choice than commit a fix and wait the next build. It’s awful when something work on your dev machine but not in the production context. The browser dev tools are amazing to debug scripts but sometimes it’s easier to make changes with your IDE and relaunch the webapp.

So, I realised that a simple and silly hack could help me a lot. Let me explain, when you work on the frontend, there’s no need to change the backend, you just want to edit the JS, CSS and HTML. So I started to write a Chrome extension to redirect production files to my local files. And it works so well.

Suddenly this little hack made my life so easy, and I tend to use it too often. For example, my Vagrant machine doesn’t work and I don’t want to spend the day on it, fine I use the dev website of my coworker (http://his-domain-instead-of-mine) and I redirect the javascript my local machine. Also same situation when my coworker is working on an API route and I need to use it for my new feature (because I’m too lazy to create mock data and I prefer to code the real context). This also can work on production websites, which make it easier to debug in some cases.

Now, when somebody ask me to debug a project but the process to set up en environment is a pain, I only ask where can I try the production or dev website, then set up the redirection rules in my extension.

If you want to try it, I published a Chrome extension boilerplate called Shuntr on GitHub

Enjoy it, it has saved my life (and patience) many many times.


18 October 2015

Last night, while playing GTA with my flatmate, an idea came to our minds. A silly idea like we all have between friends.

It came after ordering pizzas (they got bad influence on us), we were imaging that we could order them directly from GTA. That our local pizza shop would be in the game, you enter, choose what you want, pay, then get it in real. This could be possible if Rockstar Games would create a marketplace to rent some places in the game. An API would allow to customise the design of the shop and interaction with the user. This could be even better if you have to do a special challenge to get an exclusive topping on your pizza. Some places would be rentable for players from a specific region, like renting a shop only for players from London. It would target a restricted user market.

Then, we’ve been wondering what would happen if you do a hold-up? Does it count like a hold-up IRL? I imagine some tenant going mad because they were ignoring the possibility. So to respond to the problem, Rockstar would provide a bodyguard and private security services that you need to buy to protect your business. Otherwise you would see Dominos gang planning to blow up Papa Johns.

Or maybe this already exists and I’m out of date (as usual).


12 October 2015

For my last post I did something I wanted to do in ages: stop motion. But I had nothing to hold my camera in the air and take pictures of my desk. This problem always blocked me to go further. Then I remembered about these old arcade games which are using a mirror inside: “Oh! There’s something to try”. It ended with the following set up.

A big mirror, hold by a Vans box and covered with a T-Shirt to not damage the wall. Then another box to put the camera a bit up. A bit of light, and we are good to go.

It’s not really complex, and I’m quite happy of the result for a first try. There’s some things I’ve learn and some I will do differently next time.

There will be another attempt, for sure.


10 October 2015

The new version of the Chromecast is launched. I was already in love with the existing version and it’s JavaScript API. Even if the new one got nothing new, his new design gave me a little idea. A little feature they should implement to give more possibilities and usages to the famous device: add the NFC support.

What for? Which case?

Well, the problem is most of people (and devs) think the Chromecast is only for streaming audio and video. This is incomplete, it display web apps, which is a lot more exciting.

Imagine a big TV in a store, you can’t interact with it. With a Chromecast you can display a web app, add Liwe on the top of it and anybody with a smartphone can control it. Your app could help your customers to find what they are looking for, discovering new products or any other experience.

But imagine one second the NFC was supported and controllable via JavaScript in the web app. This would transform the little device into a direct access point to a product page or the web app remote. A simple tap on the Chromecast you get the access to the information

After invading living rooms, it could invade a lot more new places like store, events or corporate world.

I took the opportunity to illistrate it in stopmotion. That was pretty fun to do.


This post has been on HackerNews for few hours and some interesting ideas came out from the comments. Mentionning the usage of QR code, the physical web or Google Tone. Unfortunately none of them can have an impact nowadays.

The QR code is widely popular but not a lot of people use it. An extra app is required to read the tag and the time required to write a simple url can be shorter.

The Google Tone and near web are absolutely amazing but not implemented yet. On the top of it, the Chromecast would need bluetooth and an access via their API which not currently the case… like NFC.

Actually, about the NFC, a reader (ron0c) mention a point from iFixit teardown that a chip has NFC built in… maybe in a future update :)