![]()
|
"DTD/xhtml1-strict.dtd">
add
add_url
balance=
clear
connect
delete
eject
eq_win_toggle
get_balance
get_eq
get_eq_band
get_eq_preamp
get_info
get_main_volume
get_playlist_file
get_playlist_time
get_playlist_title
get_skin
get_stereo_volume
get_version
initialize
ins_url
is_eq_win?
is_main_win?
is_pl_win?
is_repeat?
is_running?
is_shuffle?
jump_to_time
main_win_toggle
new
pause
paused?
pl_win_toggle
play
play_pause
playing?
playlist
playlist_next
playlist_pos
playlist_prev
quit
set_balance
set_eq
set_eq_band
set_eq_preamp
set_main_volume
set_playlist_pos
set_skin
set_stereo_volume
show_prefs
stop
time
time=
toggle_aot
toggle_repeat
toggle_shuffle
Create a new Xmms::Remote object. Examples: # standard setup (one running copy of XMMS) remote = Xmms::Remote.new # bind to the third instance of XMMS (for you nutcases who run # multiple instances of XMMS) session = 2 remote = Xmms::Remote.new session
Create a new Xmms::Remote object. Examples: # standard setup (one running copy of XMMS) remote = Xmms::Remote.new # bind to the third instance of XMMS (for you nutcases who run # multiple instances of XMMS) session = 2 remote = Xmms::Remote.new session
Xmms::Remote constructor. This function is currently just a placeholder.
Play current song. Example: remote.play
Pause current song. Example: remote.pause
Stop current song. Example: remote.stop
XMMS eject button (toggle add file dialog). Example: remote.eject
Quit XMMS. Example: remote.quit
Toggle Play/Pause status. Example: remote.play_pause
Is XMMS playing? Examples: puts 'playing' if remote.is_playing? puts 'playing' if remote.playing?
Is XMMS paused? Examples: puts 'paused' if remote.is_paused? puts 'paused' if remote.paused?
Return the current playlist. Example: remote.playlist.each { |i| title, file = i puts "'#{title}', #{file}" }
Add one or more songs to the playlist. Examples: # replace the current playlist with one song enqueue = false remote.add 'path/to/cool_song.mp3', enqueue # add several files to the current playlist files = %w{song01.mp3 song02.mp3 song03.mp3 song04.mp3 song05.mp3} remote.add *files
Add a URL to the current playlist. Examples: remote.add_url 'http://www.hhmecca.net/cool_song.mp3'
Insert a URL into the current playlist. Examples: # add a url after the 45th element in the playlist remote.ins_url 'http://www.hhmecca.net/cool_song.mp3', 45
Delete the Nth element of the current playlist. Examples: remote.delete 26 # delete the 26th playlist element
Clear the current playlist. Examples: remote.clear
Get the current playlist position. Examples: song_number = remote.position song_number = remote.get_pos song_number = remote.pos
Set the current playlist position. Examples: remote.pos = 45 remote.position = 45 remote.set_pos 45
Get the file path of a song. Examples: # get the path of the current song path = remote.file # get the path of song 23 in the playlist path = remote.file 23
Get the title of a song. Examples: # get the title of the current song path = remote.file # get the title of song 23 in the playlist path = remote.file 23
Get the "playlist" time of a song. Examples: # get the "playlist" time of the current song time = remote.playlist_time # get the "playlist" time of song 23 in the playlist time = remote.playlist_time 23
Get the output time of the current song. Examples: time = remote.time time = remote.output_time
Jump to a specific time of the current song. Examples: remote.jump 45 # jump 45 seconds into the current song remote.time = 45 # jump 45 seconds into the current song
Jump to a specific time of the current song. Examples: remote.jump 45 # jump 45 seconds into the current song remote.time = 45 # jump 45 seconds into the current song
Go to the previous song. Example: remote.prev
Go to the next song. Example: remote.next
Get the stereo volume level. Example: left, right = remote.get_stereo_volume left, right = remote.stereo_volume
Get the main volume level. Example: vol = remote.volume vol = remote.main_volume vol = remote.get_main_volume
Set the stereo volume level. Examples: remote.set_stereo_volume left, right stereo_volume = [10, 0] remote.set_stereo_volume *stereo_volume
Set the main volume level. Examples: remote.volume = 23 remote.main_volume = 23 remote.set_main_volume 23
Get the balance level. Note: as of XMMS 1.2.6 xmms_remote_get_balance() does not appear to work correctly when XMMS is paused or stopped, so this function doesn't either. Example: vol = remote.balance
Set the balance level. Note: as of XMMS 1.2.6 xmms_remote_set_balance() does not appear to work correctly when XMMS is paused or stopped, so this function doesn't either. Example: remote.balance = 23
Set the balance level. Note: as of XMMS 1.2.6 xmms_remote_set_balance() does not appear to work correctly when XMMS is paused or stopped, so this function doesn't either. Example: remote.balance = 23
Get the current skin file. Examples: skin = remote.get_skin skin = remote.skin
Set the current skin file. Examples: remote.set_skin 'path/to/cool_skin.zip' remote.skin = 'path/to/cool_skin.zip'
Set the visibility of the main window. Examples: remote.set_main_toggle true remote.main_visible = true remote.main = true
Set the visibility of the playlist window. Examples: remote.set_playlist_toggle true remote.playlist_visible = true remote.pl_visible = true remote.pl = true
Set the visibility of the equalizer window. Examples: remote.set_equalizer_toggle true remote.equalizer_visible = true remote.eq_visible = true remote.eq = true
Get the visibility of the main window. Examples: puts 'main window visible' if remote.main_visible? puts 'main window visible' if remote.main?
Get the visibility of the playlist window. Examples: puts 'playlist window visible' if remote.playlist_visible? puts 'playlist window visible' if remote.pl_visible? puts 'playlist window visible' if remote.playlist? puts 'playlist window visible' if remote.pl?
Get the visibility of the equalizer window. Examples: puts 'equalizer window visible' if remote.equalizer_visible? puts 'equalizer window visible' if remote.eq_visible? puts 'equalizer window visible' if remote.equalizer? puts 'equalizer window visible' if remote.eq?
Show the preferences dialog. Examples: remote.show_prefs remote.prefs
Set the "always on top" flag. Examples: remote.set_always_on_top true remote.always_on_top = true remote.aot = true
Toggle the repeat flag. Example: remote.toggle_repeat
Is the repeat flag set? Examples: puts 'repeating' if remote.is_repeating? puts 'repeating' if remote.repeating? puts 'repeating' if remote.is_repeat? puts 'repeating' if remote.repeat?
Toggle the shuffle flag. Example: remote.toggle_shuffle
Is the shuffle flag set? Examples: puts 'shuffling' if remote.is_shuffling? puts 'shuffling' if remote.shuffling? puts 'shuffling' if remote.is_shuffle? puts 'shuffling' if remote.shuffle?
Get the equalizer settings. This method returns an array. The first element in the array is the preamp setting, and the second element in the array is an 10 element array of band settings. So the result would look something like this: [1.0, [0.0, -0.5, 0.9, 0.0, 0.0, 0.0, 0.2, 0.5, -0.1, 0.0]] Examples: preamp, bands = remote.get_equalizer eq = remote.eq
Set the equalizer values. This method takes either a preamp value and 10 band values, or a preamp value and an array of band values. Examples: bands = [0.0, -0.5, 0.9, 0.0, 0.0, 0.0, 0.2, 0.5, -0.1, 0.0] remote.set_equalizer 0.0, bands remote.set_eq 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
Get the equalizer preamp value. Examples: preamp = remote.get_preamp preamp = remote.preamp
Set the equalizer preamp value. Examples: remote.set_preamp 0.5 remote.preamp = 0.5
Get an equalizer band value. Note that legal band indexes range from 0 to 9 instead of 1 to 10. Examples: band = remote.get_band 2 band = remote.band 8
Set an equalizer band value. Note that legal band indexes range from 0 to 9 instead of 1 to 10. Example: remote.set_band 2, 0.5
Get various about the current song. Returns an array of bitrate, frequency, and numchannels, respectively. Examples: info = remote.info rate, freq, nch = remote.info
Is XMMS running? Examples: puts 'xmms is running' if remote.is_running? puts 'xmms is running' if remote.running?
Get the version of XMMS. Note that this is separate from Xmms::Remote::VERSION, which is the version of Xmms-Ruby. Examples: version = remote.version version = remote.get_version |