vlconductor
v0.4.5
Published
Allowing programmatic NodeJS control of VLC Player for Raspberry Pi, without a GUI or windowing system.
Downloads
101
Readme
VLConductor
Allowing programmatic NodeJS control of VLC Player for Raspberry Pi, without a GUI or windowing system.
The name: "VideoLAN Conductor" or just "VLC Conductor".
Based on my other library omxconductor which offered similar functionality, but using the somewhat-deprecated omxplayer
. (VLC Player supports hardware-accelerated 4K HEVC playback, for example.)
Uses the VLC HTTP API as per https://wiki.videolan.org/VLC_HTTP_requests/
API
new Player((file: string, options: Partial<PlaybackOptions>)
open()
: start playbackstop()
:pause()
: pause if playing, ignored otherwiseresume()
: play if paused, ignored otherwiseseek(value: string)
: use VLC's peculiar seek syntaxclose()
: stop playback, kill subprocessaddPositionEvent(position: number, handler: (position?: number) => void)
: add a trigger (call the event handler) when a position is hit/passed
TODO:
- Multiple layers, multiple players?
- Different functions for various seek value types
- Setup VSCode debugging
- Some unit tests