|
@@ -191,13 +191,13 @@ public class TCLivePresenter extends BasePresenter<TCLiveRoomContract.TCLiveRoom
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- public void initPublishConfig(Context context,String roomId) {
|
|
|
+ public void initPublishConfig(Context context, String roomId) {
|
|
|
//初始化直播SDK
|
|
|
TRTCSdkManager.getInstance().init(context, mCloudListener);
|
|
|
//初始化IM
|
|
|
TCIMSdkManager.getInstance().init(context.getApplicationContext());
|
|
|
this.isSendDefaultMsg = true;
|
|
|
- this.roomId =roomId;
|
|
|
+ this.roomId = roomId;
|
|
|
registerListener(roomId);
|
|
|
}
|
|
|
|
|
@@ -328,7 +328,7 @@ public class TCLivePresenter extends BasePresenter<TCLiveRoomContract.TCLiveRoom
|
|
|
TCChatRoomLocalMessage tips = new TCChatRoomLocalMessage();
|
|
|
tips.setText("欢迎进入直播课堂,请遵守相关法规,禁止传播低俗、暴力等不良信息。为孩子创造健康绿色的学习环境。");
|
|
|
sendMessage(tips, true);
|
|
|
- isSendDefaultMsg =false;
|
|
|
+ isSendDefaultMsg = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -798,20 +798,12 @@ public class TCLivePresenter extends BasePresenter<TCLiveRoomContract.TCLiveRoom
|
|
|
}
|
|
|
|
|
|
public void notifyCloseLiveRoomAction(String roomId) {
|
|
|
- addSubscribe(create(TeacherAPIService.class).notifyCloseLiveRoomAction(roomId), new DisposableObserver() {
|
|
|
+ addSubscribe(create(TeacherAPIService.class).notifyCloseLiveRoomAction(roomId), new BaseObserver<Object>() {
|
|
|
@Override
|
|
|
- public void onNext(Object o) {
|
|
|
- //通知服务端加入成功即可,无须关注结果
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onError(Throwable e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onComplete() {
|
|
|
-
|
|
|
+ protected void onSuccess(Object data) {
|
|
|
+ if (getView() != null) {
|
|
|
+ getView().closeLiveSuccess();
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|