Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Aug 22, 2013
1 parent 2e021e2 commit 3dedd53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions examples/chromecast.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
var WebSocket = require('ws');
var chromecast = require('../')();

chromecast.on('device', function(){
chromecast.on('device', function(device){

this.launch('ChromeCast', {
device.launch('ChromeCast', {
v: 'release-9e8c585405ea9a5cecd82885e8e35d28a16609c6'
}).then(function(){
return chromecast.appInfo();
return device.appInfo();
}).then(function(appInfo){
return chromecast.connectionUrl(appInfo);
return device.connectionUrl(appInfo);
}).then(function(resp){

var socket = new WebSocket(resp.entity.URL);
Expand Down
4 changes: 2 additions & 2 deletions examples/youtube.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var chromecast = require('../')();

chromecast.on('device', function(){
chromecast.on('device', function(device){

this.launch('YouTube', {
device.launch('YouTube', {
v: 'cKG5HDyTW8o'
}).then(function(){
console.log('Watch Your TV!');
Expand Down

0 comments on commit 3dedd53

Please sign in to comment.