节操播放器(实现代码)

一、倒依赖

compile 'cn.jzvd:jiaozivideoplayer:6.0.0'

二、在适配器的Xml布局中

<cn.jzvd.JZVideoPlayerStandard
  android:id="@+id/videoplayer" 
  android:layout_width="match_parent"
 android:layout_height="200dp"/>

三、在适配器中

  JZVideoPlayerStandard videoplayer = helper.getView(R.id.videoplayer);

//添加图片
        Glide.with(mContext).load(item.getCover()).into(videoplayer.thumbImageView);
        videoplayer.setUp(item.getMp4_url(),JZVideoPlayerStandard.SCREEN_LAYOUT_NORMAL,item.getTitle());

我用的是万能适配器,在用其他适配器的时候记得改参数什么的,此文章完全复制一个大神的,复制的目的是方便自己使用,特再次声明!

猜你喜欢

转载自blog.csdn.net/qq_42749901/article/details/81530121