Merge remote-tracking branch 'origin/dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0' into dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0
This commit is contained in:
@@ -67,6 +67,9 @@ class AdvanceGSYVideoPlayer: StandardGSYVideoPlayer {
|
||||
mLockScreen, INVISIBLE
|
||||
)
|
||||
|
||||
setViewShowState(mThumbImageViewLayout, INVISIBLE)
|
||||
setViewShowState(mThumbImageView, INVISIBLE)
|
||||
|
||||
setIsTouchWiget(false)
|
||||
isFocusableInTouchMode = false
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ class AdvanceVideoView @JvmOverloads constructor(
|
||||
|
||||
private fun loadCacheImg() {
|
||||
// BitmapHelper.getVideoThumbnail(path) /*获取第一帧图*
|
||||
videoViewPlayer?.thumbImageView = cacheImage
|
||||
cacheImage?.setImageResource(R.drawable.m2_p_video_holder)
|
||||
setCacheImageViewVisible()
|
||||
// OCHThreadPoolManager.getsInstance().execute {
|
||||
@@ -95,16 +96,16 @@ class AdvanceVideoView @JvmOverloads constructor(
|
||||
Logger.d(ImageAndVideoRotation.TAG, "setVideoPath")
|
||||
// ThreadUtils.runOnUiThread {
|
||||
// Logger.d(ImageAndVideoRotation.TAG, "bitmap加载")
|
||||
// cacheImage?.let {
|
||||
// Glide.with(context).load(cacheImageUrl)
|
||||
// .apply(
|
||||
// RequestOptions().placeholder(R.drawable.m2_p_video_holder)
|
||||
// .error(R.drawable.m2_p_video_holder)
|
||||
// .fallback(R.drawable.m2_p_video_holder)
|
||||
// .centerCrop()
|
||||
// )
|
||||
// .into(it)
|
||||
// }
|
||||
cacheImage?.let {
|
||||
Glide.with(context).load(cacheImageUrl)
|
||||
.apply(
|
||||
RequestOptions().placeholder(R.drawable.m2_p_video_holder)
|
||||
.error(R.drawable.m2_p_video_holder)
|
||||
.fallback(R.drawable.m2_p_video_holder)
|
||||
.centerCrop()
|
||||
)
|
||||
.into(it)
|
||||
}
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@@ -118,13 +119,12 @@ class AdvanceVideoView @JvmOverloads constructor(
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
fun setCacheImageViewVisible() {
|
||||
videoViewPlayer?.thumbImageView = cacheImage
|
||||
videoViewPlayer?.setCacheImageViewVisible()
|
||||
}
|
||||
|
||||
fun setCacheImageViewGone() {
|
||||
videoViewPlayer?.setCacheImageViewGone()
|
||||
videoViewPlayer?.clearThumbImageView()
|
||||
// videoViewPlayer?.clearThumbImageView()
|
||||
}
|
||||
|
||||
fun setVideo(onCompletionListener: GSYSampleCallBack) {
|
||||
@@ -196,6 +196,10 @@ class AdvanceVideoView @JvmOverloads constructor(
|
||||
|
||||
override fun onPause(url: String?, threadBean: ThreadBean?) {
|
||||
Logger.d(ImageAndVideoRotation.TAG, "download-onPause")
|
||||
// UiThreadHandler.postDelayed(Runnable {
|
||||
// startDownLoadVideo()
|
||||
// },DOWNLOAD_DELAY)
|
||||
// todo 测试下网络断掉是否会走opause,且网络回复也不会继续下载
|
||||
}
|
||||
|
||||
override fun onProgress(url: String?, length: Int) {
|
||||
|
||||
Reference in New Issue
Block a user