[add] 添加加载中图片
This commit is contained in:
@@ -64,7 +64,7 @@ class SimpleCoverVideoPlayer : StandardGSYVideoPlayer {
|
||||
//加载图片
|
||||
val requestOptions = RequestOptions()
|
||||
// .placeholder(R.drawable.tanlu_normal_image)
|
||||
.error(R.drawable.video_loading_img)
|
||||
.error(R.drawable.v2x_event_video_refresh)
|
||||
Glide.with(mContext).asBitmap()
|
||||
.load(url)
|
||||
.apply(requestOptions)
|
||||
@@ -75,16 +75,22 @@ class SimpleCoverVideoPlayer : StandardGSYVideoPlayer {
|
||||
/*
|
||||
* 默认双击暂停
|
||||
* */
|
||||
override fun onClickUiToggle(){
|
||||
override fun onClickUiToggle() {
|
||||
super.touchDoubleUp()
|
||||
}
|
||||
|
||||
|
||||
override fun updateStartImage() {
|
||||
when (mCurrentState) {
|
||||
GSYVideoView.CURRENT_STATE_PLAYING -> start.setImageResource(R.drawable.v2x_video_pause)
|
||||
// GSYVideoView.CURRENT_STATE_ERROR -> start.setImageResource(R.drawable.live_error)
|
||||
else -> start.setImageResource(R.drawable.v2x_icon_event_play)
|
||||
// GSYVideoView.CURRENT_STATE_PLAYING -> start.setImageResource(R.drawable.v2x_video_pause)
|
||||
GSYVideoView.CURRENT_STATE_ERROR -> start.setImageResource(R.drawable.v2x_event_video_refresh)
|
||||
else -> start.setImageResource(R.drawable.v2x_icon_event_play)
|
||||
}
|
||||
|
||||
when (mCurrentState) {
|
||||
GSYVideoView.CURRENT_STATE_PAUSE -> start.setImageResource(R.drawable.v2x_video_pause)
|
||||
GSYVideoView.CURRENT_STATE_PAUSE -> start.visibility = View.VISIBLE
|
||||
else -> start.visibility = View.INVISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user