Merge remote-tracking branch 'origin/master'

This commit is contained in:
18142669586 2023-04-13 16:45:07 +08:00
commit 974546697b
2 changed files with 18 additions and 12 deletions

View File

@ -42,7 +42,6 @@ import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.bean.AiAutomaticSpeechModel;
import com.yunbao.common.bean.HttpCallbackModel;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.LinkMicUserBean;
import com.yunbao.common.bean.LiveAiRobotBean;
@ -51,7 +50,6 @@ import com.yunbao.common.bean.LiveUserGiftBean;
import com.yunbao.common.bean.MicUserBean;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.dialog.NotCancelableDialog;
import com.yunbao.common.event.LiveRobotMessageEvent;
import com.yunbao.common.event.LoginInvalidEvent;
import com.yunbao.common.http.CommonHttpConsts;
import com.yunbao.common.http.CommonHttpUtil;
@ -71,7 +69,6 @@ import com.yunbao.common.utils.MicStatusManager;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.InputCustomPopup;
import com.yunbao.common.views.LiveNewWishListPopup;
import com.yunbao.common.views.LiveRobotSettingCustomPopup;
import com.yunbao.faceunity.FaceManager;
@ -81,7 +78,6 @@ import com.yunbao.live.bean.LiveKsyConfigBean;
import com.yunbao.live.bean.LiveReceiveGiftBean;
import com.yunbao.live.dialog.FreePkDialogFragment;
import com.yunbao.live.dialog.LiveNewFunctionDialogFragment;
import com.yunbao.live.dialog.LiveNewWishListDialogFragment;
import com.yunbao.live.dialog.LivePrankDialogFragment;
import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience;
import com.yunbao.live.dialog.RandomPkDialogFragment;
@ -383,6 +379,9 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
}
break;
case Constants.LIVE_FUNC_DR://多人PK
// if (LiveRyLinkMicPkPresenter.inputStreamList.size() == 4) {
// return;
// }
if (isDRPK != 1) {
HttpClient.getInstance().get("live.getdrnum", "live.getdrnum")
.execute(new HttpCallback() {
@ -520,6 +519,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
default:
break;
}
}

View File

@ -209,12 +209,12 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
@Override
public synchronized void setLiveBeanLandscape(int landscape) {
// landscape=1;
Log.i(TAG, "setLiveBeanLandscape: " + landscape);
Log.i(TAG, "setLiveBeanLandscape: " + landscape + " isPk: " + isPk);
this.landscape = landscape;
this.videoLandscape = landscape;
mPlayer.setViewResizeMode(landscape == VIDEO_VERTICAL);
if (landscape == 2) {
Log.i("收到socket--->", "还原916");
Log.i(TAG, "还原916");
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mVideoView.getLayoutParams();
params.height = RelativeLayout.LayoutParams.MATCH_PARENT;
params.topMargin = 0;
@ -233,6 +233,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
mCover.requestLayout();
} else {
Log.i(TAG, "还原16:9");
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mVideoView.getLayoutParams();
params.height = vHeight;
params.topMargin = mContext.getResources().getDimensionPixelOffset(R.dimen.live_top);
@ -258,6 +259,9 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
public void setLiveEnterRoomNewModel(EnterRoomNewModel data) {
super.setLiveEnterRoomNewModel(data);
isPk = data.getEnterRoomInfo().getIsconnection().equals("1");
if (isPk) {
setLiveBeanLandscape(1);
}
}
/**
@ -443,7 +447,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
@Override
public void setViewUP(int i) {
if (mVideoView == null) return;
Log.e("", "整理" + i);
Log.e("PK状态", "" + i);
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mVideoView.getLayoutParams();
params.height = vHeight;
params.topMargin = contexts.getResources().getDimensionPixelOffset(R.dimen.live_top);
@ -478,7 +482,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
}
mPlayer.setViewResizeMode(landscape == VIDEO_VERTICAL);
if (landscape == 2) {
Log.i("收到socket--->", "还原916");
Log.i(TAG, "onPrepared:还原916 land=" + videoLandscape);
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mVideoView.getLayoutParams();
params.height = height;
params.topMargin = 0;
@ -497,6 +501,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
mCover.setLayoutParams(params2);
mCover.requestLayout();
} else {
Log.i(TAG, "onPrepared:还原169");
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mVideoView.getLayoutParams();
params.height = height;
params.topMargin = 0;
@ -744,7 +749,8 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
Log.e("ry", "下麦失败" + errorCode);
leaveRoom();
}
private void leaveRoom(){
private void leaveRoom() {
RCRTCEngine.getInstance().leaveRoom(new IRCRTCResultCallback() {
@Override
public void onSuccess() {
@ -925,7 +931,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
UsertoRY();
}
});
}else{
} else {
ToastUtil.show("房间失败" + errorCode);
}
@ -941,9 +947,9 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
public void run() {
RCRTCEngine.getInstance().enableSpeaker(true);
//遍历远端用户发布的资源列表
Log.i(TAG, "软件资源数量:"+data.getLiveStreams().size());
Log.i(TAG, "软件资源数量:" + data.getLiveStreams().size());
for (RCRTCInputStream stream : data.getLiveStreams()) {
Log.i(TAG, "资源流 type: "+stream.getMediaType());
Log.i(TAG, "资源流 type: " + stream.getMediaType());
if (stream.getMediaType() == RCRTCMediaType.VIDEO) {
//暂停播放
mPlayer.stop();