public abstract class TransportController extends Object
Constructor and Description |
---|
TransportController() |
Modifier and Type | Method and Description |
---|---|
abstract int |
getBufferPercentage()
Retrieve amount, in percentage (0-100), that the media stream has been buffered
on to the local device.
|
abstract long |
getCurrentPosition()
Retrieve the current playback location in the media stream, in milliseconds.
|
abstract long |
getDuration()
Retrieve the total duration of the media stream, in milliseconds.
|
abstract int |
getTransportControlFlags()
Retrieve the flags for the media transport control buttons that this transport supports.
|
abstract boolean |
isPlaying()
Return whether the player is currently playing its stream.
|
abstract void |
pausePlaying()
Request that the player pause its playback and stay at its current position.
|
abstract void |
registerStateListener(TransportStateListener listener)
Start listening to changes in playback state.
|
abstract void |
seekTo(long pos)
Move to a new location in the media stream.
|
abstract void |
startPlaying()
Request that the player start its playback at its current position.
|
abstract void |
stopPlaying()
Request that the player stop its playback; it may clear its state in whatever
way is appropriate.
|
abstract void |
unregisterStateListener(TransportStateListener listener)
Stop listening to changes in playback state.
|
public abstract void registerStateListener(TransportStateListener listener)
public abstract void unregisterStateListener(TransportStateListener listener)
public abstract void startPlaying()
public abstract void pausePlaying()
public abstract void stopPlaying()
public abstract long getDuration()
public abstract long getCurrentPosition()
public abstract void seekTo(long pos)
pos
- Position to move to, in milliseconds.public abstract boolean isPlaying()
public abstract int getBufferPercentage()
public abstract int getTransportControlFlags()
TransportMediator.FLAG_KEY_MEDIA_PREVIOUS
,
TransportMediator.FLAG_KEY_MEDIA_REWIND
,
TransportMediator.FLAG_KEY_MEDIA_PLAY
,
TransportMediator.FLAG_KEY_MEDIA_PLAY_PAUSE
,
TransportMediator.FLAG_KEY_MEDIA_PAUSE
,
TransportMediator.FLAG_KEY_MEDIA_STOP
,
TransportMediator.FLAG_KEY_MEDIA_FAST_FORWARD
,
TransportMediator.FLAG_KEY_MEDIA_NEXT