1:修改BUG
This commit is contained in:
@@ -786,7 +786,7 @@ public class AgoraManager {
|
|||||||
VD_1280x720,
|
VD_1280x720,
|
||||||
FRAME_RATE_FPS_15,
|
FRAME_RATE_FPS_15,
|
||||||
STANDARD_BITRATE,
|
STANDARD_BITRATE,
|
||||||
ORIENTATION_MODE_FIXED_LANDSCAPE
|
ORIENTATION_MODE_ADAPTIVE
|
||||||
));
|
));
|
||||||
rtcEngine.startScreenCapture(screenCaptureParameters);
|
rtcEngine.startScreenCapture(screenCaptureParameters);
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_40">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.CircularImage
|
<com.xscm.moduleutil.widget.CircularImage
|
||||||
android:id="@+id/user_icon"
|
android:id="@+id/user_icon"
|
||||||
android:layout_width="@dimen/dp_18"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="@dimen/dp_10"
|
|
||||||
android:src="@mipmap/default_avatar"
|
android:src="@mipmap/default_avatar"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
LogUtils.e("lxj", "开始时间:" + TimeUtils.date2String(Date()))
|
LogUtils.e("lxj", "开始时间:" + TimeUtils.date2String(Date()))
|
||||||
|
|
||||||
if (taskId != null) {
|
if (taskId != null) {
|
||||||
if (taskId == "9") {
|
if (taskId == "9" || taskId == "8") {
|
||||||
MyRoomSingleton.getInstance().onEnterRoom(taskId)
|
MyRoomSingleton.getInstance().onEnterRoom(taskId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1694,6 +1694,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: 房间类型切换
|
||||||
private fun handleMsgType1012() {
|
private fun handleMsgType1012() {
|
||||||
if (customMusicFloatingView != null) {
|
if (customMusicFloatingView != null) {
|
||||||
customMusicFloatingView!!.destroy()
|
customMusicFloatingView!!.destroy()
|
||||||
@@ -3370,12 +3371,15 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
mBinding!!.ivQuanC.setOnClickListener { v: View? ->
|
mBinding!!.ivQuanC.setOnClickListener { v: View? ->
|
||||||
if (mRoomInfoResp?.room_info?.head_line?.room_id != null && mRoomInfoResp?.room_info?.head_line?.room_id!!.isNotEmpty()) {
|
if (mRoomInfoResp?.room_info?.head_line?.room_id != null && mRoomInfoResp?.room_info?.head_line?.room_id!!.isNotEmpty()) {
|
||||||
if (mRoomInfoResp?.room_info?.head_line?.room_id != roomId) {
|
if (mRoomInfoResp?.room_info?.head_line?.room_id != roomId) {
|
||||||
RoomManager.getInstance().fetchRoomDataAndEnter(
|
// RoomManager.getInstance().fetchRoomDataAndEnter(
|
||||||
applicationContext,
|
// applicationContext,
|
||||||
mRoomInfoResp?.room_info?.head_line?.room_id,
|
// mRoomInfoResp?.room_info?.head_line?.room_id,
|
||||||
"",
|
// "",
|
||||||
null
|
// null
|
||||||
)
|
// )
|
||||||
|
MessageListenerSingleton.getInstance()
|
||||||
|
.joinGroup(mRoomInfoResp?.room_info?.head_line?.room_id)
|
||||||
|
MvpPre?.getRoomIn(mRoomInfoResp?.room_info?.head_line?.room_id, "")
|
||||||
} else {
|
} else {
|
||||||
com.blankj.utilcode.util.ToastUtils.showLong("您就在当前房间")
|
com.blankj.utilcode.util.ToastUtils.showLong("您就在当前房间")
|
||||||
}
|
}
|
||||||
@@ -3552,7 +3556,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
is RoomTaskEvent -> {
|
is RoomTaskEvent -> {
|
||||||
if (taskId != null && taskId != "9") { //这是每日任务完成发送私聊信息的事件
|
if (taskId != null && taskId != "9" && taskId !="8") { //这是每日任务完成发送私聊信息的事件
|
||||||
RetrofitClient.getInstance()
|
RetrofitClient.getInstance()
|
||||||
.dailyTasksComplete(taskId, object : BaseObserver<RoomSingleton?>() {
|
.dailyTasksComplete(taskId, object : BaseObserver<RoomSingleton?>() {
|
||||||
override fun onSubscribe(d: Disposable) {
|
override fun onSubscribe(d: Disposable) {
|
||||||
@@ -3644,7 +3648,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
roomId2 = event.room_id
|
roomId2 = event.room_id
|
||||||
|
MessageListenerSingleton.getInstance().joinGroup(event.room_id)
|
||||||
MvpPre?.getRoomIn(event.room_id, "")
|
MvpPre?.getRoomIn(event.room_id, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -406,6 +406,9 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
|||||||
mBinding.wvZc.setRoomWheatNumber("9");
|
mBinding.wvZc.setRoomWheatNumber("9");
|
||||||
mBinding.wvZc.isMentorShip(true);
|
mBinding.wvZc.isMentorShip(true);
|
||||||
mBinding.wvZc.setData(roomPitBean);
|
mBinding.wvZc.setData(roomPitBean);
|
||||||
|
if (roomPitBean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||||
|
upMike(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
adapter.setNewData(roomPitBeans);
|
adapter.setNewData(roomPitBeans);
|
||||||
@@ -460,7 +463,6 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
|||||||
if (mBinding.wvZc.getUserId() != null && !mBinding.wvZc.getUserId().equals("0") && !mBinding.wvZc.getUserId().equals("") && mBinding.wvZc.getUserId().equals(SpUtil.getUserId() + "")) {
|
if (mBinding.wvZc.getUserId() != null && !mBinding.wvZc.getUserId().equals("0") && !mBinding.wvZc.getUserId().equals("") && mBinding.wvZc.getUserId().equals(SpUtil.getUserId() + "")) {
|
||||||
mBinding.imQg.setVisibility(VISIBLE);
|
mBinding.imQg.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
setMike();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -478,29 +480,6 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 2025/12/4 判断麦克风是否显示
|
|
||||||
private void setMike(){
|
|
||||||
|
|
||||||
try {
|
|
||||||
for (int i=0;i<roomPitBeans.size();i++){
|
|
||||||
if (roomPitBeans.get(i).getUser_id().equals(SpUtil.getUserId()+"")
|
|
||||||
|| roomInfoResp.getSinger_info().getSong_info().getSinger_user_id()==SpUtil.getUserId()){
|
|
||||||
if (getActivity()!=null){
|
|
||||||
if (getActivity() instanceof RoomActivity) {
|
|
||||||
((RoomActivity) getActivity()).setrlMic(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
if (getActivity()!=null){
|
|
||||||
if (getActivity() instanceof RoomActivity) {
|
|
||||||
((RoomActivity) getActivity()).setrlMic(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void event1003(RoomMessageEvent messageEvent) {
|
public void event1003(RoomMessageEvent messageEvent) {
|
||||||
UserInfo fromUserInfo = messageEvent.getText().getFromUserInfo();
|
UserInfo fromUserInfo = messageEvent.getText().getFromUserInfo();
|
||||||
@@ -553,6 +532,13 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
|||||||
LogUtils.e("juke", e.getMessage());
|
LogUtils.e("juke", e.getMessage());
|
||||||
pitBean.setImageType(false);
|
pitBean.setImageType(false);
|
||||||
}
|
}
|
||||||
|
if (pitBean.getUser_id().equals(SpUtil.getUserId()+"")){
|
||||||
|
if (getActivity()!=null){
|
||||||
|
if (getActivity() instanceof RoomActivity) {
|
||||||
|
((RoomActivity) getActivity()).setrlMic(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 使用set方法更新数据,然后通知适配器
|
// 使用set方法更新数据,然后通知适配器
|
||||||
roomPitBeans.set(position, pitBean);
|
roomPitBeans.set(position, pitBean);
|
||||||
@@ -566,15 +552,24 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
|||||||
configGameOptionBtn();
|
configGameOptionBtn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setMike();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 配置操作按钮
|
/// 配置操作按钮
|
||||||
private void configGameOptionBtn() {
|
private void configGameOptionBtn() {
|
||||||
if (myPitNumber == 9) {
|
if (myPitNumber == 9) {
|
||||||
mBinding.imQg.setVisibility(VISIBLE);
|
mBinding.imQg.setVisibility(VISIBLE);
|
||||||
|
if (getActivity() != null) {
|
||||||
|
if (getActivity() instanceof RoomActivity) {
|
||||||
|
((RoomActivity) getActivity()).setrlMic(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mBinding.imQg.setVisibility(GONE);
|
mBinding.imQg.setVisibility(GONE);
|
||||||
|
if (getActivity() != null) {
|
||||||
|
if (getActivity() instanceof RoomActivity) {
|
||||||
|
((RoomActivity) getActivity()).setrlMic(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -629,6 +624,13 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
|||||||
// 使用set方法更新数据,然后通知适配器
|
// 使用set方法更新数据,然后通知适配器
|
||||||
roomPitBeans.set(position, pitBean);
|
roomPitBeans.set(position, pitBean);
|
||||||
adapter.notifyItemChanged(position);
|
adapter.notifyItemChanged(position);
|
||||||
|
if (SpUtil.getUserId() == userId) {
|
||||||
|
if (getActivity() != null) {
|
||||||
|
if (getActivity() instanceof RoomActivity) {
|
||||||
|
((RoomActivity) getActivity()).setrlMic(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (userId == SpUtil.getUserId()) {
|
if (userId == SpUtil.getUserId()) {
|
||||||
myPitNumber = 0;
|
myPitNumber = 0;
|
||||||
@@ -636,7 +638,6 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
|||||||
configGameOptionBtn();
|
configGameOptionBtn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setMike();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void event1039(RoomMessageEvent event) {
|
public void event1039(RoomMessageEvent event) {
|
||||||
@@ -688,7 +689,6 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
|||||||
adapter.notifyItemChanged(toIndex);
|
adapter.notifyItemChanged(toIndex);
|
||||||
}
|
}
|
||||||
LogUtils.e("huanmai2", mBinding.wvZc.pitBean);
|
LogUtils.e("huanmai2", mBinding.wvZc.pitBean);
|
||||||
setMike();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -757,18 +757,8 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
|||||||
mBinding.ciNetAva.setVisibility(GONE);
|
mBinding.ciNetAva.setVisibility(GONE);
|
||||||
mBinding.tvSong.setText("演唱歌曲:无");
|
mBinding.tvSong.setText("演唱歌曲:无");
|
||||||
}
|
}
|
||||||
setMike();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 2025/11/22 当有演唱者的时候,修改演唱者头像的大小
|
|
||||||
private void setUserAvaSize(int size) {
|
|
||||||
// 设置控件大小为50dp x 50dp
|
|
||||||
// int sizeInPx = (int) (size * getResources().getDisplayMetrics().density + 0.5f);
|
|
||||||
// ViewGroup.LayoutParams layoutParams = mBinding.ciUserAva.getLayoutParams();
|
|
||||||
// layoutParams.width = sizeInPx;
|
|
||||||
// layoutParams.height = sizeInPx;
|
|
||||||
// mBinding.ciUserAva.setLayoutParams(layoutParams);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: 2025/11/22 当在演唱位的时候,显示麦克风,当上麦的时候,也展示麦克风,
|
// TODO: 2025/11/22 当在演唱位的时候,显示麦克风,当上麦的时候,也展示麦克风,
|
||||||
private void upMike(boolean isBool) {
|
private void upMike(boolean isBool) {
|
||||||
@@ -797,7 +787,6 @@ public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, Fragm
|
|||||||
adapter.notifyItemChanged(i);
|
adapter.notifyItemChanged(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setMike();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void event1021(RoomMessageEvent messageEvent) {
|
public void event1021(RoomMessageEvent messageEvent) {
|
||||||
|
|||||||
@@ -287,8 +287,8 @@ class BosomFriendFragment : BaseMvpFragment<UserHomepagePresenter?, FragmentBoso
|
|||||||
// 只有在第一页或刷新时才更新cp数据
|
// 只有在第一页或刷新时才更新cp数据
|
||||||
if (!isLoadMore) {
|
if (!isLoadMore) {
|
||||||
if (data.cp != null) {
|
if (data.cp != null) {
|
||||||
mBinding.tvHeartbeat.text =
|
// mBinding.tvHeartbeat.text =
|
||||||
if (data.cp?.name.isNullOrEmpty()) "心动" else data.cp.name
|
// if (data.cp?.name.isNullOrEmpty()) "心动" else data.cp.name
|
||||||
cpBean = data.cp
|
cpBean = data.cp
|
||||||
if (data.cp.user_info1 != null && data.cp.user_info2 != null) {
|
if (data.cp.user_info1 != null && data.cp.user_info2 != null) {
|
||||||
mBinding.llCp.visibility = View.VISIBLE
|
mBinding.llCp.visibility = View.VISIBLE
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class RoomTalentDialog(context: Context, val roomId: String) :
|
|||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
mBinding.tvQd.setOnClickListener {
|
mBinding.tvQd.setOnClickListener {
|
||||||
if (adapter?.getSelectedValue()?.isEmpty() == true) {
|
if (adapter?.getSelectedValue()?.isEmpty() == true || adapter?.getSelectedValue()==null) {
|
||||||
ToastUtils.show("请选择才艺")
|
ToastUtils.show("请选择才艺")
|
||||||
} else {
|
} else {
|
||||||
var messageEvent =
|
var messageEvent =
|
||||||
@@ -52,9 +52,10 @@ class RoomTalentDialog(context: Context, val roomId: String) :
|
|||||||
(ActivityUtils.getTopActivity() as? RoomActivity)?.let { roomActivity ->
|
(ActivityUtils.getTopActivity() as? RoomActivity)?.let { roomActivity ->
|
||||||
roomActivity.dialogMessage(messageEvent)
|
roomActivity.dialogMessage(messageEvent)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -95,15 +95,15 @@ public class RoomManager {
|
|||||||
fetchAndJoinRoom(context, roomId, password, taskId);
|
fetchAndJoinRoom(context, roomId, password, taskId);
|
||||||
} else {
|
} else {
|
||||||
if (!CommonAppContext.getInstance().playId.equals(roomId)) {
|
if (!CommonAppContext.getInstance().playId.equals(roomId)) {
|
||||||
// MessageListenerSingleton.getInstance().joinGroup(roomId);
|
MessageListenerSingleton.getInstance().joinGroup(roomId);
|
||||||
// exitRoom(CommonAppContext.getInstance().playId);
|
exitRoom(CommonAppContext.getInstance().playId);
|
||||||
// CommonAppContext.getInstance().isShow = false;
|
CommonAppContext.getInstance().isShow = false;
|
||||||
// CommonAppContext.getInstance().isPlaying = false;
|
CommonAppContext.getInstance().isPlaying = false;
|
||||||
// CommonAppContext.getInstance().isRoomJoininj = false;
|
CommonAppContext.getInstance().isRoomJoininj = false;
|
||||||
// EventBus.getDefault().post(new RoomOutEvent());
|
EventBus.getDefault().post(new RoomOutEvent());
|
||||||
|
|
||||||
fetchAndJoinRoom(context, roomId, password, taskId);
|
// fetchAndJoinRoom(context, roomId, password, taskId);
|
||||||
return;
|
// return;
|
||||||
} else if (CommonAppContext.getInstance().lable_id.equals("6")) {
|
} else if (CommonAppContext.getInstance().lable_id.equals("6")) {
|
||||||
upInfo(context, roomId, password, true, roomInfo, true, taskId);
|
upInfo(context, roomId, password, true, roomInfo, true, taskId);
|
||||||
return;
|
return;
|
||||||
@@ -160,12 +160,12 @@ public class RoomManager {
|
|||||||
queren(resp.getRoom_id(),resp.getMsg());
|
queren(resp.getRoom_id(),resp.getMsg());
|
||||||
}else {
|
}else {
|
||||||
|
|
||||||
MessageListenerSingleton.getInstance().joinGroup(roomId);
|
// MessageListenerSingleton.getInstance().joinGroup(roomId);
|
||||||
exitRoom(CommonAppContext.getInstance().playId);
|
// exitRoom(CommonAppContext.getInstance().playId);
|
||||||
CommonAppContext.getInstance().isShow = false;
|
// CommonAppContext.getInstance().isShow = false;
|
||||||
CommonAppContext.getInstance().isPlaying = false;
|
// CommonAppContext.getInstance().isPlaying = false;
|
||||||
CommonAppContext.getInstance().isRoomJoininj = false;
|
// CommonAppContext.getInstance().isRoomJoininj = false;
|
||||||
EventBus.getDefault().post(new RoomOutEvent());
|
// EventBus.getDefault().post(new RoomOutEvent());
|
||||||
|
|
||||||
String appId = CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId();
|
String appId = CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId();
|
||||||
String token = resp.getUser_info().getAgora_token(); // 如果启用了鉴权才需要
|
String token = resp.getUser_info().getAgora_token(); // 如果启用了鉴权才需要
|
||||||
|
|||||||
Reference in New Issue
Block a user