Module: Anyplayer

Defined in:
lib/anyplayer/selector.rb,
lib/anyplayer.rb,
lib/anyplayer/version.rb

Overview

The Selector is the tool that will find you the currently running player on your platform

Example:

selector = Anyplayer::Selector.new
selector.verbose = true
player = selector.player

Needs the PLAYERS constant to contain a list of players.

Defined Under Namespace

Modules: CommandLine Classes: Amarok, ItunesMac, ItunesWindows, Mpd, Noplayer, Player, RdioMac, Rhythmbox, Selector, SpotifyMac, Xmms2

Constant Summary collapse

PLAYERS =

Ordering of the players should put the most-used players and the fastest to test at the top.

iTunes Windows has been placed at the top because of some linux false positives. github.com/sunny/anyplayer/issues/8

%w(
  itunes_windows
  rhythmbox
  mpd
  xmms2
  amarok
  itunes_mac
  spotify_mac
  rdio_mac
)
VERSION =
"1.1.5"

Class Method Summary collapse

Class Method Details

.launchedObject



22
23
24
# File 'lib/anyplayer.rb', line 22

def self.launched
  Selector.new.player
end