|
|
@@ -3,8 +3,8 @@ package com.adealink.weparty.effect
|
|
|
import android.content.Context
|
|
|
import android.content.res.TypedArray
|
|
|
import android.graphics.Matrix
|
|
|
+import android.os.Bundle
|
|
|
import android.util.AttributeSet
|
|
|
-import android.util.Log
|
|
|
import android.view.ViewTreeObserver
|
|
|
import android.widget.FrameLayout
|
|
|
import android.widget.ImageView
|
|
|
@@ -15,10 +15,10 @@ import com.adealink.frame.download.manager.downloadManager
|
|
|
import com.adealink.frame.download.task.TaskPriority
|
|
|
import com.adealink.frame.effect.data.INFINITE_LOOP
|
|
|
import com.adealink.frame.effect.svga.data.PathType
|
|
|
+import com.adealink.frame.log.Log
|
|
|
import com.adealink.frame.tceffect.TCEffectManager
|
|
|
import com.adealink.frame.util.AppUtil
|
|
|
import com.adealink.frame.util.createOrExistsDir
|
|
|
-import com.adealink.frame.util.isFileExists
|
|
|
import com.adealink.frame.util.runOnUiThread
|
|
|
import com.adealink.weparty.R
|
|
|
import com.adealink.weparty.commonui.ext.gone
|
|
|
@@ -35,6 +35,7 @@ import com.tencent.qgame.animplayer.AnimView
|
|
|
import com.tencent.qgame.animplayer.inter.IAnimListener
|
|
|
import com.tencent.qgame.animplayer.util.ScaleType
|
|
|
import com.tencent.tcmediax.tceffectplayer.api.TCEffectAnimView
|
|
|
+import com.tencent.tcmediax.tceffectplayer.api.TCEffectConfig
|
|
|
import com.tencent.tcmediax.tceffectplayer.api.TCEffectPlayerConstant
|
|
|
import kotlinx.coroutines.CoroutineScope
|
|
|
import kotlinx.coroutines.Job
|
|
|
@@ -487,6 +488,10 @@ open class WeAnimView @JvmOverloads constructor(
|
|
|
listener?.onPlayError(p0.toString())
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ override fun onPlayEvent(p0: Int, p1: Bundle?) {
|
|
|
+
|
|
|
+ }
|
|
|
})
|
|
|
extraConfig?.tcExtraConfig?.tcFetchResource?.let {
|
|
|
tcAnimView?.setFetchResource(it)
|
|
|
@@ -678,6 +683,12 @@ open class WeAnimView @JvmOverloads constructor(
|
|
|
AnimViewType.TC -> {
|
|
|
if (tcAnimView?.parent == null) {
|
|
|
tcAnimView = TCEffectAnimView(context)
|
|
|
+ val tceConfigExtendMap: HashMap<String, Any> = hashMapOf(
|
|
|
+ TCEffectPlayerConstant.PARAM_OPTIONAL_STRING_EXTRA_LICENSE_KEY to TCEffectManager.getOldLicense()
|
|
|
+ )
|
|
|
+ tcAnimView?.setConfig(
|
|
|
+ TCEffectConfig.Builder().setExtendMapParams(tceConfigExtendMap).build()
|
|
|
+ )
|
|
|
addView(tcAnimView, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
|
tcAnimView?.show()
|
|
|
}
|