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

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 mCoinNotEnough;//余额不足
private boolean mFirstConnectSocket;//是否是第一次连接成功socket
private int liveBg;
private int liveBg = -1;
private LiveImDeletUtil liveImDeletUtil;
private List<String> 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)