主播强制关播功能添加

This commit is contained in:
18401019693 2023-02-02 15:27:41 +08:00
parent 344bbcdfc8
commit 1e595ec526
3 changed files with 54 additions and 2 deletions

View File

@ -229,7 +229,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
long lossRate = statusBean.packetLostRate;
//带宽
String googAvailableSendBandwidth = statusReport.googAvailableSendBandwidth;
Log.e("网速和内存", "获取视频:" +resolution+ " 丢包率:" + lossRate+" 带宽:"+googAvailableSendBandwidth);
Log.e("网速和内存", "获取视频:" + resolution + " 丢包率:" + lossRate + " 带宽:" + googAvailableSendBandwidth);
}
}
});
@ -1596,6 +1596,10 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
case UPDATA_ROBOT:
getAiRobotStatus();
break;
//主播强制下播
case LIVE_END:
endLive();
break;
}
}

View File

@ -31,6 +31,46 @@ public class LiveAudienceEvent extends BaseModel {
private int time;
private CustomFullServiceNotifyEvent customFullServiceNotifyEvent;
private LivePKUserListBean livePKUserListBean;
private String votes;
private String length;
private int nums;
private String uname;
public String getVotes() {
return votes;
}
public LiveAudienceEvent setVotes(String votes) {
this.votes = votes;
return this;
}
public String getLength() {
return length;
}
public LiveAudienceEvent setLength(String length) {
this.length = length;
return this;
}
public int getNums() {
return nums;
}
public LiveAudienceEvent setNums(int nums) {
this.nums = nums;
return this;
}
public String getUname() {
return uname;
}
public LiveAudienceEvent setUname(String uname) {
this.uname = uname;
return this;
}
public LivePKUserListBean getLivePKUserListBean() {
return livePKUserListBean;
@ -258,7 +298,8 @@ public class LiveAudienceEvent extends BaseModel {
CHANGE_VIEW(52, "更改连胜位置"),
UPDATA_ROBOT(53, "更新机器人消息"),
LIVE_VIDEO(54, "画质选择"),
LUCKY_100_CHECK(55,"幸运百分百");
LUCKY_100_CHECK(55, "幸运百分百"),
LIVE_END(56, "主播下播");
private int type;
private String name;

View File

@ -364,6 +364,13 @@ public class SocketRyClient {
} else if (action == 19) {
mListener.onAnchorInvalid();
}
//主播强制下播
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_END)
.setVotes(map.getString("votes"))
.setLength(map.getString("length"))
.setNums(map.getIntValue("nums"))
.setUname(map.getString("uname")));
break;
case Constants.SOCKET_CHANGE_LIVE://主播切换计时收费类型
mListener.onChangeTimeCharge(map.getIntValue("type_val"));