From 2ef7216bda2ebf1b138bb6f0917c1515eebfd606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=8E=89=E4=B9=85?= <1484288157@qq.com> Date: Thu, 4 Feb 2021 19:22:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=89=E7=8E=AF=E5=8A=A9=E6=89=8BV4.7.0-?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=B8=B8=E6=88=8F=E5=8A=9F=E8=83=BD=E5=BC=BA?= =?UTF-8?q?=E5=8C=96=EF=BC=88=E8=A7=86=E9=A2=91=E8=87=AA=E5=8A=A8=E6=92=AD?= =?UTF-8?q?=E6=94=BE=EF=BC=89(20210204=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98?= =?UTF-8?q?)=20https://git.ghzs.com/pm/halo-app-issues/-/issues/1122?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/gh/gamecenter/home/HomeFragmentAdapter.kt | 6 +++--- .../java/com/gh/gamecenter/home/video/AutomaticVideoView.kt | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/gh/gamecenter/home/HomeFragmentAdapter.kt b/app/src/main/java/com/gh/gamecenter/home/HomeFragmentAdapter.kt index 2636d281f8..308b4f3709 100644 --- a/app/src/main/java/com/gh/gamecenter/home/HomeFragmentAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/home/HomeFragmentAdapter.kt @@ -213,7 +213,7 @@ class HomeFragmentAdapter(context: Context, holder.binding.autoVideoView.setData(homeItemData.attachGame?.linkGame, homeSetting?.placeholderColor) holder.binding.autoVideoView.detailBtn?.setOnClickListener { holder.itemView.performClick() - holder.binding.autoVideoView.uploadVideoStreamingPlaying("点击遮罩") + holder.binding.autoVideoView.uploadVideoStreamingPlaying("点击遮罩", true) } holder.binding.autoVideoView.setOnVideoClickListener(View.OnClickListener { holder.itemView.performClick() }) } @@ -235,10 +235,10 @@ class HomeFragmentAdapter(context: Context, MtaHelper.onEvent("首页_新", "点击", "内容" + homeItemData.blockPosition + "_" + game.name) GameDetailActivity.startGameDetailActivity(mContext, game.id, "(首页-游戏[" + game.name + "])", homeItemData.exposureEvent) if (holder.binding.autoVideoView.isInPlayingState) { - holder.binding.autoVideoView.uploadVideoStreamingPlaying("游戏详情-播放点击") + holder.binding.autoVideoView.uploadVideoStreamingPlaying("游戏详情-播放点击", holder.binding.autoVideoView.detailBtn?.visibility == View.VISIBLE) } else { if (holder.binding.autoVideoView.currentState == GSYVideoView.CURRENT_STATE_AUTO_COMPLETE) { - holder.binding.autoVideoView.uploadVideoStreamingPlaying("游戏详情-完播点击") + holder.binding.autoVideoView.uploadVideoStreamingPlaying("游戏详情-完播点击", holder.binding.autoVideoView.detailBtn?.visibility == View.VISIBLE) } } } diff --git a/app/src/main/java/com/gh/gamecenter/home/video/AutomaticVideoView.kt b/app/src/main/java/com/gh/gamecenter/home/video/AutomaticVideoView.kt index 8948fc1eb6..34d7ebc489 100644 --- a/app/src/main/java/com/gh/gamecenter/home/video/AutomaticVideoView.kt +++ b/app/src/main/java/com/gh/gamecenter/home/video/AutomaticVideoView.kt @@ -263,7 +263,7 @@ class AutomaticVideoView @JvmOverloads constructor(context: Context, attrs: Attr mClickListener?.onClick(v) } - fun uploadVideoStreamingPlaying(action: String) { + fun uploadVideoStreamingPlaying(action: String, hasDetailMask: Boolean? = null) { if (gameEntity == null) return val topVideo = gameEntity?.topVideo if (topVideo == null || topVideo.url.isEmpty()) return @@ -277,7 +277,8 @@ class AutomaticVideoView @JvmOverloads constructor(context: Context, attrs: Attr //https://exoplayer.dev/hello-world.html#a-note-on-threading runOnUiThread { - LogUtils.uploadHomeVideoStreamingPlaying(action, detailBtn?.visibility == View.VISIBLE, topVideo.id, topVideo.title, + LogUtils.uploadHomeVideoStreamingPlaying(action, hasDetailMask + ?: (detailBtn?.visibility == View.VISIBLE), topVideo.id, topVideo.title, gameEntity?.id, gameEntity?.name, mContentLength, videoTotalTime, videoPlayTs, progress.toInt()) } }