Fields Summary |
---|
public static final String | FEATURE_SET_CONTENT |
public static final String | FEATURE_SET_NEXT_CONTENT |
public static final String | FEATURE_PLAY |
public static final String | FEATURE_PAUSE |
public static final String | FEATURE_NEXT |
public static final String | FEATURE_PREVIOUS |
public static final String | FEATURE_SEEK_TO |
public static final String | FEATURE_STOP |
public static final int | STATE_ERROR |
public static final int | STATE_INITThe state MediaPlayerManager starts in before any action has been
performed. |
public static final int | STATE_PREPARINGIndicates the source has been set and it is being prepared/buffered
before starting playback. |
public static final int | STATE_READYThe media is ready and playback can be started. |
public static final int | STATE_PLAYINGThe media is currently playing. |
public static final int | STATE_PAUSEDThe media is currently paused. |
public static final int | STATE_STOPPEDThe service has been stopped and cannot be started again until a new
source has been set. |
public static final int | STATE_ENDEDThe playback has reached the end. It can be restarted by calling play(). |
protected List | mFeatures |
protected List | mListeners |
Methods Summary |
---|
public long | getDuration()
// throw new
// UnsupportedOperationException("getDuration is not supported.");
return -1;
|
public java.util.List | getFeatures()
return mFeatures;
|
public int | getPlayState()
// throw new
// UnsupportedOperationException("getPlayState is not supported.");
return 0;
|
public long | getSeekPosition()
// throw new
// UnsupportedOperationException("getSeekPosition is not supported.");
return -1;
|
protected void | initFeatures(android.os.Bundle params)
mFeatures.add(FEATURE_SET_CONTENT);
|
public void | onCreate(android.os.Bundle params)
// Do nothing by default
|
public void | onDestroy()
// Do nothing by default
|
public boolean | onNext()
// throw new UnsupportedOperationException("next is not supported.");
return false;
|
public boolean | onPause()
// throw new UnsupportedOperationException("pause is not supported.");
return false;
|
public boolean | onPlay()
// TODO consider making these log warnings instead of crashes (or
// Log.wtf)
// throw new UnsupportedOperationException("play is not supported.");
return false;
|
public boolean | onPrevious()
// throw new
// UnsupportedOperationException("previous is not supported.");
return false;
|
public boolean | onSeekTo(int time)
// throw new UnsupportedOperationException("seekTo is not supported.");
return false;
|
public boolean | onStop()
// throw new UnsupportedOperationException("stop is not supported.");
return false;
|
protected void | pushOnBufferingUpdate(int percent)
for (Listener listener : mListeners) {
listener.onBufferingUpdate(percent);
}
|
protected void | pushOnError(int type, int extra, android.os.Bundle extras, java.lang.Throwable error)
for (Listener listener : mListeners) {
listener.onError(type, extra, extras, error);
}
|
protected void | pushOnFocusLost()
for (Listener listener : mListeners) {
listener.onFocusLost();
}
|
protected void | pushOnNextStarted()
for (Listener listener : mListeners) {
listener.onNextStarted();
}
|
protected void | pushOnStateChanged(int newState)
for (Listener listener : mListeners) {
listener.onStateChanged(newState);
}
|
public void | registerListener(com.android.onemedia.playback.Renderer$Listener listener)
if (!mListeners.contains(listener)) {
mListeners.add(listener);
}
|
public abstract void | setContent(android.os.Bundle request)
|
public void | setNextContent(android.os.Bundle request)
throw new UnsupportedOperationException("setNextContent() is not supported.");
|
public void | unregisterListener(com.android.onemedia.playback.Renderer$Listener listener)
mListeners.remove(listener);
|