Command omxplayer from your ruby application!
This gem uses the system call mkfifo
to pipe commands into omxplayer. You can play/pause, skip forward and backward and quit the video, as well as pipe in a filename to play.
It also inspects the output from a specialised ps
command to provide an estimate for how long the current video has been playing.
Add this line to your application's Gemfile:
gem 'omxplayer'
And then execute:
$ bundle
Or install it yourself as:
$ gem install omxplayer
# see omxplayer/keyboard_shortcuts.rb for all commands
# e.g. http://localhost/player/forward
get '/player/:action' do
Omxplayer.instance.action params[:action]
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request