RTC Room Engine SDK to implement features for setting live room information.RTC RoomEngine SDK, you need to call the SDK login to ensure the subsequent features work properly.TUILiveInfo, which will be introduced in detail next:TUILiveInfo consists of many fields, but usually, you only need to focus on filling in the following fields:Parameter Name | Type | Description |
activityStatus | Int | Live room active status: user-defined Definition tag |
backgroundUrl | String | Live Room Background, supports up to 200 bytes |
categoryList | List<Int> | Live Room Classification Tag, up to 3 tags per room |
coverUrl | String | Live Room Cover, supports up to 200 bytes |
isPublicVisible | Bool |
setLiveInfo API.LiveInfo, which will be introduced in detail next:LiveInfo consists of many fields, but usually, you only need to focus on filling in the following fields:Parameter Name | Type | Description |
activityStatus | Int | Live room active status: user-defined Definition tag |
backgroundUrl | String | Live Room Background, supports up to 200 bytes |
categoryList | List<Int> | Live Room Classification Tag, up to 3 tags per room |
coverUrl | String | Live Room Cover, supports up to 200 bytes |
isPublicVisible | Bool |
setLiveInfo API.import RTCRoomEnginelet roomEngine = TUIRoomEngine.sharedInstance()let liveListManager = roomEngine.getExtension(extensionType: .liveListManager) as? TUILiveListManagerlet liveInfo = TUILiveInfo()liveInfo.backgroundUrl = "backgroundUrl" // Replace with the background image you need for the live room.liveInfo.coverUrl = "coverUrl" // Replace with the cover image you need for the live room.liveInfo.isPublicVisible = true // The live room is public.liveInfo.categoryList = [1, 2] // Replace with your business's live room categorieslet modifyFlag: TUILiveModifyFlag = [.backgroundUrl, .coverUrl, .publish, .category] // Categories you are modifyingliveListManager?.setLiveInfo(liveInfo, modifyFlag: modifyFlag) {// Set the live room information successfully} onError: { code, message in// Failed to set the live room information}
TUIRoomEngine roomEngine = TUIRoomEngine.sharedInstance();TUILiveListManager liveListManager = (TUILiveListManager) roomEngine.getExtension(TUICommonDefine.ExtensionType.LIVE_LIST_MANAGER);TUILiveListManager.LiveInfo liveInfo = new TUILiveListManager.LiveInfo();liveInfo.backgroundUrl = "backgroundUrl"; // Replace with the background image you need for the live room.liveInfo.coverUrl = "coverUrl"; // Replace with the cover image you need for the live room.liveInfo.isPublicVisible = true; // The live room is public.liveInfo.categoryList = new ArrayList<>(Arrays.asList(1, 2)); // Replace with your business's live room categoriesList<TUILiveListManager.LiveModifyFlag> modifyFlag = new ArrayList<>();// Below are the categories you modifiedmodifyFlag.add(TUILiveListManager.LiveModifyFlag.BACKGROUND_URL);modifyFlag.add(TUILiveListManager.LiveModifyFlag.COVER_URL);modifyFlag.add(TUILiveListManager.LiveModifyFlag.PUBLISH);modifyFlag.add(TUILiveListManager.LiveModifyFlag.CATEGORY);liveListManager.setLiveInfo(liveInfo, modifyFlag, 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}});
Feedback