Ejemplo n.º 1
0
 /**
  * Gets the length of the current track
  * 
  * @author Ross Carlson
  * @version 2/9/05
  * @since 2/9/05
  * @param return returns the amount of time remaining in seconds
  */
 function getCurrentTrackLength()
 {
     return getCurTrackLength();
 }
Ejemplo n.º 2
0
/**
 * Returns how long is left in the current track (in seconds)
 * 
 * @author Ross Carlson
 * @version 2/9/05
 * @since 2/9/05
 * @return Returns the name of the current playing track
 */
function getCurTrackRemaining()
{
    global $jbArr;
    // First let's get the full status from the player
    $status = getATStatus();
    // Now let's get the location
    $cur = getCurTrackLocation();
    // Now let's get the length
    $length = getCurTrackLength();
    $remain = $length - $cur;
    // Now let's return
    return $remain;
}
Ejemplo n.º 3
0
/**
 * Returns how long is left in the current track (in seconds)
 * 
 * @author Ross Carlson
 * @version 2/9/05
 * @since 2/9/05
 * @return Returns the name of the current playing track
 */
function getCurTrackRemaining()
{
    global $jbArr;
    $length = getCurTrackLength();
    $cur = getCurTrackLocation();
    $val = $length - $cur + 2;
    writeLogData("messages", "Winamp3: Returning time remaining: " . $val);
    return $val;
}
Ejemplo n.º 4
0
/**
 * Returns how long is left in the current track (in seconds)
 * 
 * @author Ross Carlson
 * @version 2/9/05
 * @since 2/9/05
 * @return Returns the name of the current playing track
 */
function getCurTrackRemaining()
{
    global $jbArr;
    // Ok, we'll have to guess this, we'll need to get the full path of the track and assume that it just started playing
    return getCurTrackLength();
}
Ejemplo n.º 5
0
/**
 * Returns how long is left in the current track (in seconds)
 * 
 * @author Ross Carlson
 * @version 4/9/05
 * @since 4/9/05
 * @return Returns the name of the current playing track
 */
function getCurTrackLocation()
{
    global $jbArr;
    // let's connect to the player
    $jukebox = new slim($jbArr[$_SESSION['jb_id']]['server'], $jbArr[$_SESSION['jb_id']]['port']);
    // Now let's make sure it's playing
    if (trim(str_replace("playlist tracks ", "", $jukebox->execute("playlist tracks ?"))) == 0) {
        return;
    }
    return getCurTrackLength() - $jukebox->get("remaining");
}