
exitRoom API to exit the current room, and the SDK will use the onExitRoom(int reason) callback to notify you of the reason the room was exited.// Exit the current roommCloud.exitRoom();
self.trtcCloud = [TRTCCloud sharedInstance];// Exit the current room[self.trtcCloud exitRoom];
trtc_cloud_ = getTRTCShareInstance();// Exit the current roomtrtc_cloud_->exitRoom();
exitRoom API is called, the SDK will enter the room exit process, where two key tasks need to be completed:TRTCCloud instance after receiving the onExitRoom callback.onExitRoom(int reason) callback will also be received in other two cases in addition to active room exit:onExitRoom(1) callback.onExitRoom(2) callback.// Listen for the `onExitRoom` callback to get the reason for room exit@Overridepublic void onExitRoom(int reason) {if (reason == 0) {Log.d(TAG, "Exit current room by calling the 'exitRoom' api of sdk ...");} else if (reason == 1) {Log.d(TAG, "Kicked out of the current room by server through the restful api...");} else if (reason == 2) {Log.d(TAG, "Current room is dissolved by server through the restful api...");}}
// Listen for the `onExitRoom` callback to get the reason for room exit- (void)onExitRoom:(NSInteger)reason {if (reason == 0) {NSLog(@"Exit current room by calling the 'exitRoom' api of sdk ...");} else if (reason == 1) {NSLog(@"Kicked out of the current room by server through the restful api...");} else if (reason == 2) {NSLog(@"Current room is dissolved by server through the restful api...");}}
// Listen for the `onExitRoom` callback to get the reason for room exitvoid onExitRoom(int reason) {if (reason == 0) {printf("Exit current room by calling the 'exitRoom' api of sdk ...");} else if (reason == 1) {printf("Kicked out of the current room by server through the restful api...");} else if (reason == 2) {printf("Current room is dissolved by server through the restful api...");}}
Feedback