progressBar.setSecondaryProgress(i);
}
});
// videoPlayer.startPlayLogic();
ImageView thumbImageView = new ImageView(getContext());
thumbImageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
// thumbImageView.setImageResource(R.drawable.app_publish_video_icon);
ImageDisplayUtils.dispalyImg(getContext(), bean.coverImgUrl, thumbImageView);
videoPlayer.setThumbImageView(thumbImageView);
TextView positionTextView = rootView.findViewById(R.id.position);
positionTextView.setText(bean.title);
}
rootView.findViewById(R.id.videoPlayerCover).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
int currentStatue = videoPlayer.getCurrentState();
if (currentStatue == GSYVideoView.CURRENT_STATE_PLAYING) {
playIcon.setVisibility(View.VISIBLE);
videoPlayer.onVideoPause();
} else if (currentStatue == GSYVideoView.CURRENT_STATE_PAUSE) {
playIcon.setVisibility(View.GONE);
videoPlayer.onVideoResume(false);
} else {
playIcon.setVisibility(View.GONE);
videoPlayer.startPlayLogic();
}
}
});
private void initPicturesView(View rootView, ChatRecommendBean bean) {
TextView positionTextView = rootView.findViewById(R.id.position);
positionTextView.setText(bean.title);
// TextView positionTextView = rootView.findViewById(R.id.position);
// positionTextView.setText(bean.title);
}
@Override
public void onPause() {
super.onPause();
if (videoPlayer != null) {
videoPlayer.onVideoPause();
public void play() {
if (videoPlayer == null) {
return;
}
}
@Override
public void onResume() {
super.onResume();
if (videoPlayer != null) {
videoPlayer.onVideoResume();
playIcon.setVisibility(View.GONE);
int currentStatue = videoPlayer.getCurrentState();
if (currentStatue == GSYVideoView.CURRENT_STATE_PLAYING) {
} else if (currentStatue == GSYVideoView.CURRENT_STATE_PAUSE) {
videoPlayer.onVideoResume(true);
} else {
videoPlayer.startPlayLogic();
}
}
@Override
public void onDestroy() {
super.onDestroy();
GSYVideoADManager.releaseAllVideos();
if (videoPlayer != null) {
videoPlayer.setVideoAllCallBack(null);
}
private void initPicturesView(View rootView, ChatRecommendBean bean) {
TextView positionTextView = rootView.findViewById(R.id.position);
positionTextView.setText(bean.title);
}
}
}
|
||
| 127 | 127 |
|
| 128 | 128 |
|
| 129 | 129 |
|
| 130 |
|
|
| 130 | 131 |
|
| 131 | 132 |
|
| 132 | 133 |
|
|
||
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 84 |
|
|
| 85 |
|
|
| 86 |
|
|
| 87 |
|
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
| 93 |
|
|
| 94 |
|
|
| 95 |
|
|
| 96 |
|
|
| 97 |
|
|
| 98 |
|
|
| 99 |
|
|
| 100 |
|
|
| 101 |
|
|
| 102 |
|
|
| 103 |
|
|
| 104 |
|
|
| 105 |
|
|
| 106 |
|
|
| 107 |
|
|
| 108 |
|
|
| 109 |
|
|
| 110 |
|
|
| 111 |
|
|
| 112 |
|
|
| 113 |
|
|
| 114 |
|
|
| 115 |
|
|
| 116 |
|
|
| 117 |
|
|
| 118 |
|
|
| 119 |
|
|
| 120 |
|
|
| 121 |
|
|
| 122 |
|
|
| 123 |
|
|
| 124 |
|
|
| 125 |
|
|
| 126 |
|
|
| 127 |
|
|
| 128 |
|
|
| 129 |
|
|
| 130 |
|
|
| 131 |
|
|
| 132 |
|
|
| 133 |
|
|
| 134 |
|
|
| 135 |
|
|
| 136 |
|
|
| 137 |
|
|
| 138 |
|
|
| 139 |
|
|
| 140 |
|
|
| 141 |
|
|
| 142 |
|
|
| 143 |
|
|
| 144 |
|
|
| 145 |
|
|
| 146 |
|
|
|
||
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
|
||
| 4 | 4 |
|
| 5 | 5 |
|
| 6 | 6 |
|
| 7 |
|
|
| 7 |
|
|
| 8 | 8 |
|
| 9 |
|
|
| 9 |
|
|
| 10 | 10 |
|
| 11 | 11 |
|
| 12 |
|
|
| 13 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 | 14 |
|
| 15 |
|
|
| 16 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 17 | 18 |
|
| 18 |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