Open ozdroid opened 5 years ago
请问作者,我想获得缓冲时候的网速,怎么实现。我看到你demo里面DefaultMediaController的显示网速的回调没有被执行。
` @Override public boolean onInfo(GiraffePlayer giraffePlayer, 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: //显示 下载速度 // Toaster.show("download rate:" + extra); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: statusChange(STATUS_PLAYING); break;
default: } return true; }`
可以重载onInfo,自己实现显示逻辑
您好,我发现个问题,当播放视频快进后播放加载会很慢(播放一下有加载,播放一下又加载),重新切到0开始播放又很流畅
请问作者,我想获得缓冲时候的网速,怎么实现。我看到你demo里面DefaultMediaController的显示网速的回调没有被执行。
` @Override public boolean onInfo(GiraffePlayer giraffePlayer, 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: //显示 下载速度 // Toaster.show("download rate:" + extra); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: statusChange(STATUS_PLAYING); break;