From e2f8e52583fb2046a7e12b7f6459041a573bbf26 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 10 Nov 2022 15:13:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E5=A4=84PK=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E7=A9=BA=E6=8C=87=E9=92=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presenter/LiveRyLinkMicPkPresenter.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java index 1eef43666..387427dd3 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -525,18 +525,22 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { //1. 设置自适应合流布局模式 config.setLayoutMode(RCRTCMixConfig.MixLayoutMode.ADAPTIVE); //2. 合流画布设置 - rcrtcLiveInfo.setMixConfig(config, new IRCRTCResultCallback() { - @Override - public void onSuccess() { - Log.e("ry", "混成功" + u.getId()); - } + if(rcrtcLiveInfo!=null) { + rcrtcLiveInfo.setMixConfig(config, new IRCRTCResultCallback() { + @Override + public void onSuccess() { + Log.e("ry", "混成功" + u.getId()); + } - @Override - public void onFailed(RTCErrorCode errorCode) { - Log.e("ry", "混失败" + errorCode); + @Override + public void onFailed(RTCErrorCode errorCode) { + Log.e("ry", "混失败" + errorCode); - } - }); + } + }); + }else{ + Log.w("PkDebug", "PK合流失败,rcrtcLiveInfo为空" ); + } } }