TUIRoomKit
组件的接入,跟随本文档,您将在一个小时的时间内完成如下几个关键步骤,并最终得到一个包含完备 UI 界面的音视频会议功能。Podfile
文件中添加以下依赖。pod 'TUIRoomKit'
pod install
pod repo update
<key>NSCameraUsageDescription</key><string>TUIRoom needs permission to access your camera</string><key>NSMicrophoneUsageDescription</key><string>TUIRoom needs access to your photo album</string><key>NSPhotoLibraryUsageDescription</key><string>TUIRoom needs access to your photo album</string>
import TUICoreTUILogin.login(1400000001, // 请替换为步骤一取到的 SDKAppIDuserID: "998", // 请替换为您的 UserIDuserSig: "xxxxxxxxxx") { // 您可以在控制台中计算一个 UserSig 并填在这个位置print("login success")} fail: { (code, message) inprint("login failed, code: \\(code), error: \\(message ?? "nil")")}
#import "TUICore/TUILogin.h"[TUILogin login:1400000001 // 请替换为步骤一取到的 SDKAppIDuserID:@"998" // 请替换为您的 UserIDuserSig:@"xxxxxxxxxx" succ:^{ // 您可以在控制台中计算一个 UserSig 并填在这个位置NSLog(@"login,success");} fail:^(int code, NSString * _Nullable msg) {NSLog(@"login,failed,code:%d,msg:%@",code,msg);}];
import TUIRoomKit// CreateConferenceViewController 为您自己的 ViewControllerclass CreateConferenceViewController: UIViewController {func quickStartConferenceAction() {let params = StartConferenceParams(roomId: "123456") // 请替换 "123456" 为您自定义的会议号let conferenceViewController = ConferenceMainViewController()conferenceViewController.setStartConferenceParams(params: params)navigationController?.pushViewController(conferenceViewController, animated: true)}}
#import <TUIRoomKit/TUIRoomKit-Swift.h>// CreateConferenceViewController 为您自己的 ViewController@interface CreateConferenceViewController ()@end@implementation CreateConferenceViewController- (void)quickStartConferenceAction {// 请替换 "123456" 为您自定义的房间号StartConferenceParams *params = [[StartConferenceParams alloc] initWithRoomId: @"123456"];ConferenceMainViewController *conferenceViewController = [[ConferenceMainViewController alloc] init];[conferenceViewController setStartConferenceParams:params];[self.navigationController pushViewController:conferenceViewController animated:YES];}@end
import TUIRoomKit// EnterConferenceViewController 为您自己的 ViewControllerclass EnterConferenceViewController: UIViewController {private func joinConferenceAction() {let params = JoinConferenceParams(roomId: "123456") // 请替换 "123456" 为您要加入的会议号let conferenceViewController = ConferenceMainViewController()conferenceViewController.setJoinConferenceParams(params: params)navigationController?.pushViewController(conferenceViewController, animated: true)}}
#import <TUIRoomKit/TUIRoomKit-Swift.h>// EnterConferenceViewController 为您自己的 ViewController@interface EnterConferenceViewController ()@end@implementation EnterConferenceViewController- (void)joinConferenceAction {// 请替换 "123456" 为您自定义的房间号JoinConferenceParams *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>
会议主界面 | 用户列表 |
本页内容是否解决了您的问题?