修改融云结束连麦还有对方画面的问题
This commit is contained in:
parent
02b70d559d
commit
2057a3575f
@ -228,7 +228,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
long lossRate = statusBean.packetLostRate;
|
||||
//带宽
|
||||
String googAvailableSendBandwidth = statusReport.googAvailableSendBandwidth;
|
||||
Log.e("网速和内存", "获取视频:" + resolution + " 丢包率:" + lossRate + " 带宽:" + googAvailableSendBandwidth);
|
||||
// Log.e("网速和内存", "获取视频:" + resolution + " 丢包率:" + lossRate + " 带宽:" + googAvailableSendBandwidth);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1632,6 +1632,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
case DISCONNEXT_PK_TIME:
|
||||
if (mLivePushViewHolder != null) {
|
||||
mLivePushViewHolder.changeToBig();
|
||||
mLiveRyLinkMicPkPresenter.leaveDRRoom();
|
||||
}
|
||||
break;
|
||||
case AI_AUTOMATIC_SPEECH:
|
||||
|
@ -4,6 +4,7 @@ import static com.blankj.utilcode.util.SnackbarUtils.dismiss;
|
||||
import static com.lzy.okgo.utils.HttpUtils.runOnUiThread;
|
||||
import static com.yunbao.common.Constants.SOCKET_LINK_MIC_PK;
|
||||
import static com.yunbao.common.Constants.SOCKET_LIVE_DRPK;
|
||||
import static com.yunbao.live.activity.LiveRyAnchorActivity.PKing;
|
||||
import static com.yunbao.live.activity.LiveRyAnchorActivity.isDRPK;
|
||||
import static com.yunbao.live.views.LivePushRyViewHolder.btn_close;
|
||||
import static com.yunbao.live.views.LivePushRyViewHolder.contexts;
|
||||
@ -2324,12 +2325,21 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
* 主播与主播PK 断开连麦PK的回调
|
||||
*/
|
||||
public void onLinkMicPkClose(int i) {
|
||||
Log.e("ry",mPkUid+"aaaaqwqw"+i);
|
||||
|
||||
PKing = false;
|
||||
LiveRyAnchorActivity.isDRPK = 0;
|
||||
|
||||
// //恢复播放画面
|
||||
if (i == 1) {
|
||||
if (btn_close != null) {
|
||||
btn_close.setVisibility(View.GONE);
|
||||
}
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (btn_close != null) {
|
||||
btn_close.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
// inputStreamList.clear();
|
||||
RCRTCMixConfig config = new RCRTCMixConfig();
|
||||
RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig();
|
||||
|
@ -70,6 +70,7 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
|
||||
import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
|
||||
import cn.rongcloud.rtc.base.RTCErrorCode;
|
||||
import io.rong.imlib.IRongCoreCallback;
|
||||
@ -1262,9 +1263,22 @@ public class SocketRyClient {
|
||||
mListener.onLinkMicPkStart(map.getString("pkuid"), map.getString("pkhead"), map.getString("pkname"), map.getString("is_ladders"));
|
||||
break;
|
||||
case 5://PK时候断开连麦的回调
|
||||
if (rtcRoom != null) {
|
||||
// if (rtcRoom != null) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.DISCONNEXT_PK_TIME));
|
||||
RCRTCEngine.getInstance().leaveOtherRoom(map.getString("pkuid"), true, new IRCRTCResultCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("ry", map.getString("pkuid")+"退出多人成功a as");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode rtcErrorCode) {
|
||||
Log.e("ry", map.getString("pkuid")+"退asa出多人失败" + rtcErrorCode);
|
||||
|
||||
}
|
||||
});
|
||||
//断开连麦
|
||||
HttpClient.getInstance().post("livepk.setliveuserout", "livepk.setliveuserout")
|
||||
.execute(new HttpCallback() {
|
||||
@ -1273,7 +1287,7 @@ public class SocketRyClient {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
// }
|
||||
mListener.onLinkMicPkClose(1);
|
||||
if (RandomPkManager.getInstance().isRandomModel()) {
|
||||
RandomPkManager.getInstance().setPkStatus(RandomPkManager.PK_STATUS_DEFAULT);
|
||||
|
@ -4,6 +4,7 @@ import static com.lzy.okgo.utils.HttpUtils.runOnUiThread;
|
||||
import static com.yunbao.common.Constants.SOCKET_LINK_MIC_PK;
|
||||
import static com.yunbao.common.Constants.SOCKET_LIVE_DRPK;
|
||||
import static com.yunbao.live.activity.LiveActivity.mLiveRyLinkMicPkPresenter;
|
||||
import static com.yunbao.live.activity.LiveRyAnchorActivity.PKing;
|
||||
import static com.yunbao.live.presenter.LiveRyLinkMicPkPresenter.inputStreamList;
|
||||
import static com.yunbao.live.presenter.LiveRyLinkMicPkPresenter.inputStreamList1;
|
||||
import static cn.rongcloud.rtc.base.RCRTCLiveRole.BROADCASTER;
|
||||
@ -436,7 +437,6 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.e("ry",roomId+"退出啊房间成功"+userId);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user