nodecast-js

1.0.3 • Public • Published

nodecast-js

Nodecast-js is a simple module for streaming media to Chromecast/UPnP/DLNA.

Installation

npm install nodecast-js --save

Usage

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);

Dependents (1)

Package Sidebar

Install

npm i nodecast-js

Weekly Downloads

41

Version

1.0.3

License

MIT

Last publish

Collaborators

  • gyzerok