fix[修复融云直播间,多人PK主播信息问题]

This commit is contained in:
Martin 2024-06-02 16:57:48 +08:00
parent cb2729433e
commit 4bd1e4bc91
6 changed files with 24 additions and 18 deletions

View File

@ -80,9 +80,9 @@ public class CommonAppConfig {
public static String SWToken = ""; //声网Token
public static final String SWChannelPrefix = "g";
//测试服
//public static final String SWAPPId = "4cf0376582d742ac8a96778b25b1079e";
public static final String SWAPPId = "4cf0376582d742ac8a96778b25b1079e";
//正式服
public static final String SWAPPId = "d4a5879524d74c20a7bdd667b0f2ca21";
//public static final String SWAPPId = "d4a5879524d74c20a7bdd667b0f2ca21";

View File

@ -165,7 +165,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
private boolean mPaused;
String mBeautySdkType;
public static int isDRPK = 0;
public static int DRPKing = 0; // 0 多人PK前 1 多人PK中 2多人PK后
public static int DRPKing = -1; //-1 未发起多人PK 0 多人PK前 1 多人PK中 2多人PK后
public static boolean PKing = false;
public static int pk_nub;
public static int backIndex = 0;//0=未判断1=已判断
@ -874,7 +874,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
MicUserManager.get().removeAllMicUserList();
PKing = false;
isDRPK = 0;
DRPKing = 0;
DRPKing = -1;
endLive();
RandomPkManager.getInstance().release();
}

View File

@ -567,7 +567,7 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener {
pkScores.remove(removeUid);
upDataPkScore(pkScores,"-1",0,false);
}
}, 1000);
}, 100);
}
@ -802,6 +802,11 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener {
private String TAG = "多人PK";
public void editPkRoom(String uid){
SWManager.get().exitChannelToUid(Integer.parseInt(CommonAppConfig.getInstance().getUid()), uid);
}
/**
* 退出多人PK
*/
@ -1252,12 +1257,7 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener {
linearGrade1.setVisibility(View.GONE);
}
public void setPkUserInfoView(UserBean userBean) {
}
//多人PK接受申请画 加入副房间
//多人PK接受申请画
public void dRjoinOtherRoom(UserBean u) {
L.eSw("dRjoinOtherRoom UserBeanUserBeanUserBeanUserBeanUserBeanUserBeanUserBeanUserBean ");
setMyDrPkDetailsView();
@ -1972,7 +1972,9 @@ public class LiveSwLinkMicPkPresenter implements View.OnClickListener {
mHandler.sendEmptyMessageAtTime(WHAT_PK_TIME2, getNextSecondTime());
}
} else {
mLiveAnchorViewHolder.showEndPkBt();
if(DRPKing!=-1){
mLiveAnchorViewHolder.showEndPkBt();
}
livePushSwViewHolder.timeTitle.setVisibility(View.GONE);
if (mHandler != null) {
mHandler.removeCallbacksAndMessages(null);

View File

@ -335,6 +335,7 @@ public class SocketSwClient {
DRPKing = 1;
} else if (action3 == 5) {//结束PK
// endDRGif();
DRPKing= -1;
LiveRoomViewHolder.d_pk_view.setVisibility(View.GONE);
if (LiveSwAnchorActivity.mLiveAnchorViewHolder != null) {
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);

View File

@ -344,8 +344,6 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX
}
}
});
mLiveSwLinkMicPkPresenter.setPkUserInfoView(u);
}
private int currentPosition = 0;
@ -396,7 +394,10 @@ public class LivePushSwViewHolder extends AbsRyLivePushViewHolder implements ITX
}
public void anchorClose() {
swManager.exitChannelToUid(Integer.parseInt(CommonAppConfig.getInstance().getUid()),pkUid1);
swManager.updateMyChannelView((FrameLayout) mBigContainer); //用户主动断开连麦再退出画面
mPkContainer.setVisibility(View.GONE);
pkUid1 = null;
}
public void onLinkMicAnchorClose() {

View File

@ -5,8 +5,9 @@
<!--左上-->
<LinearLayout
android:id="@+id/lin_pk1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@color/gray1"
android:orientation="vertical"
android:visibility="gone">
@ -60,8 +61,9 @@
<!--右上-->
<LinearLayout
android:id="@+id/lin_pk2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@color/red"
android:layout_gravity="end"
android:gravity="end"
android:orientation="vertical"