修改融云合流不成功的问题

This commit is contained in:
18142669586 2023-08-07 18:06:46 +08:00
parent dbbe753492
commit d899975495

View File

@ -594,7 +594,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
public void onSuccess() { public void onSuccess() {
Log.i("ry", "订阅资源成功"); Log.i("ry", "订阅资源成功");
if (rtcRoom != null) {
RCRTCMixConfig config = new RCRTCMixConfig(); RCRTCMixConfig config = new RCRTCMixConfig();
RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig(); RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig();
config.setMediaConfig(mediaConfig); config.setMediaConfig(mediaConfig);
@ -636,7 +635,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
Log.w("PkDebug", "PK合流失败,rcrtcLiveInfo为空"); Log.w("PkDebug", "PK合流失败,rcrtcLiveInfo为空");
} }
} }
}
@Override @Override
public void onFailed(RTCErrorCode rtcErrorCode) { public void onFailed(RTCErrorCode rtcErrorCode) {
@ -716,7 +714,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
inputStreamList.add(stream); inputStreamList.add(stream);
if (rtcRoom != null) {
RCRTCMixConfig config = new RCRTCMixConfig(); RCRTCMixConfig config = new RCRTCMixConfig();
RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig(); RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig();
@ -759,7 +756,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
}); });
} }
} }
}
//开始订阅资源 //开始订阅资源
rtcRoom.getLocalUser().subscribeStreams(inputStreamList, new IRCRTCResultCallback() { rtcRoom.getLocalUser().subscribeStreams(inputStreamList, new IRCRTCResultCallback() {
@Override @Override
@ -885,7 +881,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
Log.i("ry", "订阅资源成功"); Log.i("ry", "订阅资源成功");
List<RCRTCStream> streams = new ArrayList<>(); List<RCRTCStream> streams = new ArrayList<>();
streams.add(RCRTCEngine.getInstance().getDefaultVideoStream()); streams.add(RCRTCEngine.getInstance().getDefaultVideoStream());
if (rtcRoom != null) {
RCRTCMixConfig config = new RCRTCMixConfig(); RCRTCMixConfig config = new RCRTCMixConfig();
RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig(); RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig();
config.setMediaConfig(mediaConfig); config.setMediaConfig(mediaConfig);
@ -923,7 +918,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
} }
}); });
} }
}
@Override @Override
public void onFailed(RTCErrorCode rtcErrorCode) { public void onFailed(RTCErrorCode rtcErrorCode) {
@ -1155,7 +1149,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
}); });
} }
if (rtcRoom != null) {
RCRTCMixConfig config = new RCRTCMixConfig(); RCRTCMixConfig config = new RCRTCMixConfig();
RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig(); RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig();
config.setMediaConfig(mediaConfig); config.setMediaConfig(mediaConfig);
@ -1204,7 +1198,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
} }
}); });
}
} }
leaveHandler.post(leaveRunnable); leaveHandler.post(leaveRunnable);
@ -1948,7 +1942,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
} }
if (rtcRoom != null) {
//开始订阅资源 //开始订阅资源
rtcRoom.getLocalUser().subscribeStreams(inputStreamList1, new IRCRTCResultCallback() { rtcRoom.getLocalUser().subscribeStreams(inputStreamList1, new IRCRTCResultCallback() {
@ -1977,7 +1970,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
} }
}); });
} }
}
} }
}); });
@ -2328,7 +2320,6 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
if (btn_close != null) { if (btn_close != null) {
btn_close.setVisibility(View.GONE); btn_close.setVisibility(View.GONE);
} }
if (rtcRoom != null) {
// inputStreamList.clear(); // inputStreamList.clear();
RCRTCMixConfig config = new RCRTCMixConfig(); RCRTCMixConfig config = new RCRTCMixConfig();
RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig(); RCRTCMixConfig.MediaConfig mediaConfig = new RCRTCMixConfig.MediaConfig();
@ -2368,7 +2359,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
} }
}); });
} }
}
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
public void run() { public void run() {
// try { // try {