TUIRoomKit
Component in the shortest time. By following this document, you will complete the following key steps within an hour and ultimately obtain an audio/video conference function with a complete UI interface.pod 'TUIRoomKit'
pod install
pod repo update
<key>NSCameraUsageDescription</key><string>TUIRoom needs access to your Camera permission</string><key>NSMicrophoneUsageDescription</key><string>TUIRoom needs access to your Mic permission</string><key>NSPhotoLibraryUsageDescription</key><string>TUIRoom needs access to your Photo Library</string>
import TUICoreTUILogin.login(1400000001, // Please replace with the SDKAppID obtained in step 1userID: "998", // Please replace with your UserIDuserSig: "xxxxxxxxxx") { // You can calculate a UserSig in the Console and fill it in this positionprint("login success")} fail: { (code, message) inprint("login failed, code: \\(code), error: \\(message ?? "nil")")}
#import "TUICore/TUILogin.h"[TUILogin login:1400000001 // Please replace with the SDKAppID obtained in step 1userID:@"998" // Please replace with your UserIDuserSig:@"xxxxxxxxxx" succ:^{ // You can calculate a UserSig in the Console and fill it in this positionNSLog(@"login,success");} fail:^(int code, NSString * _Nullable msg) {NSLog(@"login,failed,code:%d,msg:%@",code,msg);}];
import TUIRoomKit// CreateConferenceViewController is your own ViewControllerclass CreateConferenceViewController: UIViewController {func quickStartConferenceAction() {let params = StartConferenceParams(roomId: "123456") // replace "123456" with your conference IDlet conferenceViewController = ConferenceMainViewController()conferenceViewController.setStartConferenceParams(params: params)navigationController?.pushViewController(conferenceViewController, animated: true)}}
#import <TUIRoomKit/TUIRoomKit-Swift.h>// CreateConferenceViewController is your own ViewController@interface CreateConferenceViewController ()@end@implementation CreateConferenceViewController- (void)quickStartConferenceAction {// replace "123456" with your conference IDStartConferenceParams *params = [[StartConferenceParams alloc] initWithRoomId: @"123456"];ConferenceMainViewController *conferenceViewController = [[ConferenceMainViewController alloc] init];[conferenceViewController setStartConferenceParams:params];[self.navigationController pushViewController:conferenceViewController animated:YES];}@end
import TUIRoomKit// EnterConferenceViewController is your own ViewControllerclass EnterConferenceViewController: UIViewController {private func joinConferenceAction() {// replace "123456" with conference ID you want to joinlet params = JoinConferenceParams(roomId: "123456")let conferenceViewController = ConferenceMainViewController()conferenceViewController.setJoinConferenceParams(params: params)navigationController?.pushViewController(conferenceViewController, animated: true)}}
#import <TUIRoomKit/TUIRoomKit-Swift.h>// EnterConferenceViewController is your own ViewController@interface EnterConferenceViewController ()@end@implementation EnterConferenceViewController- (void)joinConferenceAction {// replace "123456" with conference ID you want to joinJoinConferenceParams *params = [[JoinConferenceParams alloc] initWithRoomId: @"123456"];ConferenceMainViewController *conferenceViewController = [[ConferenceMainViewController alloc] init];[conferenceViewController setJoinConferenceParams:params];[self.navigationController pushViewController:conferenceViewController animated:YES];}@end
#import <TUIRoomKit/TUIRoomKit-Swift.h>
Conference main interface | User list |
Was this page helpful?