ConferenceDefine.StartConferenceParams params = new ConferenceDefine.StartConferenceParams("222222"); //请替换 "222222" 为您自定义的房间号 params.passWord = "123456"; // 请替换 "123456" 为您设置的密码(小于等于6位的纯数字)。 Intent intent = new Intent(this, ConferenceMainActivity.class); intent.putExtra(KEY_START_CONFERENCE_PARAMS, params); startActivity(intent);
import TUIRoomKitfunc quickStartConference() {let vc = ConferenceMainViewController()let params = StartConferenceParams(roomId: "111111") // 请替换 "111111" 为您自定义的房间号params.password = "123456" // 请替换 "123456" 为您自定义的房间密码vc.setStartConferenceParams(params: params)navigationController?.pushViewController(vc, animated: true)}
#import "TUIRoomKit/TUIRoomKit-Swift.h"- (void)quickStartConference {ConferenceMainViewController * vc = [[ConferenceMainViewController alloc]init];StartConferenceParams * params = [[StartConferenceParams alloc]initWithRoomId: @"111111" // 请替换 "111111" 为您自定义的房间号isOpenMicrophone:YESisOpenCamera:NOisOpenSpeaker:YESisMicrophoneDisableForAllUser:NOisCameraDisableForAllUser:NOisSeatEnabled:NOname:@"YourRoomName"password:@"123456"]; // 请替换 "123456" 为您自定义的房间密码[vc setStartConferenceParamsWithParams:params];[self.navigationController pushViewController:vc animated:YES];}
// 注意包的名称,如果您使用 vue2 版本请更改包名为 @tencentcloud/roomkit-web-vue2.7import { conference } from '@tencentcloud/roomkit-web-vue3';conference.start('123456', { // 请替换 '123456' 为您的房间号roomName: 'TestRoom',isSeatEnabled: false,isOpenCamera: false,isOpenMicrophone: false,password: '123456', // 请替换 '123456' 为您设置的密码});
Android & iOS | | |
预定密码房间 | 未受邀成员加入房间输入密码 | 受邀成员可直接进入房间 |
| | |
Web | | |
创建密码房间 | 未受邀成员加入房间输入密码 | 受邀成员可直接进入房间 |
| | |
// 位置:Android/TUIRoomKit/tuiroomkit/src/main/java/com/tencent/cloud/tuikit/roomkit/view/page/widget/ScheduleConference/view
view├── EnterConferencePasswordView.java // 输入密码弹窗的界面└── SetConferenceEncryptView.java // 预定会议设置密码的界面
view├── ConferencePasswordView.swift // 输入密码弹窗的界面└── ScheduleConferenceDataHelper.swift // 预定会议中设置密码弹出界面样式
// 位置:TUIRoomKit/Web/roomkit/vue3/src/TUIRoom/components/PreRoom├── PasswordDialog.vue // 输入密码弹窗的界面ScheduleConference/ScheduleConferencePanel├── ScheduleConferencePanelPC.vue // 预定会议设置密码的界面 Web└── ScheduleConferencePanelH5.vue // 预定会议设置密码的界面 H5
// 位置:TUIRoomKit/Electron/roomkit/vue3/src/TUIRoom/components/PreRoom├── PasswordDialog.vue // 输入密码弹窗的界面ScheduleConference/ScheduleConferencePanel├── ScheduleConferencePanelPC.vue // 预定会议设置密码的界面 Web└── ScheduleConferencePanelH5.vue // 预定会议设置密码的界面 H5
public abstract void createRoom(TUIRoomDefine.RoomInfo roomInfo, TUIRoomDefine.ActionCallback callback);
TUIRoomDefine.RoomInfo roomInfo = new TUIRoomDefine.RoomInfo();roomInfo.roomId = "222222"; // 请替换 "222222" 为您的房间号。roomInfo.password = "123456" // 请替换 "123456" 为您设置的密码。TUIRoomEngine.sharedInstance().createRoom(roomInfo, new TUIRoomDefine.ActionCallback() { @Override public void onSuccess() {// 创建房间成功回调 } @Override public void onError(TUICommonDefine.Error error, String message) {// 创建房间失败回调 } });
- (void)createRoom:(TUIRoomInfo *)roomInfo onSuccess:(TUISuccessBlock)onSuccess onError:(TUIErrorBlock)onError NS_SWIFT_NAME(createRoom(_:onSuccess:onError:));
import RTCRoomEnginefunc createRoom() {let roomInfo = TUIRoomInfo()roomInfo.roomId = "111111" // 请替换 "111111" 为您自定义的房间号roomInfo.password = "123456" // 请替换 "123456" 为您自定义的房间密码TUIRoomEngine.sharedInstance().createRoom(roomInfo) {print("CreateRoom success")} onError: { code, message inprint("CreateRoom error, code:\\(code), message:\\(message)")}}
#import "RTCRoomEngine/TUIRoomDefine.h"#import "RTCRoomEngine/TUIRoomEngine.h"- (void)createRoom {TUIRoomInfo * roomInfo = [[TUIRoomInfo alloc] init];roomInfo.roomId = @"111111"; // 请替换 "111111" 为您自定义的房间号roomInfo.password = @"123456"; // 请替换 "123456" 为您自定义的房间密码[[TUIRoomEngine sharedInstance] createRoom:roomInfo onSuccess:^{NSLog(@"CreateRoom success");} onError:^(TUIError code, NSString * _Nonnull message) {NSLog(@"CreateRoom error, code:%ld, message:%@", (long)code, message);}];}
// 注意包的名称,如果您使用 vue2 版本请更改包名为 @tencentcloud/roomkit-web-vue2.7import { conference } from '@tencentcloud/roomkit-web-vue3';conference.start('123456', { // 请替换 '123456' 为您设置的密码roomName: 'TestRoom',isSeatEnabled: false,isOpenCamera: false,isOpenMicrophone: false,password: '123456', // 请替换 '123456' 为您设置的密码});
public abstract void scheduleConference(ConferenceInfo conferenceInfo, TUIRoomDefine.ActionCallback callback);
TUIConferenceListManager manager = TUIRoomEngine.sharedInstance().getExtension(CONFERENCE_LIST_MANAGER);TUIConferenceListManager.ConferenceInfo conferenceInfo = new TUIConferenceListManager.ConferenceInfo();conferenceInfo.basicRoomInfo.roomId = "222222"; // 请替换 "222222" 为您预定房间的房间号。conferenceInfo.basicRoomInfo.password = "123456"; // 请替换 "123456" 为您设置的密码。manager.scheduleConference(conferenceInfo, new TUIRoomDefine.ActionCallback() { @Override public void onSuccess() {// 预定房间成功回调 } @Override public void onError(TUICommonDefine.Error error, String message) {// 预定房间失败回调 } });
- (void)scheduleConference:(TUIConferenceInfo *)conferenceInfo onSuccess:(TUISuccessBlock)onSuccess onError:(TUIErrorBlock)onError NS_SWIFT_NAME(scheduleConference(_:onSuccess:onError:));
import RTCRoomEnginefunc scheduleConference() {let manager = TUIRoomEngine.sharedInstance().getExtension(extensionType: .conferenceListManager) as? TUIConferenceListManagerlet conferenceInfo = TUIConferenceInfo()conferenceInfo.basicRoomInfo.roomId = "111111" // 请替换 "111111" 为您自定义的房间号conferenceInfo.basicRoomInfo.password = "123456" // 请替换 "123456" 为您自定义的房间密码manager?.scheduleConference(conferenceInfo, onSuccess: {print("ScheduleConference success")}, onError: { code, message inprint("ScheduleConference failed, code:\\(code), message:\\(message)")})}
#import "RTCRoomEngine/TUIRoomEngine.h"#import "RTCRoomEngine/TUIConferenceListManager.h"- (void)scheduleConference {TUIConferenceListManager * manager = [[TUIRoomEngine sharedInstance] getExtension: TUIExtensionTypeConferenceListManager];TUIConferenceInfo * conferenceInfo = [[TUIConferenceInfo alloc] init];conferenceInfo.basicRoomInfo.roomId = @"111111"; // 请替换 "111111" 为您自定义的房间号conferenceInfo.basicRoomInfo.password = @"123456"; // 请替换 "123456" 为您自定义的房间密码[manager scheduleConference:conferenceInfo onSuccess:^{NSLog(@"ScheduleConference success");} onError:^(TUIError code, NSString * _Nonnull message) {NSLog(@"ScheduleConference failed, code:%ld, message:%@", (long)code, message);}];}
public abstract void enterRoom(String roomId, TUIRoomDefine.RoomType roomType, TUIRoomDefine.EnterRoomOptions options, TUIRoomDefine.GetRoomInfoCallback callback);
String roomId = "222222"; // 请替换 "222222" 为您加入的房间号TUIRoomDefine.EnterRoomOptions options = new TUIRoomDefine.EnterRoomOptions(); options.password = "123456"; // 请替换 "123456" 为您加入房间的密码。TUIRoomEngine.sharedInstance().enterRoom(roomId, TUIRoomDefine.RoomType.CONFERENCE, options, new TUIRoomDefine.GetRoomInfoCallback() { @Override public void onSuccess(TUIRoomDefine.RoomInfo engineRoomInfo) {// 进入房间成功回调 } @Override public void onError(TUICommonDefine.Error error, String message) {// 进入房间失败回调if (error == TUICommonDefine.Error.WRONG_PASSWORD) {// 密码错误,这里执行进房密码错误的业务。 } } });
- (void)enterRoom:(NSString *)roomId roomType:(TUIRoomType)roomType options:(TUIEnterRoomOptions *)options onSuccess:(TUIRoomInfoBlock)onSuccess onError:(TUIErrorBlock)onError NS_SWIFT_NAME(enterRoom(_:roomType:options:onSuccess:onError:));
import RTCRoomEnginefunc enterRoom() {let roomId = "111111" // 请替换 "111111" 为您自定义的房间号let options = TUIEnterRoomOptions()options.password = "123456" // 请替换 "123456" 为您自定义的房间密码TUIRoomEngine.sharedInstance().enterRoom(roomId, roomType: .conference, options: options) { roomInfo inprint("EnterRoom success")} onError: { code, message inprint("EnterRoom failed, code:\\(code), message:\\(message)")}}
#import "RTCRoomEngine/TUIRoomEngine.h"- (void)enterRoom {NSString * roomId = @"111111"; // 请替换 "111111" 为您自定义的房间号TUIEnterRoomOptions * options = [[TUIEnterRoomOptions alloc] init];options.password = @"123456"; // 请替换 "123456" 为您自定义的房间密码[[TUIRoomEngine sharedInstance] enterRoom:roomId roomType:TUIRoomTypeConference options:options onSuccess:^(TUIRoomInfo * _Nullable roomInfo) {NSLog(@"EnterRoom success");} onError:^(TUIError code, NSString * _Nonnull message) {NSLog(@"EnterRoom failed, code:%ld, message:%@", (long)code, message);}];}
// 注意包的名称,如果您使用 vue2 版本请更改包名为 @tencentcloud/roomkit-web-vue2.7import { conference } from '@tencentcloud/roomkit-web-vue3';conference.join('123456', { // 请替换 '123456' 为您加入的房间号isOpenCamera: false,isOpenMicrophone: false,password: '123456', // 请替换 '123456' 为您进入房间的密码});
本页内容是否解决了您的问题?