主播开播问题

This commit is contained in:
18401019693 2022-09-01 15:12:58 +08:00
parent 0d93c91e65
commit f9d26a6d56
3 changed files with 9 additions and 1 deletions

View File

@ -175,11 +175,16 @@ public class AppContext extends CommonAppContext {
TextMessage content = (TextMessage) message.getContent();
if (content.getContent().contains("_method_")) {
msg.obj = content.getContent();
//观众页面
if (SocketRyClient.mSocketHandler != null
&& (TextUtils.equals("__system__", message.getTargetId())
|| ("g" + PortraitLiveManager.liveID).contains(message.getTargetId()))) {
SocketRyClient.mSocketHandler.sendMessage(msg);
}
//主播页面
if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketRyClient.mSocketHandler != null) {
SocketRyClient.mSocketHandler.sendMessage(msg);
}
}
}
} catch (Exception e) {

View File

@ -158,7 +158,8 @@ public class LiveAudienceActivity extends LiveActivity {
}
public static LiveRoomPlayViewHolder getmLivePlayViewHolder() {
return manager.getmLivePlayViewHolder();
return manager == null ? null : manager.getmLivePlayViewHolder();
}
public static void setCurrentItem(int index) {
@ -384,6 +385,7 @@ public class LiveAudienceActivity extends LiveActivity {
LiveHttpUtil.cancel(LiveHttpConsts.ENTER_ROOM);
LiveHttpUtil.cancel(LiveHttpConsts.ROOM_CHARGE);
CommonHttpUtil.cancel(CommonHttpConsts.GET_BALANCE);
PortraitLiveManager.liveID = "";
super.release();
}

View File

@ -882,6 +882,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
findViewById(R.id.live_wks_layout).setVisibility(View.GONE);
findViewById(R.id.wish_list_layout).setVisibility(View.GONE);
findViewById(R.id.open_sidebar).setVisibility(View.GONE);
findViewById(R.id.btn_follow).setVisibility(View.GONE);
}
}