[3.4.0][Opt]全屏视频页添加状态栏
This commit is contained in:
@@ -22,6 +22,7 @@ import com.mogo.eagle.core.utilcode.util.TimeTransformUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import com.mogo.och.taxi.passenger.ui.statusview.StatusBarView
|
||||
import com.mogo.och.taxi.passenger.ui.video.FullVideoUtils
|
||||
import com.mogo.och.taxi.passenger.utils.ZoomDrawable
|
||||
import com.shuyu.gsyvideoplayer.listener.VideoAllCallBack
|
||||
@@ -30,6 +31,7 @@ import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
import com.shuyu.gsyvideoplayer.video.base.GSYBaseVideoPlayer
|
||||
import com.shuyu.gsyvideoplayer.video.base.GSYVideoPlayer
|
||||
import com.shuyu.gsyvideoplayer.video.base.GSYVideoView
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import java.lang.reflect.Constructor
|
||||
|
||||
/**
|
||||
@@ -50,6 +52,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
|
||||
private var fullVideoPlayer:ConsultVideoPlayer?=null
|
||||
var smalllPlayer:ConsultVideoPlayer?=null
|
||||
private var statusBarView: StatusBarView? = null
|
||||
|
||||
private var currentTime = 0
|
||||
|
||||
@@ -158,39 +161,43 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
override fun changeUiToNormal() {
|
||||
super.changeUiToNormal()
|
||||
setViewShowState(fullscreenButton, INVISIBLE)
|
||||
// TODO:("显示顶部View")
|
||||
this.statusBarView?.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
override fun changeUiToPreparingShow() {
|
||||
super.changeUiToPreparingShow()
|
||||
// TODO:("显示顶部View")
|
||||
this.statusBarView?.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
override fun changeUiToPlayingShow() {
|
||||
super.changeUiToPlayingShow()
|
||||
setViewShowState(fullscreenButton, VISIBLE)
|
||||
// TODO:("显示顶部View")
|
||||
this.statusBarView?.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
override fun changeUiToPlayingClear() {
|
||||
super.changeUiToPlayingClear()
|
||||
this.statusBarView?.visibility = View.GONE
|
||||
}
|
||||
|
||||
override fun changeUiToPauseShow() {
|
||||
super.changeUiToPauseShow()
|
||||
// TODO:("显示顶部View")
|
||||
this.statusBarView?.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
override fun changeUiToPlayingBufferingShow() {
|
||||
super.changeUiToPlayingBufferingShow()
|
||||
// TODO:("显示顶部View")
|
||||
this.statusBarView?.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
override fun changeUiToCompleteShow() {
|
||||
super.changeUiToCompleteShow()
|
||||
// TODO:("显示顶部View")
|
||||
this.statusBarView?.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
public override fun hideAllWidget() {
|
||||
super.hideAllWidget()
|
||||
// TODO:("隐藏顶部View")
|
||||
|
||||
this.statusBarView?.visibility = View.GONE
|
||||
}
|
||||
|
||||
override fun setProgressAndTime(
|
||||
@@ -419,6 +426,8 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
frameLayout.setBackgroundColor(Color.BLACK)
|
||||
val lp = LayoutParams(width, height)
|
||||
frameLayout.addView(gsyVideoPlayer, lp)
|
||||
gsyVideoPlayer.statusBarView = StatusBarView(context)
|
||||
frameLayout.addView(gsyVideoPlayer.statusBarView)
|
||||
ActivityUtils.getActivityByContext(context)
|
||||
FullVideoUtils.showOverlayView(context as Activity,frameLayout,R.style.och_window_anim_alpha)
|
||||
gsyVideoPlayer.visibility = INVISIBLE
|
||||
@@ -482,10 +491,12 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
}
|
||||
|
||||
fun clearFullscreenLayout(gsyVideoPlayer:ConsultVideoPlayer) {
|
||||
mIfCurrentIsFullscreen = false
|
||||
val delay = 100
|
||||
gsyVideoPlayer.smalllPlayer = null
|
||||
mInnerHandler.postDelayed({ resolveNormalVideoShow(gsyVideoPlayer) }, delay.toLong())
|
||||
if (mIfCurrentIsFullscreen) {
|
||||
mIfCurrentIsFullscreen = false
|
||||
val delay = 100
|
||||
gsyVideoPlayer.smalllPlayer = null
|
||||
mInnerHandler.postDelayed({ resolveNormalVideoShow(gsyVideoPlayer) }, delay.toLong())
|
||||
}
|
||||
}
|
||||
|
||||
private fun resolveNormalVideoShow(gsyVideoPlayer: GSYVideoPlayer) {
|
||||
|
||||
Reference in New Issue
Block a user