效果图
![](https://img.haomeiwen.com/i22442017/bc8797cb92bdcfe3.png)
一 . 添加依赖
在build.gradle下的dependencies中添加
implementation 'cn.jzvd:jiaozivideoplayer:7.0.3'
在build.gradle下的android中添加
android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
二. 布局控件
<cn.jzvd.JzvdStd
android:id="@+id/video_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
三. 属性
Glide.with(context).load(videolist.get(position).getImage_url()).into(holder.video_view.thumbImageView);
holder.video_view.setUp(videolist.get(position).getVideo_url(), videolist.get(position).getTheme());
播放:
gifUtil.setGif(gifDrawable);//gif图片显示
暂停及继续:
gifUtil.stop();//暂停
gifUtil.start();//继续
网友评论