From 58ea0bb51db3a5d64f36df6feffb35ee80c2507d Mon Sep 17 00:00:00 2001 From: lyr <15622190878@163.com> Date: Fri, 4 Jun 2021 14:25:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=AE=BA=E5=9D=9B=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=B5=81=E8=A7=86=E9=A2=91=E6=92=AD=E6=94=BE=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../forum/home/ArticleItemVideoView.kt | 211 +++++++++++------- .../home/ForumArticleAskItemViewHolder.kt | 69 +++++- .../personalhome/home/UserHistoryAdapter.kt | 63 +++++- .../ic_article_video_replay.png | Bin 2085 -> 0 bytes .../ic_article_video_share.png | Bin 2456 -> 0 bytes .../res/layout/layout_article_item_video.xml | 67 ++++-- .../layout/piece_article_video_control.xml | 35 ++- 7 files changed, 324 insertions(+), 121 deletions(-) delete mode 100644 app/src/main/res/drawable-xxxhdpi/ic_article_video_replay.png delete mode 100644 app/src/main/res/drawable-xxxhdpi/ic_article_video_share.png diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ArticleItemVideoView.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ArticleItemVideoView.kt index 6daedbc515..e0c5a0b8b8 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ArticleItemVideoView.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ArticleItemVideoView.kt @@ -1,16 +1,14 @@ package com.gh.gamecenter.forum.home import android.app.Activity -import android.app.Application import android.content.Context -import android.os.Bundle -import android.os.Handler import android.util.AttributeSet import android.view.Surface import android.view.View import android.widget.ImageView -import android.widget.LinearLayout +import android.widget.SeekBar import android.widget.TextView +import androidx.core.content.ContextCompat import com.facebook.drawee.view.SimpleDraweeView import com.gh.common.constant.Constants import com.gh.common.util.* @@ -18,6 +16,7 @@ import com.gh.gamecenter.R import com.gh.gamecenter.entity.ForumVideoEntity import com.gh.gamecenter.video.detail.CustomManager import com.lightgame.utils.Utils +import com.shuyu.gsyvideoplayer.utils.CommonUtil import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer import com.shuyu.gsyvideoplayer.video.base.GSYVideoView import com.shuyu.gsyvideoplayer.video.base.GSYVideoViewBridge @@ -26,41 +25,40 @@ import java.util.* class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : StandardGSYVideoPlayer(context, attrs) { -// private var mMuteCallback: MuteCallback -// private var mVolumeObserver: VolumeObserver private var mVideoEntity: ForumVideoEntity? = null private var mMuteDisposable: Disposable? = null + private var mIsAutoPlay = false var uuid = UUID.randomUUID().toString() var thumbImage: SimpleDraweeView = findViewById(R.id.thumbImage) var durationTv: TextView = findViewById(R.id.durationTv) - var completeContainer: LinearLayout = findViewById(R.id.completeContainer) - var replayIv: ImageView = findViewById(R.id.replayIv) + var completeContainer: View = findViewById(R.id.completeContainer) var replayTv: TextView = findViewById(R.id.replayTv) - var shareIv: ImageView = findViewById(R.id.shareIv) var shareTv: TextView = findViewById(R.id.shareTv) var volume: ImageView = findViewById(R.id.volume) + var remainingTv: TextView = findViewById(R.id.remainingTv) + var back: ImageView = findViewById(R.id.back) override fun getLayoutId(): Int { return R.layout.layout_article_item_video } init { + SPUtils.setBoolean(getMuteKey(), SPUtils.getBoolean(Constants.SP_VIDEO_PLAY_MUTE, true)) + post { volume.setOnClickListener { toggleMute() } } -// mMuteCallback = object : MuteCallback { -// override fun onMute(isMute: Boolean) { -// if (isMute) { -// mute() -// } else { -// unMute() -// } -// } -// } -// -// mVolumeObserver = VolumeObserver(context, Handler(), mMuteCallback) + if (mIfCurrentIsFullscreen) { + showBackBtn() + } else { + hideBackBtn() + } + + setBackFromFullScreenListener { + clearFullscreenLayout() + } } override fun getGSYVideoManager(): GSYVideoViewBridge { @@ -68,15 +66,17 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At return CustomManager.getCustomManager(getKey()) } - override fun startPlayLogic() { - super.startPlayLogic() - val topVideoVoiceStatus = SPUtils.getBoolean(Constants.SP_VIDEO_PLAY_MUTE, true) - if (topVideoVoiceStatus) { - violenceUpdateMuteStatus() - } + fun startPlayLogic(isAutoPlay: Boolean) { + mIsAutoPlay = isAutoPlay + startPlayLogic() } - private fun violenceUpdateMuteStatus() { + override fun prepareVideo() { + super.prepareVideo() + violenceUpdateMuteStatus() + } + + fun violenceUpdateMuteStatus() { if (mMuteDisposable != null) { mMuteDisposable?.dispose() mMuteDisposable = null @@ -86,13 +86,13 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At mMuteDisposable?.dispose() mMuteDisposable = null } - mute() + updateMuteStatus() } } // 不需要弹弹窗,直接播放 override fun showWifiDialog() { - startPlayLogic() + startPlayLogic(false) //val trafficVideo = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(SettingsFragment.TRAFFIC_VIDEO_SP_KEY, false) //if (trafficVideo) { // 不延迟的话 isCacheFile 可能直接返回 false @@ -138,9 +138,57 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At super.onSurfaceUpdated(surface) if (mThumbImageViewLayout != null && mThumbImageViewLayout.visibility == View.VISIBLE) { mThumbImageViewLayout.visibility = View.INVISIBLE + uploadVideoStreamingPlaying("开始播放") } } + //监控播放错误 +// override fun onError(what: Int, extra: Int) { +// super.onError(what, extra) +// Utils.toast(context, "网络错误,视频播放失败") +// setViewShowState(mStartButton, View.INVISIBLE) +//// errorContainer.visibility = View.VISIBLE +// } + + override fun releaseVideos() { + uploadVideoStreamingPlaying("结束播放") + CustomManager.releaseAllVideos(getKey()) + } + + override fun onVideoPause() { + super.onVideoPause() + uploadVideoStreamingPlaying("暂停播放") + } + + // 重载以减少横竖屏切换的时间 + override fun checkoutState() { + removeCallbacks(mCheckoutTask) + postDelayed(mCheckoutTask, 300) + } + + override fun clearFullscreenLayout() { + super.clearFullscreenLayout() + updateMuteStatus() + hideBackBtn() + } + + override fun setProgressAndTime(progress: Int, secProgress: Int, currentTime: Int, totalTime: Int, forceChange: Boolean) { + super.setProgressAndTime(progress, secProgress, currentTime, totalTime, forceChange) + if (remainingTv.visibility == View.VISIBLE) { + remainingTv.text = CommonUtil.stringForTime(totalTime - currentTime) + } + } + + private fun showBackBtn() { + mTopContainer.background = ContextCompat.getDrawable(context, R.drawable.video_title_bg) + back.visibility = View.VISIBLE + } + + private fun hideBackBtn() { + mTopContainer?.setBackgroundResource(0) + back.visibility = View.GONE + } + fun updateThumb(url: String) { ImageUtils.display(thumbImage, url) } @@ -180,18 +228,6 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At super.setStateAndUi(state) if (currentState == GSYVideoView.CURRENT_STATE_PREPAREING) { setViewShowState(durationTv, View.GONE) - replayIv.setOnClickListener { - startButton.performClick() -// violenceUpdateMuteStatus() -// uploadVideoStreamingPlaying("重新播放") - } - replayTv.setOnClickListener { replayIv.performClick() } - shareIv.setOnClickListener { - share() - } - shareTv.setOnClickListener { - shareIv.performClick() - } } // if (currentState == GSYVideoView.CURRENT_STATE_PLAYING) { @@ -201,6 +237,15 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At if (currentState == GSYVideoView.CURRENT_STATE_AUTO_COMPLETE) { hideAllWidget() setViewShowState(completeContainer, View.VISIBLE) + mTopContainer.visibility = View.VISIBLE + replayTv.setOnClickListener { + startButton.performClick() + violenceUpdateMuteStatus() + uploadVideoStreamingPlaying("重新播放") + } + shareTv.setOnClickListener { + share() + } } else { setViewShowState(completeContainer, View.GONE) } @@ -208,18 +253,24 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At override fun changeUiToPlayingShow() { super.changeUiToPlayingShow() - setViewShowState(mBottomProgressBar, View.VISIBLE) + if (!mIfCurrentIsFullscreen) setViewShowState(mBottomProgressBar, View.VISIBLE) + } + + override fun changeUiToPlayingClear() { + super.changeUiToPlayingClear() + if (mIfCurrentIsFullscreen) setViewShowState(mBottomProgressBar, View.GONE) } private fun toggleMute() { if (mVideoEntity?.videoIsMuted == true) { - unMute() + unMute(true) } else { - mute() + mute(true) } } fun updateMuteStatus() { + mVideoEntity?.videoIsMuted = SPUtils.getBoolean(getMuteKey(), true) if (mVideoEntity?.videoIsMuted == true) { mute() } else { @@ -227,16 +278,35 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At } } - private fun mute() { + private fun mute(isManual: Boolean = false) { mVideoEntity?.videoIsMuted = true + SPUtils.setBoolean(getMuteKey(), true) volume.setImageResource(R.drawable.ic_article_video_volume_off) CustomManager.getCustomManager(getKey()).isNeedMute = true + if (isManual) { +// Utils.toast(context, "当前处于静音状态") + uploadVideoStreamingPlaying("点击静音") + } } - private fun unMute() { + private fun unMute(isManual: Boolean = false) { mVideoEntity?.videoIsMuted = false + SPUtils.setBoolean(getMuteKey(), false) volume.setImageResource(R.drawable.ic_article_video_volume_on) CustomManager.getCustomManager(getKey()).isNeedMute = false + if (isManual) { + uploadVideoStreamingPlaying("取消静音") + } + } + + override fun onAutoCompletion() { + super.onAutoCompletion() + uploadVideoStreamingPlaying("播放完毕") + } + + override fun onStopTrackingTouch(seekBar: SeekBar?) { + super.onStopTrackingTouch(seekBar) + uploadVideoStreamingPlaying("拖动") } private fun share() { @@ -259,47 +329,30 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At } override fun onCancel() { -// uploadVideoStreamingPlaying("取消分享") + uploadVideoStreamingPlaying("取消分享") } }) } } + fun uploadVideoStreamingPlaying(action: String) { -// fun observeVolume(activity: AppCompatActivity) { -// activity.contentResolver?.registerContentObserver( -// android.provider.Settings.System.CONTENT_URI, true, mVolumeObserver) -// -// activity.application?.registerActivityLifecycleCallbacks( -// object : Application.ActivityLifecycleCallbacks { -// override fun onActivityPaused(a: Activity) { -// if (activity == a) { -// activity.contentResolver?.unregisterContentObserver(mVolumeObserver) -// activity.application?.unregisterActivityLifecycleCallbacks(this) -// } -// } -// -// override fun onActivityStarted(activity: Activity) { -// } -// -// override fun onActivityDestroyed(activity: Activity) { -// } -// -// override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) { -// } -// -// override fun onActivityStopped(activity: Activity) { -// } -// -// override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) { -// } -// -// override fun onActivityResumed(activity: Activity) { -// } -// }) -// } + } + + fun setFullViewStatus() { + mProgressBar.visibility = View.VISIBLE + mCurrentTimeTextView.visibility = View.VISIBLE + mTotalTimeTextView.visibility = View.VISIBLE + mBottomProgressBar.visibility = View.GONE + remainingTv.visibility = View.GONE + durationTv.visibility = View.GONE + } fun getKey(): String { return uuid } + + fun getMuteKey(): String { + return Constants.SP_VIDEO_PLAY_MUTE + uuid + } } \ No newline at end of file diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt index 9b5b7932f7..0e6e9a6209 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt @@ -1,15 +1,16 @@ package com.gh.gamecenter.forum.home +import android.app.Activity import android.text.SpannableStringBuilder import android.view.View -import androidx.appcompat.app.AppCompatActivity import androidx.core.content.ContextCompat import com.gh.base.BaseActivity import com.gh.common.util.* import com.gh.gamecenter.R import com.gh.gamecenter.databinding.CommunityAnswerItemBinding import com.gh.gamecenter.entity.CommunityEntity +import com.gh.gamecenter.entity.ForumVideoEntity import com.gh.gamecenter.forum.detail.ForumDetailActivity import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.qa.answer.BaseAnswerOrArticleItemViewHolder @@ -22,6 +23,8 @@ import com.gh.gamecenter.qa.questions.invite.QuestionsInviteActivity import com.gh.gamecenter.qa.questions.newdetail.NewQuestionDetailActivity import com.gh.gamecenter.qa.video.detail.ForumVideoDetailActivity import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder +import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack +import com.shuyu.gsyvideoplayer.utils.OrientationUtils class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : BaseAnswerOrArticleItemViewHolder(binding.root) { @@ -66,7 +69,7 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B binding.imageContainer.bindData(entity, entrance, path) if (entity.type == "video") { - bindVideoData(entity) + bindVideoData(entity.transformForumVideoEntity()) } else { bindArticleVideoData(entity) } @@ -105,7 +108,7 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B binding.executePendingBindings() } - private fun bindVideoData(entity: AnswerEntity) { + private fun bindVideoData(entity: ForumVideoEntity) { binding.run { if (entity.url.isEmpty()) { horizontalVideoView.visibility = View.GONE @@ -122,6 +125,8 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B horizontalVideoView } + val orientationUtils = OrientationUtils(itemView.context as Activity, visibleView) + orientationUtils.isEnable = false GSYVideoOptionBuilder() .setIsTouchWiget(false) .setUrl(entity.url) @@ -131,14 +136,35 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B .setReleaseWhenLossAudio(true) .setLooping(false) .setShowFullAnimation(false) - .setEnlargeImageRes(R.drawable.ic_article_video_full_screen) + .setEnlargeImageRes(R.drawable.ic_game_detail_enter_full_screen) + .setShrinkImageRes(R.drawable.ic_game_detail_exit_full_screen) + .setVideoAllCallBack(object : GSYSampleCallBack() { + override fun onQuitFullscreen(url: String?, vararg objects: Any) { + orientationUtils.backToProtVideo() + visibleView.uploadVideoStreamingPlaying("退出全屏") + } + }) .build(visibleView) visibleView.run { - updateVideoData(entity.transformForumVideoEntity()) + updateVideoData(entity) updateThumb(entity.poster) updateDurationTv(TimeUtils.formatDuration(entity.length)) - updateMuteStatus() -// observeVolume(itemView.context as AppCompatActivity) + + fullscreenButton.setOnClickListener { + val horizontalVideoView = startWindowFullscreen(itemView.context, true, true) as? ArticleItemVideoView + if (horizontalVideoView == null) { + toastInInternalRelease("全屏失败,请向技术人员提供具体的操作步骤") + return@setOnClickListener + } + orientationUtils.resolveByClick() + horizontalVideoView.uuid = uuid + horizontalVideoView.updateVideoData(entity) + horizontalVideoView.updateThumb(entity.poster) + horizontalVideoView.violenceUpdateMuteStatus() + horizontalVideoView.setFullViewStatus() + uploadVideoStreamingPlaying("开始播放") + uploadVideoStreamingPlaying("点击全屏") + } } } } @@ -161,6 +187,8 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B horizontalVideoView } + val orientationUtils = OrientationUtils(itemView.context as Activity, visibleView) + orientationUtils.isEnable = false GSYVideoOptionBuilder() .setIsTouchWiget(false) .setUrl(video.url) @@ -170,14 +198,35 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B .setReleaseWhenLossAudio(true) .setLooping(false) .setShowFullAnimation(false) - .setEnlargeImageRes(R.drawable.ic_article_video_full_screen) + .setEnlargeImageRes(R.drawable.ic_game_detail_enter_full_screen) + .setShrinkImageRes(R.drawable.ic_game_detail_exit_full_screen) + .setVideoAllCallBack(object : GSYSampleCallBack() { + override fun onQuitFullscreen(url: String?, vararg objects: Any) { + orientationUtils.backToProtVideo() + visibleView.uploadVideoStreamingPlaying("退出全屏") + } + }) .build(visibleView) visibleView.run { updateVideoData(entity.transformForumVideoEntity()) updateThumb(video.poster) updateDurationTv(video.duration) - updateMuteStatus() -// observeVolume(itemView.context as AppCompatActivity) + + fullscreenButton.setOnClickListener { + val horizontalVideoView = startWindowFullscreen(itemView.context, true, true) as? ArticleItemVideoView + if (horizontalVideoView == null) { + toastInInternalRelease("全屏失败,请向技术人员提供具体的操作步骤") + return@setOnClickListener + } + orientationUtils.resolveByClick() + horizontalVideoView.uuid = uuid + horizontalVideoView.updateVideoData(entity.transformForumVideoEntity()) + horizontalVideoView.updateThumb(video.poster) + horizontalVideoView.violenceUpdateMuteStatus() + horizontalVideoView.setFullViewStatus() + uploadVideoStreamingPlaying("开始播放") + uploadVideoStreamingPlaying("点击全屏") + } } } } diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryAdapter.kt b/app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryAdapter.kt index bea561c4af..d7bb13e082 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryAdapter.kt @@ -1,11 +1,11 @@ package com.gh.gamecenter.personalhome.home +import android.app.Activity import android.content.Context import android.text.SpannableStringBuilder import android.util.SparseBooleanArray import android.view.View import android.view.ViewGroup -import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.RecyclerView import com.gh.common.constant.ItemViewType import com.gh.common.util.* @@ -18,10 +18,13 @@ import com.gh.gamecenter.databinding.PersonalHomeRatingBinding import com.gh.gamecenter.databinding.UserHistoryItemBinding import com.gh.gamecenter.entity.ForumVideoEntity import com.gh.gamecenter.entity.PersonalHistoryEntity +import com.gh.gamecenter.forum.home.ArticleItemVideoView import com.gh.gamecenter.gamedetail.rating.edit.RatingEditActivity import com.gh.gamecenter.personalhome.PersonalItemViewHolder import com.gh.gamecenter.qa.entity.AnswerEntity import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder +import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack +import com.shuyu.gsyvideoplayer.utils.OrientationUtils import java.util.regex.Pattern class UserHistoryAdapter(context: Context, @@ -146,6 +149,8 @@ class UserHistoryAdapter(context: Context, horizontalVideoView } + val orientationUtils = OrientationUtils(mContext as Activity, visibleView) + orientationUtils.isEnable = false GSYVideoOptionBuilder() .setIsTouchWiget(false) .setUrl(entity.url) @@ -155,14 +160,35 @@ class UserHistoryAdapter(context: Context, .setReleaseWhenLossAudio(true) .setLooping(false) .setShowFullAnimation(false) - .setEnlargeImageRes(R.drawable.ic_article_video_full_screen) + .setEnlargeImageRes(R.drawable.ic_game_detail_enter_full_screen) + .setShrinkImageRes(R.drawable.ic_game_detail_exit_full_screen) + .setVideoAllCallBack(object : GSYSampleCallBack() { + override fun onQuitFullscreen(url: String?, vararg objects: Any) { + orientationUtils.backToProtVideo() + visibleView.uploadVideoStreamingPlaying("退出全屏") + } + }) .build(visibleView) visibleView.run { updateVideoData(entity) updateThumb(entity.poster) updateDurationTv(TimeUtils.formatDuration(entity.length)) - updateMuteStatus() -// observeVolume(mContext as AppCompatActivity) + + fullscreenButton.setOnClickListener { + val horizontalVideoView = startWindowFullscreen(mContext, true, true) as? ArticleItemVideoView + if (horizontalVideoView == null) { + toastInInternalRelease("全屏失败,请向技术人员提供具体的操作步骤") + return@setOnClickListener + } + orientationUtils.resolveByClick() + horizontalVideoView.uuid = uuid + horizontalVideoView.updateVideoData(entity) + horizontalVideoView.updateThumb(entity.poster) + horizontalVideoView.violenceUpdateMuteStatus() + horizontalVideoView.setFullViewStatus() + uploadVideoStreamingPlaying("开始播放") + uploadVideoStreamingPlaying("点击全屏") + } } } } @@ -185,6 +211,8 @@ class UserHistoryAdapter(context: Context, horizontalVideoView } + val orientationUtils = OrientationUtils(mContext as Activity, visibleView) + orientationUtils.isEnable = false GSYVideoOptionBuilder() .setIsTouchWiget(false) .setUrl(video.url) @@ -194,14 +222,35 @@ class UserHistoryAdapter(context: Context, .setReleaseWhenLossAudio(true) .setLooping(false) .setShowFullAnimation(false) - .setEnlargeImageRes(R.drawable.ic_article_video_full_screen) + .setEnlargeImageRes(R.drawable.ic_game_detail_enter_full_screen) + .setShrinkImageRes(R.drawable.ic_game_detail_exit_full_screen) + .setVideoAllCallBack(object : GSYSampleCallBack() { + override fun onQuitFullscreen(url: String?, vararg objects: Any) { + orientationUtils.backToProtVideo() + visibleView.uploadVideoStreamingPlaying("退出全屏") + } + }) .build(visibleView) visibleView.run { updateVideoData(entity.transformForumVideoEntity()) updateThumb(video.poster) updateDurationTv(video.duration) - updateMuteStatus() -// observeVolume(mContext as AppCompatActivity) + + fullscreenButton.setOnClickListener { + val horizontalVideoView = startWindowFullscreen(mContext, true, true) as? ArticleItemVideoView + if (horizontalVideoView == null) { + toastInInternalRelease("全屏失败,请向技术人员提供具体的操作步骤") + return@setOnClickListener + } + orientationUtils.resolveByClick() + horizontalVideoView.uuid = uuid + horizontalVideoView.updateVideoData(entity.transformForumVideoEntity()) + horizontalVideoView.updateThumb(video.poster) + horizontalVideoView.violenceUpdateMuteStatus() + horizontalVideoView.setFullViewStatus() + uploadVideoStreamingPlaying("开始播放") + uploadVideoStreamingPlaying("点击全屏") + } } } } diff --git a/app/src/main/res/drawable-xxxhdpi/ic_article_video_replay.png b/app/src/main/res/drawable-xxxhdpi/ic_article_video_replay.png deleted file mode 100644 index 7500720b48122b1f2f2175290ddfcc2ca36c4070..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2085 zcmV+=2-^3FP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91P@n?<1ONa40RR91Pyhe`05RZ9PXGW1k4Z#9RCodHoJ(jORUF1m)kMWt z(zI#~K{u_o4H!iP#RQ6qi?-5$E_9(QsbGsOb|XmLDHtrauEYiu%*st&2}*@x5lY3D zw%QbJR7f>gtuffr(l-9So4LtkGH1@2*PT1}-amYqx##hJd^t07UNddi6eu$@Gu@c) z2dlt+U?sQ{+~UJk&j0q|9Or+6Bj6A?+Sb-~iDM$cha0K*40r_m13pFHPaNw{0{V<1zaBtn6wWq_CE{OsmX7g(q+00OjsPOW%g-| zy$C9oH^&!%O)gO2)|!x3HG;wQK+e{y{D@<(f@wzwU#iAtI<}cI;-uqDFXi`ujdALg zpzN1Ck)Mk4Gc|#bw+RCy;Pxm(CC$5n-*-deq{;v5Oc}Oxh-;_JyI`xWtR-K4x&z<@ z7z3xkSupKk3CB(!R&f3xc*sK+$Gk-M%;$ivuIvQzy1+q@R1Q;dJLm(ct^(@c58edF zK_2pLcFds(4|~9g1fKp&on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XRY?#_@(ctg99} zl{x^+XRAG{Rjwli#NQ0;0X~|XH)Lup^wosFAaCV5P)KY~8R9>Nj3yGQ6Aa&;l(hcQ z)oa)85(2vn{Fx5Wah&apl!~7^DyLbx&0T93P8;RMBo@6ym!*Sq9JO0k3;%@)fdLK$ zLDrnYT51=Ep!C&~h31h_7Lir>CqkRPxfoRMexq8(2tpV%a~=_^93gmSJl;=I7J-DC&ro!N4*?kwM9o z?TZE9ZUdHaE@D-*lE00LN?foKN}f2a&-`}|l4a9R#20-;G!(Fu%s_l2bSc3uQCR7Cx(5TgMqB#;vo>(8VkCb zgFAs`Jd0RfI!NgNU;L5rF{T$wm_|9D*J~-90rYn40@6ziPCt>m2;2;&faM_UV@j1Q zQis~ISG<~E71c^Y6kv2P;_resA*#7V^+~-J(6yE9ND5kV)gpI`6f_=f38EscZH!`p z$hXNVDtp;_NTPc6t}lyVmnEr<)V@E{U7sCw#8)_>Vc)~RG68{Djnis8xGLf_l&%h^ zH1xAhh1EnB)i-?*Xirf25)SqUi$S@Nx+l|t+R@rWINT4YBVFp-8Wly6{s+V)pnri^ zdx-!#fXQG3h?_KXtbboH5@>H@tW;7rCah-!BzxL-a!U&RIW`8R(nb_~4wixs>5?4g zm41nfT` W{lGVw&j6?Z0000 + - - - - - + android:textSize="14sp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toLeftOf="@+id/shareTv" /> + android:textSize="14sp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintLeft_toRightOf="@+id/replayTv" /> + + + + + + + diff --git a/app/src/main/res/layout/piece_article_video_control.xml b/app/src/main/res/layout/piece_article_video_control.xml index a608e268a1..ec681d783d 100644 --- a/app/src/main/res/layout/piece_article_video_control.xml +++ b/app/src/main/res/layout/piece_article_video_control.xml @@ -22,12 +22,13 @@ android:id="@+id/fullscreen" android:layout_width="32dp" android:layout_height="32dp" - android:src="@drawable/ic_article_video_volume_off" + android:padding="10dp" + android:src="@drawable/ic_game_detail_enter_full_screen" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toRightOf="parent" /> + +