@richienb/vlc
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

vlc

An interface to VLC Media Player.

Highlights

  • Automatic command encoding and delivery.
  • Automatic port acquisition.
  • TypeScript support.
  • Bundled binaries.
  • No native dependencies.
  • Actively maintained.

Install

npm install @richienb/vlc

Usage

import createVlc from '@richienb/vlc';

const vlc = await createVlc();

// Play audio
await vlc.command('in_play', {
	input: 'audio-file.mp3',
});

// Pause/resume audio
await vlc.command('pl_pause');

API

createVlc()

Returns a promise which resolves with the vlc instance.

vlc.info()

Get the current player status. Returns a promise.

vlc.playlist()

Get the current playlist information. Returns a promise.

vlc.command(command, options?)

Execute a command on the player. Returns a promise that resolves when the command has been sent.

command

Type: string

The command to execute.

Package Sidebar

Install

npm i @richienb/vlc

Weekly Downloads

92

Version

3.0.2

License

MIT

Unpacked Size

10.5 kB

Total Files

6

Last publish

Collaborators

  • richienb