public static interface Player.OnPlaybackStateChangeListener
限定符和类型 | 方法和说明 |
---|---|
void |
onError(int errorCode,
java.lang.String errorMessage)
当播放器发生错误时会回调该方法。
|
void |
onPause(int playProgress,
long updateTime)
当播放器的状态变为 “暂停” 时会回调该方法。
|
void |
onPlay(boolean stalled,
int playProgress,
long playProgressUpdateTime)
当播放器的状态变为 “播放中” 时会回调该方法。
|
void |
onStop()
当播放器的状态变为 “停止” 时会回调该方法。
|
void onPlay(boolean stalled, int playProgress, long playProgressUpdateTime)
stalled
- 当前播放器是否处于 stalled 状态。当缓冲区没有足够的数据继续播放时,
该参数为 true,否则为 falseplayProgress
- 当前的播放进度playProgressUpdateTime
- 播放进度的更新时间void onPause(int playProgress, long updateTime)
playProgress
- 当前的播放进度updateTime
- 播放进度的更新时间void onStop()
void onError(int errorCode, java.lang.String errorMessage)
errorCode
- 错误码errorMessage
- 错误信息