Created
September 29, 2017 14:00
-
-
Save kaiquewdev/34569c754038b6ea75b442ff9ef98797 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Browser = require('nodecast-js'); | |
var url = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4'; | |
var timestamp = 60; // in seconds | |
var browser = new Browser(); | |
browser.onDevice(function (device) { | |
device.onError(function (err) { | |
console.log(err); | |
}); | |
console.log(browser.getList()); // list of currently discovered devices | |
device.play(url, timestamp); | |
}); | |
browser.start(); | |
setTimeout(function () { | |
browser.destroy(); // destroy your browser | |
}, 20000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment