Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/woodruffw/ruby-mpv
A Ruby library for controlling mpv processes.
https://github.com/woodruffw/ruby-mpv
mpv ruby ruby-gem ruby-library
Last synced: 19 days ago
JSON representation
A Ruby library for controlling mpv processes.
- Host: GitHub
- URL: https://github.com/woodruffw/ruby-mpv
- Owner: woodruffw
- License: mit
- Created: 2017-01-13T03:06:23.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T22:33:56.000Z (over 3 years ago)
- Last Synced: 2024-04-25T13:01:32.329Z (6 months ago)
- Topics: mpv, ruby, ruby-gem, ruby-library
- Language: Ruby
- Homepage: https://rubygems.org/gems/mpv
- Size: 40 KB
- Stars: 15
- Watchers: 6
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mpv - ruby - Ruby interface. (Other)
README
ruby-mpv
========[![Gem Version](https://badge.fury.io/rb/mpv.svg)](https://badge.fury.io/rb/mpv)
A ruby library for controlling mpv processes.
### Installation
```bash
$ gem install mpv
```### Example
For full documentation, please see the
[RubyDocs](http://www.rubydoc.info/gems/mpv/).```ruby
# this will be called every time mpv sends an event back over the socket
def something_happened(event)
puts "look ma! a callback: #{event.to_s}"
endsession = MPV::Session.new # contains both a MPV::Server and a MPV::Client
session.callbacks << method(:something_happened)
session.get_property "pause"
session.command "get_version"
session.command "loadlist", "my_huge_playlist.txt", "append"
session.quit!
```