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

Class: Net_MPD_Playback

Source Location: /Net_MPD-1.0.2/Net/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()
Set connection params
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::getErrorData()
Get the current error data
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 45]
API for the playback portion of Music Player Daemon commands

For controlling playback aspects of MPD



[ Top ]


Method Detail

getCurrentSong   [line 52]

array getCurrentSong( )

Gets the current song and related information
  • Return: of data
  • Access: public

[ Top ]

nextSong   [line 82]

bool nextSong( )

Continue to the next song
  • Access: public

[ Top ]

pause   [line 106]

bool pause( )

Pauses or plays the audio
  • Access: public

[ Top ]

play   [line 120]

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

Starts playback
  • Access: public

Parameters:

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

[ Top ]

playId   [line 132]

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

Starts playback by Id
  • Access: public

Parameters:

$song   $song   —  int, song Id

[ Top ]

previousSong   [line 93]

bool previousSong( )

Go back to the previous song
  • Access: public

[ Top ]

random   [line 147]

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 162]

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 177]

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 192]

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 69]

bool setCrossfade( $sec $sec)

Set crossfade between songs
  • Access: public

Parameters:

$sec   $sec   —  int, seconds to crossfade

[ Top ]

setVolume   [line 206]

true setVolume( $vol $vol)

Set volume
  • Access: public

Parameters:

$vol   $vol   —  int volume

[ Top ]

stop   [line 219]

bool stop( )

Stop playback
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:21:08 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.