作者 杨谦

1.视频切换使用Exo核心

@@ -112,6 +112,10 @@ dependencies { @@ -112,6 +112,10 @@ dependencies {
112 112
113 //完整版引入 113 //完整版引入
114 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer:v8.1.5-jitpack' 114 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer:v8.1.5-jitpack'
  115 + //是否需要 ExoPlayer 模式
  116 +// implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-exo_player2:v8.1.5-jitpack'
  117 + //更多 ijk 的编码支持
  118 +// implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-ex_so:v8.1.5-jitpack'
115 //权限 119 //权限
116 implementation 'com.github.tbruyelle:rxpermissions:0.12' 120 implementation 'com.github.tbruyelle:rxpermissions:0.12'
117 121
@@ -10,10 +10,12 @@ import com.kingja.loadsir.core.LoadSir @@ -10,10 +10,12 @@ import com.kingja.loadsir.core.LoadSir
10 import com.scwang.smart.refresh.footer.ClassicsFooter 10 import com.scwang.smart.refresh.footer.ClassicsFooter
11 import com.scwang.smart.refresh.header.ClassicsHeader 11 import com.scwang.smart.refresh.header.ClassicsHeader
12 import com.scwang.smart.refresh.layout.SmartRefreshLayout 12 import com.scwang.smart.refresh.layout.SmartRefreshLayout
  13 +import com.shuyu.gsyvideoplayer.player.PlayerFactory
13 import com.tencent.map.geolocation.TencentLocationManager 14 import com.tencent.map.geolocation.TencentLocationManager
14 import com.tencent.smtt.sdk.QbSdk 15 import com.tencent.smtt.sdk.QbSdk
15 import com.tencent.smtt.sdk.TbsDownloader 16 import com.tencent.smtt.sdk.TbsDownloader
16 import com.umeng.commonsdk.UMConfigure 17 import com.umeng.commonsdk.UMConfigure
  18 +import tv.danmaku.ijk.media.exo2.Exo2PlayerManager
17 import kotlin.properties.Delegates 19 import kotlin.properties.Delegates
18 20
19 /** 21 /**
@@ -57,6 +59,7 @@ open class BaseApplication : Application() { @@ -57,6 +59,7 @@ open class BaseApplication : Application() {
57 TbsDownloader.startDownload(this); 59 TbsDownloader.startDownload(this);
58 } 60 }
59 initUmeng() 61 initUmeng()
  62 + PlayerFactory.setPlayManager(Exo2PlayerManager::class.java)
60 } 63 }
61 64
62 fun initUmeng() { 65 fun initUmeng() {