Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何获取缓存速度 如53kb/s #57

Open
DancingDuck opened this issue Sep 5, 2016 · 1 comment
Open

如何获取缓存速度 如53kb/s #57

DancingDuck opened this issue Sep 5, 2016 · 1 comment

Comments

@DancingDuck
Copy link

如题
private IMediaPlayer.OnInfoListener mInfoListener =
new IMediaPlayer.OnInfoListener() {
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) {
if (mOnInfoListener != null) {
mOnInfoListener.onInfo(mp, arg1, arg2);
}
switch (arg1) {
case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED:
mVideoRotationDegree = arg2;
Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2);
if (mRenderView != null)
mRenderView.setVideoRotation(arg2);
break;
}
return true;
}
};
这块CHANGED 状态都没调用
videoView.setOnInfoListener(new IMediaPlayer.OnInfoListener() {
@OverRide
public boolean onInfo(IMediaPlayer mp, int what, int extra) {
switch (what) {
case IMediaPlayer.MEDIA_INFO_BUFFERING_START:
statusChange(STATUS_LOADING);
break;
case IMediaPlayer.MEDIA_INFO_BUFFERING_END:
statusChange(STATUS_PLAYING);
break;
case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH:
//显示 下载速度
Log.d("IMediaPlayer downRate",""+extra);
break;
case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START:
statusChange(STATUS_PLAYING);
break;
}
return false;
}
});
显示速度这里就抓不到了。。。。。
onbuffer倒是一直能抓到 那个是百分比。。 如何拿到缓存的下载速度

@tcking
Copy link
Owner

tcking commented Sep 14, 2016

确实没MEDIA_INFO_NETWORK_BANDWIDTH的回调,试试ijkplayer最新版本看是否有这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants