直播间背景改为默认头像模高斯背景

This commit is contained in:
18401019693 2022-08-30 13:58:02 +08:00
parent 31b7667a3d
commit a1964c9a3d

View File

@ -162,7 +162,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
private boolean mLighted; private boolean mLighted;
private boolean mCoinNotEnough;//余额不足 private boolean mCoinNotEnough;//余额不足
private boolean mFirstConnectSocket;//是否是第一次连接成功socket private boolean mFirstConnectSocket;//是否是第一次连接成功socket
private int liveBg; private int liveBg = -1;
private LiveImDeletUtil liveImDeletUtil; private LiveImDeletUtil liveImDeletUtil;
private List<String> greetings = new ArrayList<>(); private List<String> greetings = new ArrayList<>();
@ -236,8 +236,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
//直播间背景 //直播间背景
ImgLoader.display(mContext, R.mipmap.live_bg, liveBack); ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), liveBack);
mask.setVisibility(View.GONE); mask.setVisibility(View.VISIBLE);
mLivePlayViewHolder.setCover(data.getThumb()); mLivePlayViewHolder.setCover(data.getThumb());
mLivePlayViewHolder.play(data.getPull()); mLivePlayViewHolder.play(data.getPull());
mLiveRoomViewHolder.setAvatar(data.getAvatar()); mLiveRoomViewHolder.setAvatar(data.getAvatar());
@ -918,7 +919,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
@Override @Override
public void onHourRank(LiveChatBean bean, JSONObject ranks) { public void onHourRank(LiveChatBean bean, JSONObject ranks) {
if(mLiveRoomViewHolder!=null){ if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.setHourRankData(ranks.getInteger(liveID)); mLiveRoomViewHolder.setHourRankData(ranks.getInteger(liveID));
} }
} }
@ -974,15 +975,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mChatLevel = obj.getIntValue("speak_limit"); mChatLevel = obj.getIntValue("speak_limit");
mDanMuLevel = obj.getIntValue("barrage_limit"); mDanMuLevel = obj.getIntValue("barrage_limit");
liveBg = obj.getIntValue("live_bg"); liveBg = obj.getIntValue("live_bg");
if (obj.containsKey("greetings")) { if (obj.containsKey("greetings")) {
greetings = JSONArray.parseArray(obj.getJSONArray("greetings").toJSONString(), String.class); greetings = JSONArray.parseArray(obj.getJSONArray("greetings").toJSONString(), String.class);
} }
if (obj.containsKey("live_bg")) {
if (liveBg == 0) {
if (liveBg == 1) { //直播间背景
//直播间背景 ImgLoader.display(mContext, R.mipmap.live_bg, liveBack);
ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), liveBack); mask.setVisibility(View.GONE);
mask.setVisibility(View.VISIBLE); }
} }
//回传参数 //回传参数
Bus.get().post(new LiveAudienceEvent() Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.OPEN_PARAMETERS) .setType(LiveAudienceEvent.LiveAudienceType.OPEN_PARAMETERS)