|
|
@@ -4,8 +4,8 @@ import android.content.Context
|
|
|
import android.util.Log
|
|
|
import androidx.multidex.MultiDex
|
|
|
import cn.jpush.android.api.JPushInterface
|
|
|
-import com.tencent.live2.V2TXLiveDef.V2TXLiveLogConfig
|
|
|
-import com.tencent.live2.V2TXLivePremier
|
|
|
+import com.tencent.rtmp.TXLiveBase
|
|
|
+import com.tencent.rtmp.TXLiveBaseListener
|
|
|
import com.yingyangfly.baselib.BaseApplication
|
|
|
|
|
|
class MyApplication : BaseApplication() {
|
|
|
@@ -20,14 +20,12 @@ class MyApplication : BaseApplication() {
|
|
|
super.onCreate()
|
|
|
JPushInterface.setDebugMode(true)
|
|
|
JPushInterface.init(this)
|
|
|
- val liveLogConfig = V2TXLiveLogConfig()
|
|
|
- liveLogConfig.enableConsole = true
|
|
|
- V2TXLivePremier.setLogConfig(liveLogConfig)
|
|
|
- V2TXLivePremier.setLicence(this, BuildConfig.TENCENT_LICENCEURL, BuildConfig.TENCENT_LICENCEKEY)
|
|
|
- V2TXLivePremier.setObserver(object : V2TXLivePremier.V2TXLivePremierObserver() {
|
|
|
- override fun onLicenceLoaded(result: Int, reason: String?) {
|
|
|
+ TXLiveBase.getInstance().setLicence(this, BuildConfig.TENCENT_LICENCEURL, BuildConfig.TENCENT_LICENCEKEY)
|
|
|
+ TXLiveBase.setListener(object : TXLiveBaseListener() {
|
|
|
+ override fun onLicenceLoaded(result: Int, reason: String) {
|
|
|
Log.i("wpp", "onLicenceLoaded: result:$result, reason:$reason")
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
}
|
|
|
}
|