diff --git a/app/src/main/java/com/gh/ad/AdDelegateHelper.kt b/app/src/main/java/com/gh/ad/AdDelegateHelper.kt index 5471cf0d8a..45871731fa 100644 --- a/app/src/main/java/com/gh/ad/AdDelegateHelper.kt +++ b/app/src/main/java/com/gh/ad/AdDelegateHelper.kt @@ -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 { // 拦截点击事件传递 diff --git a/app/src/main/java/com/gh/ad/SplashAdVideoView.kt b/app/src/main/java/com/gh/ad/SplashAdVideoView.kt index 990c0ed865..c798f00e2b 100644 --- a/app/src/main/java/com/gh/ad/SplashAdVideoView.kt +++ b/app/src/main/java/com/gh/ad/SplashAdVideoView.kt @@ -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(R.id.thumbImage) - ImageUtils.display(ivCover, cover) setNeedAutoAdaptation(false) isLooping = true startPlayLogic() diff --git a/app/src/main/res/layout/layout_splash_ad_video.xml b/app/src/main/res/layout/layout_splash_ad_video.xml index cfc7d84ecb..021d8feab5 100644 --- a/app/src/main/res/layout/layout_splash_ad_video.xml +++ b/app/src/main/res/layout/layout_splash_ad_video.xml @@ -7,15 +7,4 @@ android:id="@+id/surface_container" android:layout_width="match_parent" android:layout_height="match_parent" /> - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/piece_start_ad_container.xml b/app/src/main/res/layout/piece_start_ad_container.xml index 0f392f847a..bf7eebe283 100644 --- a/app/src/main/res/layout/piece_start_ad_container.xml +++ b/app/src/main/res/layout/piece_start_ad_container.xml @@ -11,12 +11,12 @@