Class: RhythmboxPlayer
- Inherits:
-
MusicPlayer
- Object
- MusicPlayer
- RhythmboxPlayer
- Defined in:
- lib/sonice-players/rhythmbox.rb
Instance Method Summary collapse
- #current_track ⇒ Object
- #launched? ⇒ Boolean
- #next ⇒ Object
- #playpause ⇒ Object
- #prev ⇒ Object
- #voldown ⇒ Object
- #volume ⇒ Object
- #volup ⇒ Object
Instance Method Details
#current_track ⇒ Object
26 27 28 |
# File 'lib/sonice-players/rhythmbox.rb', line 26 def current_track tell_to 'print-playing' end |
#launched? ⇒ Boolean
30 31 32 |
# File 'lib/sonice-players/rhythmbox.rb', line 30 def launched? %x(rhythmbox-client --no-start --print-playing 2>/dev/null).rstrip != "" end |
#next ⇒ Object
10 11 12 |
# File 'lib/sonice-players/rhythmbox.rb', line 10 def next tell_to 'next' end |
#playpause ⇒ Object
2 3 4 |
# File 'lib/sonice-players/rhythmbox.rb', line 2 def playpause tell_to 'play-pause' end |
#prev ⇒ Object
6 7 8 |
# File 'lib/sonice-players/rhythmbox.rb', line 6 def prev tell_to 'previous' end |
#voldown ⇒ Object
14 15 16 |
# File 'lib/sonice-players/rhythmbox.rb', line 14 def voldown tell_to 'volume-down' end |
#volume ⇒ Object
22 23 24 |
# File 'lib/sonice-players/rhythmbox.rb', line 22 def volume tell_to 'print-volume' end |
#volup ⇒ Object
18 19 20 |
# File 'lib/sonice-players/rhythmbox.rb', line 18 def volup tell_to 'volume-up' end |