mediaPlayer.setEventListener(new MediaPlayer.EventListener() {
@Override
public void onEvent(MediaPlayer.Event event) {
if (event.type == MediaPlayer.Event.Buffering) {
GoockrLog.Loge("aaaaaaaaaaaaaaaa Buffering " + event.getBuffering());
}
}
});
event.getBuffering() 就是缓冲百分比 100代表缓冲完成
配合
ArrayList<String> options = new ArrayList<String>();
// options.add(":file-caching=1500");
options.add("--file-caching=10000");//文件缓存
options.add("--network-caching=10000");//网络缓存
options.add("--live-caching=10000");//直播缓存
options.add("--sout-mux-caching=10000");//输出缓存
// options.add(":codec=mediacodec,iomx,all");
// options.add(":demux=h264");
// options.add("--network-caching=10000");
libVLC = new LibVLC(context, options);
设置缓冲时间
如需要VLC AAR 请移步 https://download.csdn.net/download/u013241923/10588295
VLC3.0.0编译so文件下载,基本处于最新版本,2018.7月编译成功的,已经编译成aar,里面也有里面也有一个将 v7,v8,86-64合起来的aar