https://github.com/spacebro/mpv-bro
Use MPV through spacebro
https://github.com/spacebro/mpv-bro
mpv spacebro
Last synced: over 1 year ago
JSON representation
Use MPV through spacebro
- Host: GitHub
- URL: https://github.com/spacebro/mpv-bro
- Owner: spacebro
- Created: 2019-08-14T16:41:48.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-06T13:08:24.000Z (about 3 years ago)
- Last Synced: 2025-01-21T21:46:29.941Z (over 1 year ago)
- Topics: mpv, spacebro
- Language: JavaScript
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MPV Bro
Control an mpv player over Spacebro
## Currently support following messages
- loadAndPlay
- loadPath
- play
- stop
- pause
- resume
Only `loadAndPlay` and `loadPath` accept argument. You must provide a local path where the client runs in order to load it and play it.
For instance you can send :
`loadAndPlay` with a data object like `'{"path":"/opt/share/myvideo.mp4", "options": {"inf":true}}'`
This will load the file myvideo and play it **infinitely**.
For instance with **clibro** : `emit loadAndPlay '{"path":"/opt/share/myvideo.mp4", "options": {"inf":true}}'`
You can also specify no infinity loop: `emit loadAndPlay '{"path":"/opt/share/myvideo.mp4", "options": {"inf":false}}'` or even omit the options : `emit loadAndPlay '{"path":"/opt/share/myvideo.mp4"}'`
You can then `play` / `pause` / `resume`. Watch out, if you stop, you won't be able to play again without sending a path like with `loadAndPlay`.
See the commands of mpv here
https://github.com/00SteinsGate00/Node-MPV/tree/Node-MPV-2#controlling-mpv