Updated on 2023-03-23 GMT+08:00

Creating a Meeting

createConf

API Description

This API is used to create an instant meeting.

Precautions

  1. By default, this API enables you to join a meeting as a host. During API calling, there is no need to add your information to the participant parameters.
  2. If other participants need to be invited, their information needs to be transferred.
  3. The meeting creation result can be obtained by calling the callback API.

Method Definition

1
- (void)createConf:(HWMCreateConfParam * _Nonnull)param callback:( _Nonnull HWMSDKCreateConfCompleteHandler)callback;

Parameter Description

Table 1 HWMCreateConfParam parameters

Parameter

Mandatory

Type

Description

subject

Yes

NSString *

Meeting topic.

members

No

NSArray <HWMAttendeeInfo*> *

Member list (optional).

isCameraOn

No

BOOL

Whether to turn on the camera. By default, the camera is turned off.

isMicOn

No

BOOL

Whether to turn on the microphone. By default, the microphone is turned on.

isAutoRecord

No

BOOL

Whether to automatically start recording after a meeting starts. The function is disabled by default. Meeting recording must be enabled if automatic recording is enabled.

vmrId

No

NSString *

ID of the personal meeting or cloud meeting room. This parameter is required when a personal meeting or a cloud meeting room is created. In other cases, this parameter is left empty.

callInRestrictionType

No

HWMJoinConfRestrictionType

Participants who are allowed to join the meeting.

noPassword

No

BOOL

Whether a meeting has no password. By default, a meeting has a password. (This parameter is valid only for random meetings held in the cloud meeting room.)

guestPwd

No

NSString

Password for a guest to join a meeting. By default, this parameter is left empty, indicating that a password is generated randomly. (This parameter is valid only for random meetings held in the cloud meeting room.)

isVideo

No

BOOL

Whether to create a video meeting. The default value is YES. If NO is specified, a voice meeting is created.

vmrConfIdType

No

HWMVmrConfIdType

ID type of the cloud meeting room. A fixed ID is used by default.

isOpenWaitingRoom

No

BOOL

Whether to enable the waiting room.

NOTE:

The function takes effect only after the waiting room function is enabled.

Table 2 HWMAttendeeInfo parameters

Parameter

Mandatory

Type

Description

name

Yes

NSString

Participant name.

number

No

NSString

SIP number or phone number.

This parameter is mandatory in the account and password login scenario.

thirdUserId

No

NSString

Third-party account.

This parameter is mandatory in the app ID login scenario.

accountId

No

NSString

User login account.

This parameter is mandatory in the account and password login scenario.

email

No

NSString

Email address.

sms

No

NSString

Mobile number for receiving SMS notifications.

mute

No

BOOL

Whether to mute the microphone.

role

No

HWMConfRoleType

Participant role.

Return Values

None

Sample Code
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
/// Create a meeting.
- (void)creatMeeting {
    HWMCreateConfParam *param = [[HWMCreateConfParam alloc] init];
    param.subject = @"Meeting topic";
    param.isCameraOn = YES; // Whether to turn on the camera. By default, the camera is turned off.
    param.isMicOn = YES; // Whether to turn on the microphone. By default, the microphone is turned on.
    param.isAutoRecord = NO;// Whether to enable the automatic recording function. By default, this function is disabled.
    param.joinConfRestrictionType = HWMJoinConfRestrictionAll;// Participants who are allowed to join the meeting.

    [[HWMSdk getOpenApi] createConf:param callback:^(NSError * _Nullable error, HWMCreateConfResult * _Nullable result) {
        [self hideLoading];
        if (error) {
            NSLog(@"Failed to create the meeting %@", error.localizedDescription);
        }else{
            NSLog(@"Meeting created.");
        }
    }];
}