RTC Room Engine SDK to implement the room list feature.RTC Room Engine SDK provided TUILiveListManager plugin to implement the room list feature.RTC RoomEngine SDK, you need to call the SDK login to ensure the subsequent features work properly.TUILiveListManager plugin through the getExtension API.TUILiveListManager plugin's setLiveInfo API to implement this feature, passing in two parameters: live room information and modification identifier.import RTCRoomEnginelet liveListManager = TUIRoomEngine.sharedInstance().getExtension(extensionType: .liveListManager) as! TUILiveListManagerlet liveInfo = TUILiveInfo()liveInfo.roomInfo.roomId = "live_100001" // Please replace it with your own live room ID.liveInfo.isPublicVisible = true // Make the live room visible in the live streaming listliveListManager.setLiveInfo(liveInfo, modifyFlag: [.publish]) {// Set the live room information successfully} onError: { code, message in// Failed to set the live room information}
TUILiveListManager liveListManager = (TUILiveListManager) TUIRoomEngine.sharedInstance().getExtension(TUICommonDefine.ExtensionType.LIVE_LIST_MANAGER);TUILiveListManager.LiveInfo liveInfo = new TUILiveListManager.LiveInfo();liveInfo.roomInfo.roomId = "live_100001"; // Please replace it with your own live room IDliveInfo.isPublicVisible = true;List<TUILiveListManager.LiveModifyFlag> flagList = new ArrayList<>();flagList.add(TUILiveListManager.LiveModifyFlag.PUBLISH);liveListManager.setLiveInfo(liveInfo, flagList, new TUIRoomDefine.ActionCallback() {@Overridepublic void onSuccess() {// Set the live room information successfully}@Overridepublic void onError(TUICommonDefine.Error error, String message) {// Failed to set the live room information}});
TUILiveListManager plugin through the getExtension API.TUILiveListManager plugin's fetchLiveList API to implement this feature, passing in two parameters: a string type list index and the number of live rooms to fetch in a single request.import RTCRoomEnginelet liveListManager = TUIRoomEngine.sharedInstance().getExtension(extensionType: .liveListManager) as! TUILiveListManagerlet cursor = "" // For the first fetch, set the index to an empty string. For subsequent fetches, set it according to the cursor returned by the API.let singleFetchRoomLimit = 50 // Replace it with the number of live rooms to fetch in a single request, with a maximum limit of 50.liveListManager.fetchLiveList(cursor: "", count: singleFetchRoomLimit) { cursor, liveList in// Successfully obtained the live room list} onError: { code, message in// Failed to obtain the live room list}
TUILiveListManager liveListManager = (TUILiveListManager) TUIRoomEngine.sharedInstance().getExtension(TUICommonDefine.ExtensionType.LIVE_LIST_MANAGER);String cursor = ""; // For the first fetch, set the index to an empty string. For subsequent fetches, set it according to the cursor returned by the API.int singleFetchRoomLimit = 50; // Replace it with the number of live rooms to fetch in a single request, with a maximum limit of 50.liveListManager.fetchLiveList("", singleFetchRoomLimit, new TUILiveListManager.LiveInfoListCallback() {@Overridepublic void onSuccess(TUILiveListManager.LiveInfoListResult result) {// Successfully obtained the live room list}@Overridepublic void onError(TUICommonDefine.Error error, String message) {// Failed to obtain the live room list}});
Feedback