光环助手V4.7.0-首页游戏功能强化(视频自动播放)(20210204测试问题) https://git.ghzs.com/pm/halo-app-issues/-/issues/1122
This commit is contained in:
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user