Two-person connection | Multiple people connection |
| |
requestCrossRoomConnection
and passing the room ID of anchor B in the roomId parameter.val roomId = "anchorBRoomId"mLiveViewList.requestCrossRoomConnection(roomId, 10, null)
String roomId = "anchorBRoomId";mLiveViewList.requestCrossRoomConnection(roomId, 10, null);
let roomId = "anchorRoomId"liveCoreView.requestCrossRoomConnection(roomId: roomId, timeOut: 60) {} onError: { code, message in}
NSString *roomId = @"anchorRoomId";[liveCoreView requestCrossRoomConnection:roomIdtimeOut:60onSuccess:^(void) {} onError:^(NSInteger code, NSString * _Nonnull message) {}];
onCrossRoomConnectionAccepted
.onCrossRoomConnectionRequest
.override fun onCrossRoomConnectionRequest(inviterUser: UserInfo) {Log.i(TAG, "Received a connection request from anchor A's room:${inviterUser.userId}")}
@Overridepublic void onCrossRoomConnectionRequest(LiveStreamDefine.RoomInfo roomInfo) {Log.i(TAG, "Received a connection request from anchor A's room:" + roomInfo.roomId);}
func onCrossRoomConnectionRequest(hostUser: TUIConnectionUser) {print("Received a connection request from anchor A's room:\\(hostUser.userId)")}
- (void)onCrossRoomConnectionRequest:(TUIConnectionUser *)hostUser {NSLog(@"Received a connection request from anchor A's room:%@", hostUser.userId);}
respondToCrossRoomConnection
.liveCoreView.respondToCrossRoomConnection(roomId, true, null)
liveCoreView.respondToCrossRoomConnection(roomId, true, null);
liveCoreView.respondToCrossRoomConnection(roomId: roomId, isAccepted: true) {} onError: { code, message in}
[liveCoreView respondToCrossRoomConnection:roomIdisAccepted:trueonSuccess:^(void) {} onError:^(NSInteger code, NSString * _Nonnull message) {}];
onConnectedRoomsUpdated
callback and get notified of the changes in the connection list. override fun onConnectedRoomsUpdated(inviterUser: UserInfo) {Log.i(TAG, "The anchor connection room list has been updated")}
@Overridepublic void onConnectedRoomsUpdated(List<LiveStreamDefine.RoomInfo> roomList) {Log.i(TAG, "The anchor connection room list has been updated");}
func onConnectedRoomsUpdated(hostUserList: [TUIConnectionUser]) {print("The anchor connection room list has been updated")}
- (void)onConnectedRoomsUpdated:(NSArray<TUIConnectionUser *> *)hostUserList {NSLog(@"The anchor connection room list has been updated");}
public void disconnect(TUIRoomDefine.ActionCallback callback) {mTUILiveConnectionManager.disconnect(callback);}
liveCoreView.terminateIntraRoomConnection()
liveCoreView.terminateCrossRoomConnection()
[liveCoreView terminateCrossRoomConnection];
Was this page helpful?