Project

mpv

0.01
No commit activity in last 3 years
No release in over 3 years
A library for creating and controlling mpv instances.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

ruby-mpv

Gem Version

A ruby library for controlling mpv processes.

Installation

$ gem install mpv

Example

For full documentation, please see the RubyDocs.

# 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}"
end

session = 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!