|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.support.v4.media.TransportController
public abstract class TransportController
Base interface to controlling a media transport. This is the interface for implementing things like on-screen controls: it allows them to request changes in playback, retrieve the current playback state, and monitor for changes to the playback state.
Constructor Summary | |
---|---|
TransportController()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransportController()
Method Detail |
---|
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |