Component Introduction
TUILiveKit already supports the room list UI component (TUILiveListFragment), which can help you display all the live broadcasts and voice chat rooms in the current application. After you access the room list UI component, you only need to click on a live broadcast room in the list to watch the live broadcast content of the current anchor in real time. After entering the live broadcast room, you can also interact with the anchor in real time through barrage, gifts, microphone connection and other functions.
Prerequisites
Before using the room list function provided by TUILiveKit, you need to complete the relevant configuration and login of TUILiveKit component access. For details, see Quick Access. Access room list
Note:
It's important to make sure you've followed Quick Access to complete the login. Only after you log in to TUILogin.login can you enter the live preview screen normally.
import UIKit
import TUILiveKit
@objc private func buttonTapped(_ sender: UIButton) {
let liveListViewController = TUILiveListViewController()
self.navigationController?.pushViewController(viewController, animated: true)
}
#import <TUILiveKit/TUILiveKit-Swift.h>
- (void)buttonTapped:(UIButton *)sender {
TUILiveListViewController *liveListViewController = [[TUILiveListViewController alloc] init];
[self.navigationController pushViewController:liveListViewController animated:true];
}
Was this page helpful?