Video Meeting

8.1 Get XHMeetingManager instance and add the XHMeetingManagerDelegate event protocol function.

/**
Someone has joined the meeting
@param uid user ID
@param meetingID meeting ID
@return view for displaying the video of the joiner
*/
- (UIView *)onJoined:(NSString *)uid meeting:(NSString *)meetingID
{
}
/**
Someone has left the meeting
@param uid the user ID who left the meeting room
@param meetingID meeting ID
*/
- (void)onLeft:(NSString *)uid meeting:(NSString *)meetingID
{
}
@optional

/**
Some abnormal conditions may cause the meeting to go wrong. Please leave the meeting room after receiving the callback.
@param error error information
@param meetingID meeting ID
*/
- (void)onMeetingError:(NSError *)error meeting:(NSString *)meetingID
{
}

/**
The number of members has changed

@param membersNumber Number of members
*/
- (void)meetingMembersNumberUpdated:(NSInteger)membersNumber
{
}
/**
You are kicked
*/
- (void)meetingUserKicked
{
}
/**
Receive a message

@param message message
@param fromID message sender
*/
- (void)meetingMessageReceived:(NSString *)message fromID:(NSString *)fromID
{
}
/**
Receive a private message

@param message message
@param fromID message sender
*/
- (void)meetingPrivateMessageReceived:(NSString *)message fromID:(NSString *)fromID
{
}

8.2 XHMeetingManager API Description


/**
Set video parameters

@param config parameters
*/
- (void)setVideoConfig:(XHVideoConfig *)config;
/**
*create a meeting
* @param meetingItem Specify the Live name and type
* @param completion callback
*/
- (void)createMeeting:(XHMeetingItem *)meetingItem completion:(void(^)(NSString *meetingID ,NSError *error))completion;

/**
*join the meeting
*@param completion callback
*/
- (void)joinMeeting:(NSString *)meetingID completion:(void(^)(NSError *error))completion;

/**
Leave the meeting
*@param completion callback
*/
- (void)leaveMeeting:(NSString *)meetingID completion:(void(^)(NSError *error))completion;

/**
Switch camera direction

@return Camera orientation after switching
*/
- (XHCameraDirection)switchCamera;

/**
Switch to the big video preview
*/
- (void)changeToBigPreview:(UIView *)view;

/**
Switch to the small video preview
*/
- (void)changeToSmall:(UIView *)view;


/**
send a message

@param message message
@param completion callback
*/
- (void)sendMessage:(NSString *)message completion:(void(^)(NSError *error))completion;

/**
send a private message

@param message message
@param toID receiver ID
@param completion callback
*/
- (void)sendMessage:(NSString *)message toID:(NSString *)toID completion:(void(^)(NSError *error))completion;

/**
mute somebody in the meeting room
@param member the member who is mute
@param seconds mute time
@param meetingId meeting id
@param completion callback
*/
- (void)muteMember:(NSString*)member
muteSeconds:(NSInteger)seconds
frommeeting:(NSString *)meetingId
completion:(void(^)(NSError *error))completion;

/**
unmute somebody in the chatroom

@param members the member who is unmute
@param meetingId meeting id
@param completion callback
*/
- (void)unMuteMembers:(NSString *)member
frommeeting:(NSString *)meetingId
completion:(void(^)(NSError *error))completion;

/**
kick a member
@param member the member who is kicked
@param meetingId meeting id
@param completion callback
*/
- (void)kickMember:(NSString *)member
frommeeting:(NSString *)meetingId
completion:(void(^)(NSError *error))completion;