Updated on 2024-07-30 GMT+08:00

Scenario 6: Joining a Meeting

Description

The joinConf API can be used to join a meeting using a meeting ID and password, no matter whether you have logged in or not.

Service Process

If you need to join an existing meeting using the SDK, call the joinConf API and then implement the callback.

  1. Call the API.

    1. Assemble the model.
      1. HWMJoinConfParam is used to join a meeting based on the meeting ID.
      2. HWMRandomConfParam is used to join a meeting in random mode.
    2. Call the joinConf API to join the meeting. The data in the preceding step is used as input parameters.

  2. Implement the callback.

    Implement the callback.

Sample Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
/// Join a meeting.
- (void)joinMeeting {
    HWMJoinConfParam *param = [[HWMJoinConfParam alloc] init];
    param.confId = @"989156631";
    param.password = getPassword();
    param.nickname = @"Hangzhou site";
    param.isCameraOn = NO;
    param.isMicOn = YES;
    [[HWMSdk getOpenApi] joinConf:param callback:^(NSError * _Nullable error, id  _Nullable result) {
        if (error) {
            NSLog(@"Join meeting failed.%@", error.localizedDescription);
        } else {
            NSLog(@"Meeting joined.");
        }
    }];
}

If you call this API without logging in to Huawei Cloud Meeting, the nickname parameter is mandatory.