77 练歌房 演唱者麦

This commit is contained in:
2025-12-18 17:10:38 +08:00
parent 6130accb48
commit 420afc7a1e
4 changed files with 31 additions and 7 deletions

View File

@@ -1670,6 +1670,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
queren1(text.fromUserInfo.nickname)
} else {
roomFragment?.handleRoomMessage(messageEvent)
if (messageEvent.text.songInfo != null) {
mRoomInfoResp?.song_user_info = messageEvent.text.songInfo
} else {
mRoomInfoResp?.song_user_info = null
}
roomBtnShowIsHide()
}
}
@@ -2806,7 +2813,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
//底部麦上按钮显示
private fun roomBtnShowIsHide() {
//KTV 显示点歌按钮
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id.toString()) == RoomType.DATING
&& mRoomInfoResp?.room_info?.label_id.equals("2")) {
@@ -2818,7 +2824,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
if (mRoomInfoResp?.user_info?.pit_number != 0) {
maiStatus = false
mBinding!!.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding_up)
switchMic(2)
setVoiveState(maiStatus)
mBinding?.rlMai?.visibility = View.VISIBLE
if (mRoomInfoResp?.user_info?.pit_number == 9) {
@@ -2838,6 +2843,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
mBinding?.rlPk?.visibility = View.GONE
}
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id.toString()) == RoomType.DATING
&& mRoomInfoResp?.room_info?.label_id.equals("2")
&& mRoomInfoResp?.song_user_info?.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())){
mBinding?.rlMai?.visibility = View.VISIBLE
return
}
switchMic(2)
}
} else {
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id) == RoomType.JUKEBOX
@@ -2846,6 +2858,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
return
}
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id.toString()) == RoomType.DATING
&& mRoomInfoResp?.room_info?.label_id.equals("2")
&& mRoomInfoResp?.song_user_info?.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())){
mBinding?.rlMai?.visibility = View.VISIBLE
return
}
maiStatus = true
mBinding!!.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding)
switchMic(2)

View File

@@ -110,12 +110,12 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
@Override
public void onRefPitchUpdate(float refPitch, int numberOfRefPitches) {
mKaraokeView.setPitch(refPitch);
}
@Override
public void onLineFinished(KaraokeView view, LyricsLineModel line, int score, int cumulativeScore, int index, int numberOfLines) {
LogUtils.e("onLineFinished :" + score + " " + cumulativeScore + " " + index + " " + numberOfLines);
}
});
@@ -618,7 +618,13 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
@Subscribe(threadMode = ThreadMode.MAIN)
public void roomInfoEvent(MusicPlayBean messageEvent) {
mKaraokeView.setProgress(messageEvent.getPosition());
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
mKaraokeView.setProgress(messageEvent.getPosition());
}
});
qiegSta(messageEvent.getPosition());
}