(1) 需求
因项目需要,前端需要实现https视频播放功能,能够支持全屏缩放、进度拖拽、重力感应横竖屏切换,故采用该框架。JiaoZiVideoPlayer前一版为JieCaoVideoPlayer,如果项目中不需要支持https,用上一个版本也可以。使用上也就是前一版本setup()会有返回值,当其返回true时加载缩略图即可。
(2)使用
①在buid.gradle中添加依赖
compile 'cn.jzvd:jiaozivideoplayer:6.2.4'
②xml中添加布局
<cn.jzvd.JZVideoPlayerStandard android:id="@+id/videoplayer" android:layout_width="match_parent" android:layout_height="200dp" tools:layout_editor_absoluteY="0dp" tools:layout_editor_absoluteX="8dp"