Net_MPD
[ class tree: Net_MPD ] [ index: Net_MPD ] [ all elements ]

Class: Net_MPD_Playback

Source Location: /Net_MPD-0.1.0dev1/MPD/Playback.php

Class Overview

Net_MPD_Common
   |
   --Net_MPD_Playback

API for the playback portion of Music Player Daemon commands


Author(s):

Version:

  • CVS: $ID:$

Copyright:

  • 2006 Graham Christensen

Methods


Inherited Variables

Inherited Methods

Class: Net_MPD_Common

Net_MPD_Common::__construct()
Placeholder
Net_MPD_Common::connect()
Connect to MPD
Net_MPD_Common::disconnect()
Disconnect from MPD
Net_MPD_Common::getCommands()
Used to discover which commands are available
Net_MPD_Common::getErrors()
A method to access errors
Net_MPD_Common::getNotCommands()
Used to discover commands that are not available
Net_MPD_Common::getStats()
Get various statistics about the MPD server
Net_MPD_Common::getStatus()
Get the status of the MPD server
Net_MPD_Common::isConnected()
Check connection status
Net_MPD_Common::parseOutput()
Parse MPD output on a line-by-line basis creating output that is easy to work with
Net_MPD_Common::ping()
Ping the MPD server to keep the connection running
Net_MPD_Common::read()
Read data from the socket
Net_MPD_Common::runCommand()
Run command
Net_MPD_Common::write()
Write data to the socket

Class Details

[line 34]
API for the playback portion of Music Player Daemon commands

For controlling playback aspects of MPD



[ Top ]


Method Detail

nextSong   [line 58]

bool nextSong( )

Continue to the next song
  • Access: public

[ Top ]

pause   [line 88]

bool pause( )

Pauses or plays the audio
  • Access: public

[ Top ]

play   [line 103]

bool play( [$song $song = 0])

Starts playback
  • Access: public

Parameters:

$song   $song   —  int, song position in playlist to start playing at

[ Top ]

playId   [line 118]

bool playId( [$song $song = 0])

Starts playback by Id
  • Access: public

Parameters:

$song   $song   —  int, song Id

[ Top ]

previousSong   [line 73]

bool previousSong( )

Go back to the previous song
  • Access: public

[ Top ]

random   [line 135]

bool random( [$on $on = false])

Sets 'random' mode on/off
  • Access: public

Parameters:

$on   $on   —  bool true or false, for random or not (respectively),

[ Top ]

repeat   [line 152]

true repeat( [$on $on = false])

Sets 'random' mode on/off
  • Access: public

Parameters:

$on   $on   —  bool true or false, for repeat or not (respectively),

[ Top ]

seek   [line 169]

bool seek( $song $song, $time $time)

Seek a position in a song
  • Access: public

Parameters:

$song   $song   —  int song position in playlist
$time   $time   —  int time in seconds to seek to

[ Top ]

seekId   [line 186]

bool seekId( $song $song, $time $time)

Seek a position in a song
  • Access: public

Parameters:

$song   $song   —  int song Id
$time   $time   —  int time in seconds to seek to

[ Top ]

setCrossfade   [line 43]

bool setCrossfade( $sec $sec)

Set crossfade between songs
  • Access: public

Parameters:

$sec   $sec   —  int, seconds to crossfade

[ Top ]

setVolume   [line 202]

true setVolume( $vol $vol)

Set volume
  • Access: public

Parameters:

$vol   $vol   —  int volume

[ Top ]

stop   [line 216]

bool stop( )

Stop playback
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:48:00 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.