public static interface MediaPlayer.OnErrorListener
android.media.MediaPlayer.OnErrorListener |
在异步操作期间发生错误时要调用的回调的接口定义(其他错误将在方法调用时引发异常)。
Public methods |
|
---|---|
abstract boolean |
onError(MediaPlayer mp, int what, int extra) 被调用以指示错误。 |
boolean onError (MediaPlayer mp, int what, int extra)
被调用以指示错误。
Parameters | |
---|---|
mp |
MediaPlayer : the MediaPlayer the error pertains to |
what |
int : the type of error that has occurred:
|
extra |
int : an extra code, specific to the error. Typically implementation dependent.
|
Returns | |
---|---|
boolean |
True if the method handled the error, false if it didn't. Returning false, or not having an OnErrorListener at all, will cause the OnCompletionListener to be called. |