tcking / GiraffePlayer2

out of the box android video player(support lazy load, ListView/RecyclerView and hight performance)
Apache License 2.0
377 stars 110 forks source link

缓冲进度和网速 #148

Open ozdroid opened 5 years ago

ozdroid commented 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;
}`
tcking commented 5 years ago

可以重载onInfo,自己实现显示逻辑

377376701 commented 5 years ago

您好,我发现个问题,当播放视频快进后播放加载会很慢(播放一下有加载,播放一下又加载),重新切到0开始播放又很流畅