1.2.0 • Published 8 years ago

vlc-renode v1.2.0

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
8 years ago

vlc-renode

A node module to control the HTTP-interface of VLC.

install

npm install --save vlc-renode

sample usage

index.js
"use strict";
const
  spawn = require('child_process').spawn,
  VLCRenode = require('vlc-renode');

var
  options = {
    password: 'secret', // defaults to 'admin'
    host: '127.0.0.1',  // defaults to 'localhost'
    port: 8080,         // defaults to 8080 anyways
    interval: 1000      // defaults to 500
  },
  process = spawn('vlc', ['-I', 'http', '--http-password', options.password, '--http-port', options.port], {
    stdio: 'ignore'
  }),
  vlc = new VLCRenode(options);

vlc.play('https://ia802508.us.archive.org/5/items/testmp3testfile/mpthreetest.mp3').then(() => {
  setTimeout(() => {
    vlc.pause();
  }, 3000);
});

// nested changes are published in a flattened format: 'change:stats.readbytes'
vlc.on('change:volume', (oldVal, newVal) => {
  console.log(oldVal);
  console.log(newVal);
});
strict and ES6 harmony mode required
node index.js --use_strict --harmony

TODO:

  • ☑ events (for simple state changes)
  • ☐ docs
  • ☐ tests
1.2.0

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago