https://github.com/richienb/vlc
An interface to VLC Media Player.
https://github.com/richienb/vlc
Last synced: 5 months ago
JSON representation
An interface to VLC Media Player.
- Host: GitHub
- URL: https://github.com/richienb/vlc
- Owner: Richienb
- License: mit
- Created: 2020-02-21T09:32:08.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-15T16:06:07.000Z (over 4 years ago)
- Last Synced: 2025-07-21T20:57:38.606Z (6 months ago)
- Language: TypeScript
- Homepage:
- Size: 380 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
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
```sh
npm install @richienb/vlc
```
## Usage
```js
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](https://wiki.videolan.org/VLC_HTTP_requests#Full_command_list) to execute.