sk.baka.ambient.playerservice
Interface IPlayerListener

All Known Implementing Classes:
PlayerController

public interface IPlayerListener

Listens for events produced by the PlayerService. Events are invoked in the message handler loop.

Author:
Martin Vysny

Method Summary
 void buffered(byte percent)
          How much data is currently buffered.
 void radioNewTrack(String name)
          Track was switched while a radio is playing.
 void started(String file, int duration, int currentPosition)
          Player started to play the song.
 void stopped(String error, boolean errorMissing, TrackOriginEnum origin)
           The playback was stopped (not paused).
 

Method Detail

stopped

void stopped(String error,
             boolean errorMissing,
             TrackOriginEnum origin)

The playback was stopped (not paused). This may be caused by:

but never by

Parameters:
error - if not null then the player stopped because of an unspecified error.
errorMissing - if true then the error occurred because the file is missing.
origin - the track origin

started

void started(String file,
             int duration,
             int currentPosition)
Player started to play the song. Invoked shortly after the playback order is issued.

Parameters:
file - the file
duration - the file duration in ms. May be 0 if the stream is endless or the duration is not known.
currentPosition - current playback position, in ms.

radioNewTrack

void radioNewTrack(String name)
Track was switched while a radio is playing.

Parameters:
name - the new track name.

buffered

void buffered(byte percent)
How much data is currently buffered. Applies only to online content, invoked with 0 when playing local tracks.

Parameters:
percent - how much the buffer is filled up. 0-100.


Copyright © 2007-2008. All Rights Reserved.