@richienb/vlc
v3.0.2
Published
An interface to VLC Media Player.
Downloads
327
Maintainers
Readme
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.