Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaruba/powder-remote
Node.js Controller for Powder Player
https://github.com/jaruba/powder-remote
Last synced: 26 days ago
JSON representation
Node.js Controller for Powder Player
- Host: GitHub
- URL: https://github.com/jaruba/powder-remote
- Owner: jaruba
- License: mit
- Created: 2015-08-11T08:42:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-05-24T01:15:28.000Z (over 4 years ago)
- Last Synced: 2024-09-21T11:41:30.267Z (about 2 months ago)
- Language: JavaScript
- Size: 35.2 KB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Powder Remote
Node.js Controller for [Powder Player](https://github.com/jaruba/PowderPlayer) based on the [Web API](https://github.com/jaruba/PowderPlayer/wiki/Web-API-Docs).
Supports Magnet Links, Youtube Links and all VLC supported Media Files/URLs (for local files use ``file:///`` in front of the absolute file paths)
[**JavaScript API**](https://github.com/jaruba/powder-remote/wiki/JavaScript-API)
### Install
npm install powder-remote
### Initiation
```javascript
const pRemote = require('powder-remote')
const powder = new pRemote()
```### Example Usage
Start a youtube video in fullscreen mode:
```javascript
powder.start_player({ args: ['--fs'] }).then(remote => {remote.add_playlist({
url: "https://www.youtube.com/watch?v=HomAZcKm3Jo"
})}).catch(e => {
console.error(e)
})
```Starting a video from a http server and listening to some of the events:
```javascript
powder.start_player().then(remote => {
remote.add_playlist({
url: "https://download.blender.org/durian/movies/Sintel.2010.1080p.mkv"
})
remote.on("initialPlay",function() { console.log("initialPlay") })
remote.on("Opening",function() { console.log("Opening") })
remote.on("Buffering",function() { console.log("Buffering") })
remote.on("Playing",function() { console.log("Playing") })
remote.on("Paused",function() { console.log("Paused") })
remote.on("Stopped",function() { console.log("Stopped") })
remote.on("Ended",function() { console.log("Ended") })
}).catch(e => {
console.error(e)
})
```