diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/TanluConstants.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/TanluConstants.java index 18c482a475..5ed6632629 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/TanluConstants.java +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/TanluConstants.java @@ -42,4 +42,7 @@ public class TanluConstants { //语音搜索 public static final String CARNET_VOICE_SEARCH = "CarNet_Voice_Search"; + //视频播放 + public static final String CARNET_USER_VIDEO_PLAY = "CarNet_user_video_play"; + } diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java index e333762744..dda05a1b52 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java @@ -186,6 +186,17 @@ public class TanluCardViewFragment extends MvpFragment> simpleCoverVideoPlayer.setVisibility(View.VISIBLE); autoZoomInImageView.setVisibility(View.GONE); + + //视频点击 +// simpleCoverVideoPlayer.getStartButton().setOnClickListener(new View.OnClickListener() { +// @Override +// public void onClick(View view) { +// Logger.d(TAG, "simpleCoverVideoPlayer onClick -------> "); +// gsyVideoOptionBuilder.setUrl(mVideoUrl).setCacheWithPlay(false).setPlayTag(TAG) +// .build(simpleCoverVideoPlayer); +//// simpleCoverVideoPlayer.getStartButton().performClick(); +// } +// }); } @@ -460,6 +471,7 @@ public class TanluCardViewFragment extends MvpFragment> gsyVideoOptionBuilder.setUrl(mVideoUrl).setCacheWithPlay(false).setPlayTag(TAG) .build(simpleCoverVideoPlayer); simpleCoverVideoPlayer.getStartButton().performClick(); + traceVideoPlayStatusData("1"); } } @@ -651,12 +663,27 @@ public class TanluCardViewFragment extends MvpFragment> gsyVideoOptionBuilder.setUrl(videoUrl).setCacheWithPlay(false).setPlayTag(TAG) .build(simpleCoverVideoPlayer); simpleCoverVideoPlayer.getStartButton().performClick(); + traceVideoPlayStatusData("2"); + if (mImageUrl == null) { return; } - } + /** + * 上传播放 + * @param type + * type=1 主动触发播放 + * + * type=2 自动播放 + */ + private void traceVideoPlayStatusData(String type) { + Map properties = new HashMap<>(); + properties.put("type", type); + mAnalytics.track(TanluConstants.CARNET_USER_VIDEO_PLAY, properties); + } + + /** * 刷新单个图片数据 */