An interface to VLC Media Player.
- Automatic command encoding and delivery.
- Automatic port acquisition.
- TypeScript support.
- Bundled binaries.
- No native dependencies.
- Actively maintained.
npm install @richienb/vlc
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');
Returns a promise which resolves with the vlc instance.
Get the current player status. Returns a promise.
Get the current playlist information. Returns a promise.
Execute a command on the player. Returns a promise that resolves when the command has been sent.
Type: string
The command to execute.