基于ExoPlayer的ExoVideoView
前言 本人之前写过一篇名为基于ExoPlayer的ExoPlayerVideoView的文章,近日发现竟然被盗用了。 今日再次发布本文是因为ExoVideoView升级啦,新版的更好用,支持更多功能,支持自定义controller。特性 1.自动处理音频焦点。 2.根据传感器自动处理方向。 3.手势支持。 4.多清晰度选择支持。 5.为控制器添加自定义布局. 6.调整显示大小。 7.自定义controller。 使用 ExoVideoView 1.依赖 最简单的方式是加入gradle依赖。请确认在工程的build.gradle中添加了JCenter和google()。 repositories { jcenter() google() } 然后在你的项目中添加如下代码: implementation 'com.jarvanmo:exoplayerview:2.0.8' 2.在xml中定义 在xml中使用 ExoVideoView: <com.jarvanmo.exoplayerview.ui.ExoVideoView android:id="@+id/videoView" and...






