|
Podfile
文件同一级目录下创建 TUIRoom
文件夹。Source
、Resources
、TUIBeauty
、TXAppBasic
文件夹 和 TUIRoom.podspec
文件拷贝到您在 步骤1
创建的 TUIRoom 文件夹下。pod install
命令,完成导入。# :path => "指向TUIRoom.podspec的相对路径"pod 'TUIRoom', :path => "./TUIRoom/TUIRoom.podspec", :subspecs => ["TRTC"]# :path => "指向TXAppBasic.podspec的相对路径"pod 'TXAppBasic', :path => "./TUIRoom/TXAppBasic/"# :path => "指向TUIBeauty.podspec的相对路径"pod 'TUIBeauty', :path => "./TUIRoom/TUIBeauty/"
Source
、Resources
文件夹 和TUIRoom.podspec
文件必需在同一目录下。<key>NSCameraUsageDescription</key><string>RoomApp需要访问您的相机权限,开启后录制的视频才会有画面</string><key>NSMicrophoneUsageDescription</key><string>RoomApp需要访问您的麦克风权限,开启后录制的视频才会有声音</string>
@import TUIRoom;@import TUICore;// 1.组件登录[TUILogin login:@"您的SDKAppID" userID:@"您的UserID" userSig:@"您的UserSig" succ:^{} fail:^(int code, NSString *msg) {}];// 2.初始化TUIRoom实例TUIRoom *tuiRoom = [TUIRoom sharedInstance];```
import TUIRoomimport TUICore// 1.组件登录TUILogin.login("您的SDKAppID", userID: "您的UserID", userSig: "您的UserSig") {} fail: { code, msg in}// 2.初始化TUIRoom实例let tuiRoom = TUIRoom.sharedInstance```
@import TUIRoom;[tuiRoom createRoomWithRoomId:12345 speechMode:TUIRoomFreeSpeech isOpenCamera:YES isOpenMicrophone:YES];
import TUIRoomtuiRoom.createRoom(roomId: 12345, speechMode: .freeSpeech, isOpenCamera: true, isOpenMicrophone: true)```
@import TUIRoom;[tuiRoom enterRoomWithRoomId:12345 isOpenCamera:YES isOpenMicrophone:YES]
import TUIRoomtuiRoom.enterRoom(roomId: 12345, isOpenCamera: true, isOpenMicrophone: true)```
@import TUIRoom;[[TUIRoomCore shareInstance] destroyRoom:^(NSInteger code, NSString * _Nonnull message) {}];```
import TUIRoomTUIRoomCore.shareInstance().destroyRoom { [weak self] _, _ inguard let self = self else { return }self.navigationController?.popViewController(animated: true)}```
@import TUIRoom;[[TUIRoomCore shareInstance] leaveRoom:^(NSInteger code, NSString * _Nonnull message) {}];```
import TUIRoomTUIRoomCore.shareInstance().leaveRoom { [weak self] _, _ inguard let self = self else { return }self.navigationController?.popViewController(animated: true)}```
@import TUIRoom;@import TXLiteAVSDK_Professional;TRTCVideoEncParam *params = [[TRTCVideoEncParam alloc] init];params.videoResolution = TRTCVideoResolution_1280_720;params.resMode = TRTCVideoResolutionModePortrait;params.videoFps = 10;params.enableAdjustRes = NO;params.videoBitrate = 1500;[[TUIRoomCore shareInstance] startScreenCapture:param];```
import TUIRoom// 屏幕分享let params = TRTCVideoEncParam()params.videoResolution = TRTCVideoResolution._1280_720params.resMode = TRTCVideoResolutionMode.portraitparams.videoFps = 10params.enableAdjustRes = falseparams.videoBitrate = 1500TUIRoomCore.shareInstance().startScreenCapture(params)```
sudo gem install cocoapods
本页内容是否解决了您的问题?