From a1964c9a3de08915ff414cd7518faf2160a03e58 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 30 Aug 2022 13:58:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E9=97=B4=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E9=BB=98=E8=AE=A4=E5=A4=B4=E5=83=8F=E6=A8=A1?= =?UTF-8?q?=E9=AB=98=E6=96=AF=E8=83=8C=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/views/PortraitLiveManager.java | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index c9232a10b..b150e08d6 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -162,7 +162,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe private boolean mLighted; private boolean mCoinNotEnough;//余额不足 private boolean mFirstConnectSocket;//是否是第一次连接成功socket - private int liveBg; + private int liveBg = -1; private LiveImDeletUtil liveImDeletUtil; private List greetings = new ArrayList<>(); @@ -236,8 +236,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe //直播间背景 - ImgLoader.display(mContext, R.mipmap.live_bg, liveBack); - mask.setVisibility(View.GONE); + ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), liveBack); + mask.setVisibility(View.VISIBLE); + mLivePlayViewHolder.setCover(data.getThumb()); mLivePlayViewHolder.play(data.getPull()); mLiveRoomViewHolder.setAvatar(data.getAvatar()); @@ -918,7 +919,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe @Override public void onHourRank(LiveChatBean bean, JSONObject ranks) { - if(mLiveRoomViewHolder!=null){ + if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.setHourRankData(ranks.getInteger(liveID)); } } @@ -974,15 +975,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mChatLevel = obj.getIntValue("speak_limit"); mDanMuLevel = obj.getIntValue("barrage_limit"); liveBg = obj.getIntValue("live_bg"); + if (obj.containsKey("greetings")) { greetings = JSONArray.parseArray(obj.getJSONArray("greetings").toJSONString(), String.class); } + if (obj.containsKey("live_bg")) { + if (liveBg == 0) { - if (liveBg == 1) { - //直播间背景 - ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), liveBack); - mask.setVisibility(View.VISIBLE); + //直播间背景 + ImgLoader.display(mContext, R.mipmap.live_bg, liveBack); + mask.setVisibility(View.GONE); + } } + //回传参数 Bus.get().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.OPEN_PARAMETERS)