A simple chromecast player. Relies on the castv2-client lib from thibauts, all credits go to him.
Start Playback of some video file:
const player = require('chromecast-player')();
const media = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/ED_1280.mp4';
player.launch(media, (err, p) => {
p.once('playing', () => {
console.log('playback has started.');
});
});
Attach to a currently playing session:
const player = require('chromecast-player')();
player.attach((err, p) => {
p.pause();
});
npm install chromecast-player --save
Copyright (c) 2014 Simon Kusterer Licensed under the MIT license.