cvlc

0.1.0 • Public • Published

cvlc

Cvlc can be used to control VLC command-line instances

Install

$ npm install cvlc

Todo

Examples

Playing a file

var Cvlc   = require('cvlc'),
    player = new Cvlc(),
    fs     = require('fs');
 
player.play('/path/to/file', function startedLocalFile() {
    // The file has started playing
});

Playing a stream

// Create a read stream
var stream = fs.createReadStream('/path/to/file');
 
player.play(stream, function startedStream() {
    // The stream has started playing
});

Executing VLC commands

player.cmd('rate 2', function gotResponse(err, response) {
    // Sound should be playing at twice the speed
});

See more commands

You can get a list of all the commands by executing this command:

player.cmd('longhelp', function gotCommands(err, response) {
    console.log('Available commands: ' + response);
});

Destroying VLC process

When you no longer need the player, you need to manually destroy it. Otherwise it will stay in memory, and the cvlc process will stay active.

player.destroy();

Readme

Keywords

Package Sidebar

Install

npm i cvlc

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • skerit