fix: 处理启动时的广告视频图片闪烁问题
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
This commit is contained in:
@ -543,15 +543,14 @@ object AdDelegateHelper {
|
||||
), null, null
|
||||
)
|
||||
|
||||
adImage.visibleIf(true)
|
||||
ImageUtils.display(adImage, ad.img)
|
||||
|
||||
if (ad.isImageType) {
|
||||
adImage.visibleIf(true)
|
||||
adVideo.visibleIf(false)
|
||||
ImageUtils.display(adImage, ad.img)
|
||||
} else {
|
||||
adImage.visibleIf(false)
|
||||
adVideo.visibleIf(true)
|
||||
adVideo.startPlay(ad.img, ad.video.url)
|
||||
adVideo.startPlay(ad.video.url)
|
||||
}
|
||||
startAdContainer.setOnClickListener {
|
||||
// 拦截点击事件传递
|
||||
|
||||
@ -2,11 +2,8 @@ package com.gh.ad
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import com.facebook.drawee.view.SimpleDraweeView
|
||||
import com.gh.gamecenter.R
|
||||
import com.gh.gamecenter.common.utils.ImageUtils
|
||||
import com.gh.gamecenter.video.detail.CustomManager
|
||||
import com.shuyu.gsyvideoplayer.utils.Debuger
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType.SCREEN_TYPE_FULL
|
||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
@ -18,16 +15,13 @@ class SplashAdVideoView @JvmOverloads constructor(
|
||||
) :
|
||||
StandardGSYVideoPlayer(context, attrs) {
|
||||
|
||||
|
||||
fun startPlay(cover: String, url: String) {
|
||||
fun startPlay(url: String) {
|
||||
GSYVideoType.setShowType(SCREEN_TYPE_FULL)
|
||||
GSYVideoType.setRenderType(GSYVideoType.SUFRACE)
|
||||
CustomManager.getCustomManager(getKey()).isNeedMute = true
|
||||
|
||||
setUp(url, true, "")
|
||||
|
||||
val ivCover = findViewById<SimpleDraweeView>(R.id.thumbImage)
|
||||
ImageUtils.display(ivCover, cover)
|
||||
setNeedAutoAdaptation(false)
|
||||
isLooping = true
|
||||
startPlayLogic()
|
||||
|
||||
Reference in New Issue
Block a user