Jude Osborn

It's kind of fun to do the impossible -- Walt Disney

0 notes

The inaugural APAC CreativeLab5 [2015].

0 notes

Technology at home that actually works

Sometimes there are wonderful moments in technology like this:

I’m sitting in my living room listening to music on Google play, cast to an audio only Chromecast in my living room (no TV attached).

Jordann sees an album cover of the song I cast on my phone and asks what it is. “It looks like Pandora opening her box”, I say.

"Who is Pandora"?

I take out my phone and say, “Okay Google.” Pause. “The story of Pandora for kids.”

A second later I have search results with a YouTube video.

I click the video and cast it to the TV room across the house for her to watch.

Filed under technology chromecast

0 notes

How Chromecast development works

Sometimes it’s difficult to get a decent overview of a new development technology. Chromecast development can look daunting at first glance, but it’s actually remarkably simple. After playing with it on and off for a couple of weeks here’s my summary of Chromecast development:

  • There is an API that lets you build native Android and iOS applications that interact with Chromecast.
  • There is an API for websites and web applications, but it is through a Chrome extension. To be clear, you must have the Chrome extension installed in order for a website to interact with Chromecast. Obviously this requires Chrome (sorry, Konquerer fans).
  • Mobile Chrome does not support extensions, so it is not possible to write mobile websites with custom Chromecast integration.
  • Google is slowly and experimentally introducing Chromecast buttons in video embeds. You cannot interact with them programmatically, but these buttons do provide a basic level of casting to a web site (even mobile).

A Chromecast application can have two parts:

Sender app

This is written as either a native mobile app or a desktop web application (with the Chromecast extension installed).

For example, you might write a native mobile app that aggregates videos from the web about video games, and contains buttons to play, pause or rewind the video. Or you might write an app that is not video related at all, and just casts text or photos.

Generally speaking, the receiver app does not render videos directly. Instead, it sends bits of data, such as URLs to the receiver app, which in turn takes care of the rendering.

Receiver app

This is what you see on the TV screen. It simply a hosted web application, written in HTML, CSS and JavaScript, that accesses a JavaScript API.

For example, you might show a video game video on the screen and perhaps overlay the video with a caption about the video game. In some cases receiver apps do nothing more than play a video, in which case there are a few default apps you can use to save you the coding trouble.

Receiver apps are really just web apps, and can even be a single HTML file with inline JavaScript, hosted on Google Drive. Pretty basic stuff.

In essence Chromecast development is peer to peer JavaScript. In fact, it uses Websockets for communication. An amazing devices wrapped in familiar development technologies.

0 notes

A simple explanation of base number conversion

For anyone wondering about the basic principal behind base conversion, here’s a really simple example.

Let’s say num = 32 and base = 2 you would do this (in JavaScript):

var num = 32;
var base = 2;
var convertedNum = '';

// Keep looping until num  is 0:
do {
  // Keep sticking num % base at the beginning of the final string:
  convertedNum = String(num % base) + convertedNum;

  // Keep trimming down num by dividing it by base:
  num = Math.floor(num /= base);
} while (num > 0);

print(convertedNum); // Output should be "100000", which is binary for 32. Yay.

This only works with bases up till 9, but it explains the basic concept pretty well.

Filed under algorithms