Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xat/chromecast-player
simple chromecast player
https://github.com/xat/chromecast-player
Last synced: 2 months ago
JSON representation
simple chromecast player
- Host: GitHub
- URL: https://github.com/xat/chromecast-player
- Owner: xat
- License: mit
- Created: 2014-09-14T15:04:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-03-13T10:57:42.000Z (almost 7 years ago)
- Last Synced: 2024-10-09T17:08:12.858Z (3 months ago)
- Language: JavaScript
- Size: 29.3 KB
- Stars: 99
- Watchers: 12
- Forks: 20
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-network-js - castnow
README
# chromecast-player
A simple chromecast player.
Relies on the [castv2-client](https://github.com/thibauts/node-castv2-client) lib
from thibauts, all credits go to him.### Usage Samples
Start Playback of some video file:
```js
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:
```javascript
const player = require('chromecast-player')();player.attach((err, p) => {
p.pause();
});
```### Installation
```bash
npm install chromecast-player --save
```## License
Copyright (c) 2014 Simon Kusterer
Licensed under the MIT license.