Created
August 7, 2013 08:45
-
-
Save yaoxinghuo/6172350 to your computer and use it in GitHub Desktop.
Android 里的 MediaPlayer 因为缓冲停止了播放,显示提示
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mp.setOnInfoListener(new OnInfoListener() { | |
@Override | |
public boolean onInfo(MediaPlayer mp, int what, int extra) { | |
if (what == MediaPlayer.MEDIA_INFO_BUFFERING_START) { | |
loadingDialog.setVisibility(View.VISIBLE); | |
} else if (what == MediaPlayer.MEDIA_INFO_BUFFERING_END) { | |
loadingDialog.setVisibility(View.GONE); | |
} | |
return false; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment