add[声望升级-修复BUG]
This commit is contained in:
parent
afef088555
commit
cb376aa83a
@ -647,9 +647,9 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
msg1.param("is_ladders", "https://downs.yaoulive.com/rank_top_box.png");
|
||||
msg1.create();
|
||||
System.out.println("PK回执 = " + msg1.toString());
|
||||
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
|
||||
Conversation.ConversationType conversationType = Conversation.ConversationType.PRIVATE;
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain("g" + bean.getId(), conversationType, messageContent);
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain( bean.getId(), conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
@ -772,6 +772,9 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
isPK(u);
|
||||
} else {
|
||||
if (mPkWaitCount < 0) {
|
||||
if(rtcRoom==null){
|
||||
return;
|
||||
}
|
||||
rtcRoom.getLocalUser().responseJoinOtherRoom(u.getId(), u.getId(), false, false, "extra", new IRCRTCResultCallback() {
|
||||
|
||||
@Override
|
||||
@ -1902,6 +1905,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
* 主播与主播PK 所有人收到PK开始的回调
|
||||
*/
|
||||
public void onLinkMicPkStart(String pkUid, int i) {
|
||||
L.eSw("onLinkMicPkStart pkUid "+pkUid+" "+i);
|
||||
Log.d("tag", i + "mPkTimeCount2");
|
||||
mIsPk = true;
|
||||
hideSendPkWait();
|
||||
@ -1910,7 +1914,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
mPkUid = pkUid;
|
||||
mApplyUid = null;
|
||||
mApplyStream = null;
|
||||
|
||||
isDRPK=1;
|
||||
if (mLiveLinkMicPkViewHolder == null) {
|
||||
mLiveLinkMicPkViewHolder = new LiveLinkMicPkViewHolder(mContext, mPkContainer);
|
||||
mLiveLinkMicPkViewHolder.addToParent();
|
||||
@ -1923,7 +1927,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.PK_TWO_START).setObject(pkUid));
|
||||
mLiveLinkMicPkViewHolder.showTime();
|
||||
mPkTimeCount = 100;
|
||||
nextPkTimeCountDown(2);
|
||||
nextPkTimeCountDown(2);//时间倒计时
|
||||
if (mIsAnchor) {
|
||||
((LiveRyAnchorActivity) mContext).setPkBtnVisible(false);
|
||||
mPkTimeCount = PK_TIME_MAX;
|
||||
@ -2000,45 +2004,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
}
|
||||
}
|
||||
});
|
||||
// inputStreamList.clear();
|
||||
RCRTCMixConfig config = new RCRTCMixConfig();
|
||||
RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig();
|
||||
config.setMediaConfig(mediaConfig);
|
||||
//视频输出配置
|
||||
RCRTCMixConfig.MediaConfig.VideoConfig videoConfig = new RCRTCMixConfig.MediaConfig.VideoConfig();
|
||||
mediaConfig.setVideoConfig(videoConfig);
|
||||
//大流视频的输出参数
|
||||
RCRTCMixConfig.MediaConfig.VideoConfig.VideoLayout normal = new RCRTCMixConfig.MediaConfig.VideoConfig.VideoLayout();
|
||||
videoConfig.setVideoLayout(normal);
|
||||
//推荐宽、高、帧率参数值可以通过默认视频流的配置获取,也可以根据实际需求来自定义设置
|
||||
//如不设置宽高值则服务端将使用默认宽高 360 * 640
|
||||
//例:发布的视频分辨率为720 * 1280,如果不设置则观众端看到的视频分辨率为 360 * 640,
|
||||
//所以如果想让观众端看到的视频分辨率和发布视频分辨率一致,则应从发布的视频流中获取分辨率配置并设置到 mediaConfig 中
|
||||
RCRTCVideoStreamConfig defaultVideoConfig = RCRTCEngine.getInstance().getDefaultVideoStream().getVideoConfig();
|
||||
int fps = defaultVideoConfig.getVideoFps().getFps();
|
||||
int width = 720;
|
||||
int height = 1280;
|
||||
normal.setWidth(width); //视频宽
|
||||
normal.setHeight(height); //视频高
|
||||
normal.setFps(fps); //视频帧率
|
||||
|
||||
//1. 设置自适应合流布局模式
|
||||
config.setLayoutMode(RCRTCMixConfig.MixLayoutMode.ADAPTIVE);
|
||||
//2. 合流画布设置
|
||||
if (rcrtcLiveInfo != null) {
|
||||
rcrtcLiveInfo.setMixConfig(config, new IRCRTCResultCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("ry", "混成功16");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode errorCode) {
|
||||
Log.e("ry", "混失败" + errorCode);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
|
@ -648,7 +648,6 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
mLiveRyLinkMicPkPresenter.setPkUserInfoView(u);
|
||||
}
|
||||
|
||||
|
@ -666,6 +666,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}else{//单人连麦
|
||||
LivePkMicModel connection_info = data.getEnterRoomInfo().getConnectionInfo();
|
||||
if(!StringUtil.isEmpty(connection_info.getPkuid())){
|
||||
mPkUid = connection_info.getPkuid();
|
||||
mLivePlayViewHolder.setPkView(connection_info.getPkuid());
|
||||
}
|
||||
}
|
||||
|
@ -744,9 +744,8 @@
|
||||
layout="@layout/view_red_packet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/live_rank_pk"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<FrameLayout
|
||||
|
Loading…
Reference in New Issue
Block a user