1.2.0 • Published 5 years ago

vlc-command v1.2.0

Weekly downloads
606
License
MIT
Repository
github
Last release
5 years ago

vlc-command travis npm downloads javascript style guide

Find VLC player command line path

install

npm install vlc-command

usage

var cp = require('child_process')
var vlcCommand = require('vlc-command')

vlcCommand(function (err, cmd) {
  if (err) return console.error('could not find vlc command path')

  if (process.platform === 'win32') {
    cp.execFile(cmd, ['--version'], function (err, stdout) {
      if (err) return console.error(err)
      console.log(stdout)
    })
  } else {
    cp.exec(cmd + ' --version', function (err, stdout) {
      if (err) return console.error(err)
      console.log(stdout)
    })
  }
})

license

MIT. Copyright (c) Feross Aboukhadijeh.