From 27f9ed46413be20aedf492d7a2874887325031f6 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Tue, 14 Mar 2023 17:16:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=B7=A5=E5=85=B7=E7=B1=BB?= =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/wigets/video/VideoPlayerView.kt | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerView.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerView.kt index 3c5036a71e..76346ec988 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerView.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/video/VideoPlayerView.kt @@ -503,31 +503,41 @@ class AdvanceGSYVideoPlayer : StandardGSYVideoPlayer { } override fun hideAllWidget() { - hideWidget() + Logger.d("ImageAndVideoRotation", "hideAllWidget") } override fun changeUiToNormal() { - Debuger.printfLog("changeUiToNormal") + Logger.d("ImageAndVideoRotation", "changeUiToNormal-hide") hideWidget() } override fun changeUiToPreparingShow() { + Logger.d("ImageAndVideoRotation", "changeUiToPreparingShow-hide") hideWidget() } override fun changeUiToPlayingShow() { - hideWidget() + Logger.d("ImageAndVideoRotation", "changeUiToPlayingShow") + setCacheImageViewGone() } override fun changeUiToPauseShow() { + Logger.d("ImageAndVideoRotation", "changeUiToPauseShow-hide") hideWidget() } override fun changeUiToCompleteShow() { - hideWidget() + Logger.d("ImageAndVideoRotation", "changeUiToCompleteShow") + setCacheImageViewGone() } override fun changeUiToPlayingBufferingShow() { + Logger.d("ImageAndVideoRotation", "changeUiToPlayingBufferingShow -hide") + hideWidget() + } + + override fun changeUiToError() { + Logger.d("ImageAndVideoRotation", "changeUiToError-hide") hideWidget() } @@ -539,12 +549,13 @@ class AdvanceGSYVideoPlayer : StandardGSYVideoPlayer { setViewShowState(mBottomProgressBar, INVISIBLE) setViewShowState(mBackButton, INVISIBLE) setViewShowState(mStartButton, INVISIBLE) + + setViewShowState(mThumbImageViewLayout, VISIBLE) + setViewShowState(mThumbImageView, VISIBLE) + setViewShowState(mTopContainer, INVISIBLE) + setViewShowState(mLoadingProgressBar, INVISIBLE) - -// setViewShowState(mThumbImageViewLayout, VISIBLE) -// setViewShowState(mThumbImageView, VISIBLE) - setViewShowState( mLockScreen, INVISIBLE ) @@ -555,25 +566,25 @@ class AdvanceGSYVideoPlayer : StandardGSYVideoPlayer { fun setCacheImageViewVisible() { Logger.d("ImageAndVideoRotation", "CacheImageViewVISIBLE") - setViewShowState(mThumbImageViewLayout, VISIBLE) - setViewShowState(mThumbImageView, VISIBLE) +// setViewShowState(mThumbImageView, VISIBLE) } fun setCacheImageViewGone() { Logger.d("ImageAndVideoRotation", "CacheImageViewGONE") - setViewShowState(mThumbImageViewLayout, INVISIBLE) - setViewShowState(mThumbImageView, INVISIBLE) +// setViewShowState(mThumbImageView, INVISIBLE) } //失去焦点声音压低 override fun onLossTransientCanDuck() { +// setStreamVolume(0.2f) setNeedMute(true) } //获取焦点声音恢复 override fun onGankAudio() { +// setStreamVolume(5.0f) setNeedMute(false) }