Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev

This commit is contained in:
kehaoyuan
2020-01-10 21:20:47 +08:00
7 changed files with 23 additions and 2 deletions

View File

@ -213,11 +213,12 @@ class TopVideoView @JvmOverloads constructor(context: Context, attrs: AttributeS
//播放完成后判断是否已缓冲完毕,没有完成显示播放错误状态
if (mBufferPoint != 0 && mBufferPoint != 100 && isShown) {
Utils.toast(context, "网络错误,视频播放失败")
// Utils.toast(context, "网络错误,视频播放失败")
gsyVideoManager.releaseMediaPlayer()
changeUiToPreparingShow()
postDelayed({
if (!NetworkUtils.isAvailable(mContext)) {
Utils.toast(context, "网络错误,视频播放失败")
changeUiToError()
}
}, 10 * 1000)

View File

@ -333,10 +333,21 @@ class DetailPlayerView @JvmOverloads constructor(context: Context, attrs: Attrib
AppExecutor.uiExecutor.executeWithDelay(Runnable {
if (mCurrentState == CURRENT_STATE_PREPAREING) {
setViewShowState(mLoadingProgressBar, View.VISIBLE)
delay()
}
}, 2000)
}
private fun delay() {
AppExecutor.uiExecutor.executeWithDelay(Runnable {
if (mCurrentState == CURRENT_STATE_PREPAREING) {
if (!NetworkUtils.isAvailable(mContext)) {
changeUiToError()
}
}
}, 10 * 1000)
}
override fun changeUiToPlayingShow() {
super.changeUiToPlayingShow()
if (!byStartedClick) {

View File

@ -419,12 +419,20 @@ class VideoDetailContainerFragment : BaseLazyFragment(), OnBackPressedListener {
if (pauseVideo[mViewModel.uuid] == true) {
CustomManager.onPause("detail_${mViewModel.uuid}")
}
if (slideGuideAnimation.isAnimating) {
slideGuideAnimation.cancelAnimation()
guideRl.visibility = View.GONE
}
SPUtils.setBoolean(Constants.SP_SHOW_SLIDE_GUIDE, true)
super.onFragmentPause()
}
override fun onDestroyView() {
findFirstCompletelyVisibleVideoViewByPosition()?.uploadVideoStreamingPlaying("退出页面")
CustomManager.releaseAllVideos("detail_${mViewModel.uuid}")
mBaseHandler.postDelayed({
CustomManager.releaseAllVideos("detail_${mViewModel.uuid}")
}, 500)
CacheManager.getInstance().removeAllCall()
if (mAdCountDownTimer != null && !mAdCountDownTimer!!.isDisposed) {
mAdCountDownTimer?.dispose()