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 b74b4acb64..d5d218220a 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 @@ -522,7 +522,7 @@ class AdvanceGSYVideoPlayer : StandardGSYVideoPlayer { hideWidget() } - private fun hideWidget() { + private fun hideWidget(){ setViewShowState(mBottomContainer, INVISIBLE) setViewShowState(mProgressBar, INVISIBLE) setViewShowState(mCurrentTimeTextView, INVISIBLE) @@ -535,22 +535,19 @@ class AdvanceGSYVideoPlayer : StandardGSYVideoPlayer { setViewShowState( mLockScreen, INVISIBLE ) + setIsTouchWiget(false) isFocusableInTouchMode = false } fun setCacheImageViewVisible() { - if (mThumbImageViewLayout.visibility == INVISIBLE) { - setViewShowState(mThumbImageViewLayout, VISIBLE) - setViewShowState(mThumbImageView, VISIBLE) - } + setViewShowState(mThumbImageViewLayout, VISIBLE) + setViewShowState(mThumbImageView, VISIBLE) } fun setCacheImageViewGone() { - if (mThumbImageViewLayout.visibility == VISIBLE) { - setViewShowState(mThumbImageViewLayout, INVISIBLE) - setViewShowState(mThumbImageView, INVISIBLE) - } + setViewShowState(mThumbImageViewLayout, INVISIBLE) + setViewShowState(mThumbImageView, INVISIBLE) } //失去焦点声音压低 @@ -563,17 +560,17 @@ class AdvanceGSYVideoPlayer : StandardGSYVideoPlayer { setNeedMute(false) } - private fun setStreamVolume(percent: Float) { + private fun setStreamVolume(percent: Float){ var mAudioManager = mContext?.getSystemService(Context.AUDIO_SERVICE) as AudioManager var maxVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC) var volume = (percent * maxVolume).toInt() - if (volume < 0) { + if (volume < 0 ){ volume = 0 } - mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, volume, 0) + mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC,volume,0) } - private fun setNeedMute(isMute: Boolean) { + private fun setNeedMute(isMute: Boolean){ gsyVideoManager?.player?.setNeedMute(isMute) } } \ No newline at end of file