From c440b589818c4c7b57c9e0a22a53b0b384b82ec5 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Sat, 29 Oct 2022 15:08:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E6=92=AD=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/views/weight/LiveFloatView.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/views/weight/LiveFloatView.java b/common/src/main/java/com/yunbao/common/views/weight/LiveFloatView.java index 6619e8853..b0d2ac354 100644 --- a/common/src/main/java/com/yunbao/common/views/weight/LiveFloatView.java +++ b/common/src/main/java/com/yunbao/common/views/weight/LiveFloatView.java @@ -81,9 +81,15 @@ public class LiveFloatView implements Function1 { } }); ViewClicksAntiShake.clicksAntiShake(videoView, () -> { - mPlayer.stopPlay(); - APPEasyFloat.getInstance().dismiss(mContext); - RouteUtil.forwardLiveAudienceActivity(mLiveBean, mLiveType, mLiveSDK, mLiveTypeVal); + if (mPlayer != null && mPlayer.isPlaying() == 1) { + mPlayer.stopPlay(); + APPEasyFloat.getInstance().dismiss(mContext); + } else if (mPlayer != null) { + mPlayer.stopPlay(); + APPEasyFloat.getInstance().dismiss(mContext); + RouteUtil.forwardLiveAudienceActivity(mLiveBean, mLiveType, mLiveSDK, mLiveTypeVal); + } + }); } @@ -177,8 +183,14 @@ public class LiveFloatView implements Function1 { } }); ViewClicksAntiShake.clicksAntiShake(videoView, () -> { - mPlayer.stopPlay(); - RouteUtil.forwardLiveAudienceActivity(mLiveBean, mLiveType, mLiveSDK, mLiveTypeVal); + if (mPlayer != null && mPlayer.isPlaying() == 1) { + mPlayer.stopPlay(); + EasyFloat.dismiss("LiveFloatView", true); + } else if (mPlayer != null) { + mPlayer.stopPlay(); + RouteUtil.forwardLiveAudienceActivity(mLiveBean, mLiveType, mLiveSDK, mLiveTypeVal); + } + }); } }