单人Pk问题主播端修复修复
This commit is contained in:
parent
6b0500b5ff
commit
503fb0d7f1
@ -5,7 +5,7 @@ ext {
|
||||
minSdkVersion : 21,
|
||||
targetSdkVersion : 31,
|
||||
versionCode : 310,
|
||||
versionName : "6.4.7"
|
||||
versionName : "6.4.5"
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式
|
||||
|
@ -49,6 +49,7 @@ import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.IMRTCManager;
|
||||
import com.yunbao.common.manager.RandomPkManager;
|
||||
import com.yunbao.common.utils.BitmapUtil;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DateFormatUtil;
|
||||
@ -64,8 +65,6 @@ import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveGuardInfo;
|
||||
import com.yunbao.live.bean.LiveKsyConfigBean;
|
||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||
import com.yunbao.common.bean.MicUserBean;
|
||||
import com.yunbao.live.dialog.FreePkDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveLinkMicListDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewFunctionDialogFragment;
|
||||
@ -85,8 +84,6 @@ import com.yunbao.live.presenter.LiveRyLinkMicPkPresenter;
|
||||
import com.yunbao.live.socket.SocketRyChatUtil;
|
||||
import com.yunbao.live.socket.SocketRyClient;
|
||||
import com.yunbao.live.socket.SocketSendBean;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.manager.RandomPkManager;
|
||||
import com.yunbao.live.views.LiveEndViewHolder;
|
||||
import com.yunbao.live.views.LiveMusicViewHolder;
|
||||
import com.yunbao.live.views.LiveNewReadyRyViewHolder;
|
||||
@ -98,9 +95,7 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
|
||||
@ -1453,6 +1448,12 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
mLiveRoomViewHolder.endDRGif();
|
||||
}
|
||||
break;
|
||||
case DISCONNEXT_PK_TIME:
|
||||
if (mLivePushViewHolder != null) {
|
||||
mLivePushViewHolder.changeToBig();
|
||||
mLivePushViewHolder.closeButtonGone();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,8 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
SOCKET_LIVE_DRPK_SET_PK_END_VIEW(45, "setPkEndview"),
|
||||
LEAVE_DR_ROOM(46, "结束多人PK"),
|
||||
LEAVE_PK_SCORE(47, "PK排名"),
|
||||
PK_TIME_COUNT(48, "多人PK结束");
|
||||
PK_TIME_COUNT(48, "多人PK结束"),
|
||||
DISCONNEXT_PK_TIME(50, "单人Pk结束");
|
||||
|
||||
private int type;
|
||||
private String name;
|
||||
|
@ -376,7 +376,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, mScreenWdith * 720 / 960);
|
||||
params.weight = 1;
|
||||
params.topMargin = mContext.getResources().getDimensionPixelOffset(R.dimen.live_top);
|
||||
livePushRyViewHolder.mPreView.setLayoutParams(params);
|
||||
livePushRyViewHolder.camera.setLayoutParams(params);
|
||||
livePushRyViewHolder.mPreView1.setLayoutParams(params);
|
||||
}
|
||||
|
||||
@ -766,7 +766,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, mScreenWdith * 720 / 960);
|
||||
params.weight = 1;
|
||||
params.topMargin = mContext.getResources().getDimensionPixelOffset(R.dimen.live_top);
|
||||
livePushRyViewHolder.mPreView.setLayoutParams(params);
|
||||
livePushRyViewHolder.camera.setLayoutParams(params);
|
||||
livePushRyViewHolder.mPreView1.setLayoutParams(params);
|
||||
livePushRyViewHolder.mPreView1.setVisibility(View.VISIBLE);
|
||||
|
||||
@ -810,7 +810,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, mScreenWdith * 720 / 960);
|
||||
params.weight = 1;
|
||||
params.topMargin = mContext.getResources().getDimensionPixelOffset(R.dimen.live_top);
|
||||
livePushRyViewHolder.mPreView.setLayoutParams(params);
|
||||
livePushRyViewHolder.camera.setLayoutParams(params);
|
||||
livePushRyViewHolder.mPreView1.setLayoutParams(params);
|
||||
livePushRyViewHolder.mPreView1.setVisibility(View.VISIBLE);
|
||||
LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE);
|
||||
|
@ -1070,17 +1070,8 @@ public class SocketRyClient {
|
||||
break;
|
||||
case 5://PK时候断开连麦的回调
|
||||
if (rtcRoom != null) {
|
||||
RandomPkManager.getInstance().setPkStatus(RandomPkManager.PK_STATUS_CLOSE);
|
||||
/* if (LivePushRyViewHolder.mPreView1 != null) {
|
||||
LivePushRyViewHolder.mPreView1.removeAllViews();
|
||||
LivePushRyViewHolder.mPreView1.setVisibility(View.GONE);
|
||||
isDRPK = 0;
|
||||
leaveDRRoom();
|
||||
}*/
|
||||
LivePushRyViewHolder.btn_close.setVisibility(View.GONE);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
|
||||
params.topMargin = 0;
|
||||
// LivePushRyViewHolder.mPreView.setLayoutParams(params);
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.DISCONNEXT_PK_TIME));
|
||||
//断开连麦
|
||||
HttpClient.getInstance().post("livepk.setliveuserout", "livepk.setliveuserout")
|
||||
.execute(new HttpCallback() {
|
||||
|
@ -416,6 +416,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
||||
mPreView1.setVisibility(View.GONE);
|
||||
inputStreamList.clear();
|
||||
inputStreamList1.clear();
|
||||
changeToBig();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -621,19 +622,28 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
||||
params.width = mPreView.getWidth() / 2;
|
||||
params.height = DpUtil.dp2px(250);
|
||||
params.topMargin = DpUtil.dp2px(130);
|
||||
mPreView.setLayoutParams(params);
|
||||
camera.setLayoutParams(params);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeToBig() {
|
||||
if (mPreView != null) {
|
||||
FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) mPreView.getLayoutParams();
|
||||
if (camera != null) {
|
||||
LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) camera.getLayoutParams();
|
||||
params.width = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
params.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
params.topMargin = 0;
|
||||
mPreView.setLayoutParams(params);
|
||||
camera.setLayoutParams(params);
|
||||
}
|
||||
if (mPreView1.getVisibility()==View.VISIBLE){
|
||||
mPreView1.removeAllViews();
|
||||
mPreView1.setVisibility(View.GONE);
|
||||
inputStreamList.clear();
|
||||
inputStreamList1.clear();
|
||||
}
|
||||
}
|
||||
public void closeButtonGone(){
|
||||
btn_close.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user