同步peko:同步音萌完成个播PK屏蔽麦功能
This commit is contained in:
@@ -386,6 +386,7 @@ public class CustomAttachment implements MsgAttachment {
|
||||
public static final int CUSTOM_MSG_SUB_SINGLE_ROOM_PK_RESULT = 8311;// 个播pk结果通知
|
||||
public static final int CUSTOM_MSG_SUB_SINGLE_ROOM_PK_NOTIFY = 8312;// 个播pk结束触发的飘屏通知
|
||||
public static final int CUSTOM_MSG_SUB_SINGLE_ROOM_PK_FINISH = 8313;// 个播pk结束通知
|
||||
public static final int CUSTOM_MSG_SUB_SINGLE_ROOM_PK_MUTE_MIC = 8316;// 个播pk禁用对方麦克风
|
||||
/**
|
||||
* 贵族
|
||||
*/
|
||||
|
@@ -114,6 +114,11 @@ public class RoomPkBean implements Serializable {
|
||||
* PK预约字段
|
||||
*/
|
||||
private long beginTime;
|
||||
// 0:屏蔽 1:开启
|
||||
/**
|
||||
* 个播PK匹配新增字段
|
||||
*/
|
||||
private int aMicStatus;
|
||||
|
||||
@Data
|
||||
public static class RankBean implements Serializable {
|
||||
|
@@ -1324,6 +1324,15 @@ public final class IMNetEaseManager {
|
||||
AvRoomDataManager.get().pkBeginTime = roomPkBean.getBeginTime();
|
||||
noticeRoomEvent(msg, RoomEvent.ROOM_PK_ORDER);
|
||||
break;
|
||||
case CUSTOM_MSG_SUB_SINGLE_ROOM_PK_MUTE_MIC:
|
||||
AudioEngineManager.get().setRemoteMute(roomPkBean.getAUid(), roomPkBean.getAMicStatus() == 0);
|
||||
RoomPkBean currRoomPkBean = AvRoomDataManager.get().roomPkLiveData.getValue();
|
||||
if (currRoomPkBean != null) {
|
||||
currRoomPkBean.setAMicStatus(roomPkBean.getAMicStatus());
|
||||
AvRoomDataManager.get().roomPkLiveData.postValue(currRoomPkBean);
|
||||
}
|
||||
noticeRoomEvent(msg, RoomEvent.ROOM_PK_MUTE_MIC);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case CUSTOM_MSG_VIP:
|
||||
|
@@ -215,6 +215,7 @@ public class RoomEvent {
|
||||
public static final int ROOM_PK_ACCEPT = 74;
|
||||
public static final int ROOM_PK_FINISH = 75;
|
||||
public static final int ROOM_PK_NOTIFY = 76;
|
||||
public static final int ROOM_PK_MUTE_MIC = 78;
|
||||
|
||||
/**
|
||||
* 请求上麦
|
||||
|
@@ -104,6 +104,17 @@ object SingleRoomPKModel {
|
||||
.compose(RxHelper.handleStringData())
|
||||
}
|
||||
|
||||
/**
|
||||
* 对方麦位屏蔽
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
fun muteSingleRoomPkOtherMic(roundId: String, micStatus: Int): Single<String> {
|
||||
return api.muteSingleRoomPkOtherMic(AvRoomDataManager.get().roomUid, roundId, micStatus)
|
||||
.compose(RxHelper.handleSchAndExce())
|
||||
.compose(RxHelper.handleStringData())
|
||||
}
|
||||
|
||||
private interface Api {
|
||||
/**
|
||||
* 发起挑战
|
||||
@@ -172,6 +183,20 @@ object SingleRoomPKModel {
|
||||
fun getSingleRoomPkRule(
|
||||
@Field("roomUid") roomUid: Long?
|
||||
): Single<ServiceResult<String>>
|
||||
|
||||
/**
|
||||
*对方麦位屏蔽
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/crossroompkround/otherMic")
|
||||
fun muteSingleRoomPkOtherMic(
|
||||
@Field("roomUid") roomUid: Long?,
|
||||
@Field("roundId") roundId: String,
|
||||
@Field("micStatus") micStatus: Int
|
||||
): Single<ServiceResult<String>>
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user