Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

DCOP::Amarok::Player
Perl extension to speak to an amaroK player object via system's DCOP.

DCOP::Amarok::Player - Perl extension to speak to an amaroK player object via system's DCOP.


NAME

DCOP::Amarok::Player - Perl extension to speak to an amaroK player object via system's DCOP.


SYNOPSIS


        use DCOP::Amarok::Player;

        $player = DCOP::Amarok::Player->new();

        

        $player->playPause();

        print $player->getRandom();


DESCRIPTION

This module is a quick hack to get an interface between perl and Kde's DCOP, since Kde3.4's perl bindings are disabled. This suite talks to 'dcop'. DCOP::Amarok::Player talks directly to the player object of amaroK.


EXPORT

None by default.


METHODS

new()
Constructor. No arguments needed. If the program will be run remotely, the need for 'user => ``myusername''' arises.

album()
Returns the album name of currently playing song.

artist()
Returns the artist performing currently playing song.

title()
Returns the title of currently playing song.

playPause()
play()
pause()
stop()
next()
prev()
getRandom()
Returns the status of the Shuffle play mode.

toggleRandom()
Toggles the Random play mode. Returns the new state.

mute()
volumeUp()
volumeDown()
getVolume()
Returns the volume level.

status()
Returns the playing status of amaroK. 0: Stopped, 1: Paused, 2: Playing

track()
Returns the track number of the song that is currently being played.

totalTime()
Returns in MM:SS the total playing time of the song that is currently being played.

currentTime()
Returns in MM:SS the elapsed time of the song that is currently being played.

totaltimesecs()
Returns in seconds the total playing time of the song that is currently being played.

trackCurrentTime()
Returns in seconds the elapsed time of the song that is currently being played.

fwd()
Fast forwards 5 seconds the song.

rew()
Rewinds 5 seconds the song.

lyrics()
Returns the lyrics of the song that is currently being played.

interfaces()
Returns the interfaces registered with amaroK.

functions()
Returns functions available to amaroK.

dynamicModeStatus()
Returns status.

equalizerEnabled()
Returns whether it is enabled or not.

isPlaying()
randomModeStatus()
repeatPlaylistStatus()
repeatTrackStatus()
sampleRate()
score()
trackPlayCounter()
bitrate()
comment()
coverImage()
Returns the encoded image url.

encodedURL()
Returns the encoded URL of the currently playing track.

engine()
Returns which engine is being used.

genre()
lyricsByPath()
nowPlaying()
Returns the title.

path()
setContextStyle($style)
type()
year()
configEqualizer()
enableDynamicMode($enable)
Bool.

enableOSD($enable)
Bool.

enableRepeatPlaylist($enable)
Bool.

enableRandomMode($enable)
Bool.

enableRepeatTrack($enable)
Bool.

mediaDeviceMount()
mediaDeviceUmount()
queueForTransfer()
seek($secs)
seekRelative($secs)
setEqualizer(@args)
11 values.

setEqualizerEnabled($enable)
Bool.

setEqualizerPreset($url)
setLyricsByPath($url, $lyrics)
setScore($score)
setScoreByPath($url, $score)
setVolume($volume)
showBrowser($enable)
showOSD()
transferDeviceFiles()
transferCliArgs(@args)
elapsedsecs()
Provided for backwards compatibility. Use trackCurrentTime().

elapsed()
Provided for backwards compatibility. Use currentTime().

totaltimesecs()
Provided for backwards compatibility. Use trackTotalTime().

totaltime()
Provided for backwards compatibility. Use totalTime().

vol()
Provided for backwards compatibility. Use getVolume().

volUp()
Provided for backwards compatibility. Use volumeUp().

volDn()
Provided for backwards compatibility. Use volumeDown().


AUTHOR

Juan C. Muller, <jcmuller@gmail.com>


COPYRIGHT AND LICENSE

Copyright 2005 by Juan C. Muller

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy