Module: Pecari::Player
- Defined in:
- lib/pecari/player.rb
Class Method Summary collapse
- .exit ⇒ Object
- .launch(video) ⇒ Object
- .play_pause ⇒ Object
- .quit ⇒ Object
- .seek_backward ⇒ Object
- .seek_forward ⇒ Object
- .volume_down ⇒ Object
- .volume_up ⇒ Object
Class Method Details
.exit ⇒ Object
43 44 45 |
# File 'lib/pecari/player.rb', line 43 def self.exit Pecari::PidKiller.kill_all_omx_processes end |
.launch(video) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/pecari/player.rb', line 5 def self.launch(video) check_dependencies command = "#{Pecari::Env.display} && xterm -fullscreen -fg black -bg black -e omxplayer -o hdmi '#{video}' &" fork do exec command end end |
.play_pause ⇒ Object
13 14 15 16 |
# File 'lib/pecari/player.rb', line 13 def self.play_pause check_dependencies `#{Pecari::Env.display} && xdotool windowactivate #{omx_window} && xdotool key p` end |
.quit ⇒ Object
18 19 20 21 |
# File 'lib/pecari/player.rb', line 18 def self.quit check_dependencies `#{Pecari::Env.display} && xdotool windowactivate #{omx_window} && xdotool key q` end |
.seek_backward ⇒ Object
38 39 40 41 |
# File 'lib/pecari/player.rb', line 38 def self.seek_backward check_dependencies `#{Pecari::Env.display} && xdotool windowactivate #{omx_window} && xdotool key Left` end |
.seek_forward ⇒ Object
33 34 35 36 |
# File 'lib/pecari/player.rb', line 33 def self.seek_forward check_dependencies `#{Pecari::Env.display} && xdotool windowactivate #{omx_window} && xdotool key Right` end |