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 b79c02a83..c7502c29e 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -594,7 +594,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { public void onSuccess() { Log.i("ry", "订阅资源成功"); - if (rtcRoom != null) { RCRTCMixConfig config = new RCRTCMixConfig(); RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig(); config.setMediaConfig(mediaConfig); @@ -635,7 +634,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { } else { Log.w("PkDebug", "PK合流失败,rcrtcLiveInfo为空"); } - } } @Override @@ -716,7 +714,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { inputStreamList.add(stream); - if (rtcRoom != null) { RCRTCMixConfig config = new RCRTCMixConfig(); RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig(); @@ -757,7 +754,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { } }); - } } } //开始订阅资源 @@ -885,7 +881,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { Log.i("ry", "订阅资源成功"); List streams = new ArrayList<>(); streams.add(RCRTCEngine.getInstance().getDefaultVideoStream()); - if (rtcRoom != null) { RCRTCMixConfig config = new RCRTCMixConfig(); RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig(); config.setMediaConfig(mediaConfig); @@ -922,7 +917,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { } }); - } } @Override @@ -1155,7 +1149,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { }); } - if (rtcRoom != null) { + RCRTCMixConfig config = new RCRTCMixConfig(); RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig(); config.setMediaConfig(mediaConfig); @@ -1204,7 +1198,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { } }); - } + } leaveHandler.post(leaveRunnable); @@ -1948,7 +1942,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { } - if (rtcRoom != null) { //开始订阅资源 rtcRoom.getLocalUser().subscribeStreams(inputStreamList1, new IRCRTCResultCallback() { @@ -1976,7 +1969,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { } }); - } } } @@ -2328,7 +2320,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { if (btn_close != null) { btn_close.setVisibility(View.GONE); } - if (rtcRoom != null) { // inputStreamList.clear(); RCRTCMixConfig config = new RCRTCMixConfig(); RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig(); @@ -2368,7 +2359,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { } }); } - } + runOnUiThread(new Runnable() { public void run() { // try {