Skip to content

Commit

Permalink
add more to example
Browse files Browse the repository at this point in the history
  • Loading branch information
yocontra committed Aug 13, 2013
1 parent 90e8d23 commit e9dc7cc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Expand Up @@ -32,23 +32,24 @@ var nodecast = require('nodecast');
var devices = nodecast.find();

devices.once('device', function(device) {
device.reboot(function(err) {
// triggers a device reboot
// chromecast only
});

var yt = device.app('YouTube');

yt.info(function(err, info){
// returns info about the app
// who wrote it, capabilities, etc.
});

yt.start(function(err) {
// starts the app on the chromecast
yt.start('v=12345', function(err) {
// starts the app on the device
// also optionally takes data to pass to the app
// (for example: youtube takes v=id to launch with a video)
});

yt.stop(function(err){});

// RAMP stuff
yt.connect();
yt.send('hey youtube');
});
```

Expand Down

0 comments on commit e9dc7cc

Please sign in to comment.