Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.
/ nodecast-js Public archive

Node.js module for UPnP/DLNA/Chromecast support

License

Notifications You must be signed in to change notification settings

gyzerok/nodecast-js

Repository files navigation

nodecast-js

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

Build Status NPM version Dependency Status npm

Installation

npm install nodecast-js --save

Usage

const NodeCast = require('nodecast-js');

const url = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4';
const timestamp = 60; // in seconds
const nodeCast = new NodeCast();

nodeCast.onDevice(device => {
    device.onError(err => {
        console.log(err);
    });

    console.log(nodeCast.getList()); // list of currently discovered devices

    device.play(url, timestamp);
});

nodeCast.start();

setTimeout(() => {
    nodeCast.destroy(); // destroy nodecast
}, 20000);

About

Node.js module for UPnP/DLNA/Chromecast support

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •