2.0.1 • Published 1 year ago

mpv v2.0.1

Weekly downloads
2
License
WTFPL
Repository
github
Last release
1 year ago

▶️ MPV

This library spawns mpv and talks to it using the JSON IPC protocol.

Quick start

const mpv = Mpv({
  args: [],       // Arguments to child_process.spawn,
  options: {}     // Options to child_process.spawn,
  path: 'mpv'     // Path of mpv (defaults to mpv or mpv.exe in path or cwd)
})

mpv.command('loadfile', 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4')

mpv.on('playback-time', time =>
  console.log(time)
)

await mpv.get('volume')

await mpv.set('volume', 0.5)

const unobserve = await mpv.observe('volume', volume => {
  // volume is the new value
})

unobserve() // stops observing the related property

mpv.process       // process from child_process.spawn
mpv.socket        // raw tcp socket
2.0.1

1 year ago

2.0.0

1 year ago

1.0.0

2 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago

0.1.1

3 years ago

0.0.2

9 years ago

0.0.1

9 years ago