加入房间回调异步处理
This commit is contained in:
parent
be3b5a1134
commit
c11559375e
@ -201,14 +201,6 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
|
||||
|
||||
mRemoteViewList.get(0).changeUser(mTRTCCloud, mUserList.get(0));
|
||||
mTRTCCloud.enterRoom(trtcParams, TRTCCloudDef.TRTC_APP_SCENE_VIDEOCALL);
|
||||
JSONObject object = new JSONObject();
|
||||
try {
|
||||
object.put("room",mRoomId);
|
||||
object.put("userId",mUserId);
|
||||
CordovaEventKit.kit.fireEvent("onLayoutChangeMessage",object);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -355,6 +347,19 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onEnterRoom(int result){
|
||||
JSONObject object = new JSONObject();
|
||||
try {
|
||||
object.put("room",mRoomId);
|
||||
object.put("userId",mUserId);
|
||||
CordovaEventKit.kit.fireEvent("onLayoutChangeMessage",object);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int errCode, String errMsg, Bundle extraInfo) {
|
||||
Log.d(TAG, "sdk callback onError");
|
||||
|
Loading…
Reference in New Issue
Block a user