From d77721a0bc3f50272154bec4c7910994cd176795 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 20 Sep 2022 15:07:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/activity/LiveAudienceActivity.java | 1 + .../main/java/com/yunbao/live/views/LivePlayRyViewHolder.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index ab4c4d114..f3f7a146d 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -247,6 +247,7 @@ public class LiveAudienceActivity extends LiveActivity { // 满足此种条件,表明需要加载直播视频,以及聊天室了 if (viewGroup.getId() == mCurrentItem && (position == 0) && mCurrentItem != mLastPosition) { loadData(viewGroup, mCurrentItem); + manager.onPause(); } } diff --git a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java index 8a2dc939c..bf35a945b 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java @@ -376,8 +376,9 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { // mVideoView.start(); } mPaused = false; - if (mPlayer.isPlaying()==0){ + if (mPlayer.isPlaying() == 1) { mPlayer.resumeVideo(); + mPlayer.resumeAudio(); } } @@ -388,6 +389,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { // } // mPaused = true; mPlayer.pauseVideo(); + mPlayer.pauseAudio(); } @Override