日期 | 描述 |
2015/06/19 | 1. 撰写SDK说明 |
2015/06/23 | 1. SDK精简,文档更新 |
2015/10/27 | ·1. 增加应用前后台通知;忽略SIGPIPE信号 2. 支持定制”短信邀请”以及”复制URL”的内容;支持设置/获取会议的音视频状态 |
2015/12/01 | 1. 增加会议界面的显示控制 |
2016/03/01 | 1. 增加 暂停/恢复 会议音频功能; 2. 支持 启用/禁用 邮件邀请,并支持定制邮件邀请的主题和内容; 增加 开启/关闭 云端录制功能 |
2016/09/02 | 1. 增加接口检测会议是否被锁定 2. 在ZhumuSDKMeetingServiceDelegate中增加应用共享接口“onAppShareSplash” 3.在ZhumuSDKMeetingServiceDelegate中增加 显示/隐藏 自定义主持人启会前等待界面接口“onJBHWaitingWithCmd:” 4.将资源文件bundle移入framework中 5.支持Zhumu SDK自定义文字 6.支持Zhumu SDK自定义图片 |
2016/11/15 | 1. 修复视频bug 2. 调整库名称 |
2016/12/08 | 1. 调整SDK认证方式 2. 调整自定义功能 |
2017/01/06 | 1. 增加关闭 音/视频 入会 2. 共享时可以隐藏缩略视频 3. 主持人可以隐藏 离开会议 选项 |
2017/03/03 | 1.修复失去WiFi连接后的SIGPIPE信号问题 2.增加获取会议参会人接口 3.增加获取参会人状态变更事件的委托 4.增加举手、聚焦视频、设置主持人、移除参会人接口 5.增加直接呼叫会议室设备的接口 6.自定义视频工具栏界面支持 |
2017/10/31 | 1.增加设置MobileRTCResrouces.bundle路径的接口 2.增加获取SDK版本号接口 3.适配iOS11 |
1. ZhumuSDK:Zhumu SDK基础类,管理Zhumu SDK初始化以及返回ZhumuSDKAuthService, ZhumuSDKMeetingService 和 ZhumuSDKMeetingSettings实例
2. ZhumuSDKAuthService:Zhumu SDK认证服务类
3. ZhumuSDKAuthDelegate:Zhumu SDK认证委托类,您可以通过它获取认证结果
4. ZhumuSDKMeetingService:Zhumu SDK会议服务类,管理 开启/加入 会议
5. ZhumuSDKMeetingServiceDelegate:Zhumu SDK会议服务委托类,您可以通过它监听会议结果和状态
6. ZhumuSDKMeetingSettings:Zhumu SDK会议设置类,管理 设置/获取 会议音/视频状态
7. ZhumuSDKInviteHelper:Zhumu SDK自定义邀请类,您可以通过它自定义邀请与会人的行为
1. iOS版本:iOS 7.0或以上
2. ARC支持:是
3. 添加ZhumuSDK.framework、MobileRTC.framework到“Link Binary With Libraries”中;在工程导入资源文件: MobileRTCResources.bundle。
在您项目TARGETS里的Build Setting中,进行如下配置:
1. Deployment-> Targeted Device Family-> iPhone/iPad
2. Deployment-> iOS Deployment Target-> iOS 7.0以上
3. Linking-> Other Linker Flags-> 增加: -ObjC
4. 设置 “C++ Language Dialect”为“Compile Default”
5. 设置 “C++ Standard Library”为“Compile Default”
6. Debug Options-> Debug Information Format-> DWARF
7. 在“Link Binary With Libraries”中导入依赖库:libsqlite3.tbd, libstdc++.6.0.9.tbd, libz.1.2.5.tbd, VideoToolbox.framework 以及 CoreBluetooth.framework
../Model
AuthRequest:账号认证请求数据
AuthResponse:账号认证响应数据
MeetingBase:会议信息基类
MeetingOrder:会议预定数据
MeetingInfo:预定后的会议信息
../Utility
Utils:工具类
../Vendor
AFNetworking
MBProgressHUD
LibraryAPI:基础功能封装
演示账号:AppDelegate.m定义了演示账号;KeyMacro.h定义了API Key。
#define kLOGIN_TYPE 3
#define kLOGIN_NAME @"SDKTest@zhumu.me"
#define kAPI_KEY @"O8czzSQBEWkq0sHDk8PixUc9FdY27"
#define kAPI_SECRET @"YgAfm0VURjiCeYgAfm0V=="
服务器接口:Utils.h中定义了Zhumu后端服务器接口地址。
账号信息
server_url = @"https://api.zhumu.me/v3/user/get";
创建会议
create_url = @"https://api.zhumu.me/v3/meeting/create";
删除会议
delete_url = @"https://api.zhumu.me/v3/meeting/delete";
会议列表
list_url = @"https://api.zhumu.me/v3/meeting/list";
在入会、预订、删除、获取会议前,需要先从Zhumu后端服务器获取账号信息。服务器接口为HTTPS类型,请求方式是POST,返回的数据格式为JSON。
参数 | 描述 |
API_KEY | API的用户名 |
API_SECRET | API的密码 |
LOGIN_TYPE | 账户登录类型:1-Zcode, 2-Mobile, 3-Email |
LOGIN_NAME | 根据相应的LOGIN_TYPE,所对应的账号名 |
Code:100表示成功
{
“code”: "100",
“zcode”: "88888888",
“id”: "sdwahdkwahdkuaw", //调用会议接口所需的userID
“username”: "dasd", //调用会议接口所需的userName
“mobile”: "18610003000",
“usertype”: "1",
“det”: "dawdawd",
“createtime”: "2012-11-25T12:00:00Z ",
“createby”: "awdawda",
“pmi”: "12312312231", //调用会议接口所需的会议号
“role”: "0",
“email”: "adsawda@163.com",
“isowner”: "0",
"token":xxxxxxxxxx"", //调用会议接口所需的token值
}
Code:200表示失败
{
“code”: "200",
“msg”: "错误信息",
}
在AppDelegate中,应用启动后didFinishLaunchingWithOptions:请进行SDK认证以及账号认证:
//SDK认证
[ZhumuSDK sharedSDK].zhumuDomain = kZhumuSDKDomain;
[ZhumuSDK sharedSDK].getAuthService.clientKey = kZhumuSDKAppKey;
[ZhumuSDK sharedSDK].getAuthService.clientSecret = kZhumuSDKAppSecret;
[ZhumuSDK sharedSDK].getAuthService.delegate = self;
[[ZhumuSDK sharedSDK].getAuthService sdkAuth];
//账号认证
[[LibraryAPI sharedInsance] accountAuth: auth];
检测ZhumuSDK认证状态可在AppDelegate中增加下列代码(SDK已实现了失败重试功能,无需再次调用sdkAuth):
#pragma mark - Auth Delegate
- (void)onZhumuSDKAuthReturn:(ZhumuSDKAuthError)returnValue
{
NSLog(@"onZhumuSDKAuthReturn %d", returnValue);
}
在账号认证成功后,您可以创建一个会议:
会议类型 | 描述 |
1 | 即时会议 |
2 | 计划会议 |
3 | 长期会议 |
MeetingOrder *order = [[MeetingOrder alloc] init];
order.topic = @"topic";
order.type = @"2";
order.duration = 60*60;
[[LibraryAPI sharedInsance] createMeeting:order success:nil failure:nil];
在账号认证成功后,您可以删除自己创建的会议:
[[LibraryAPI sharedInsance] deleteMeeting: meetingID success:nil failure:nil];
在SDK以及账号认证成功后,您可以启动会议:
MeetingBase *info = [[MeetingBase alloc] init];
info.meetingID = @"会议号";
//info.isAppShare = YES; //是否共享应用界面
//info. isNoAudio = YES; //是否无音频入会
//info. isNoVideo = YES; //是否无视频入会
//如果要开启即时会议则传入nil即可
[[LibraryAPI sharedInsance] startMeeting:info delegate:self success:nil failure:nil];
在SDK认证成功后,您可以加入会议:
MeetingBase *info = [[MeetingBase alloc] init];
info.meetingID = @"会议号";
info.password = @"会议密码";
info.nickname = @"昵称";
//info. isNoAudio = YES; //是否无音频入会
//info. isNoVideo = YES; //是否无视频入会
[[LibraryAPI sharedInsance] joinMeeting:info delegate:self success:nil failure:nil];
一旦您启动/加入会议,SDK将通过ZhumuSDKMeetingService返回会议状态:
#pragma mark - Meeting Service Delegate
- (void)onMeetingReturn:(ZhumuSDKMeetError)error internalError:(NSInteger)internalError
{
NSLog(@"onMeetingReturn:%d, internalError:%zd", error, internalError);
}
- (void)onMeetingError:(NSInteger)error message:(NSString*)message
{
NSLog(@"onMeetingError:%zd, message:%@", error, message);
}
- (void)onMeetingStateChange:(ZhumuSDKMeetingState)state
{
NSLog(@"onMeetingStateChange:%d", state);
}
SDK初始化后,您可以改变会议的音/视频状态,修改将作用于随后进入的会议:
ZhumuSDKMeetingSettings *settings = [[ZhumuSDK sharedSDK] getMeetingSettings];
if (!settings)
return nil;
BOOL isAutoConnected = [settings autoConnectInternetAudio];
BOOL isAudioMuted = [settings muteAudioWhenJoinMeeting];
BOOL isVideoMuted = [settings muteVideoWhenJoinMeeting];
BOOL disabled = [settings driveModeDisabled];
BOOL callinDisabled = [settings callInDisabled];
BOOL calloutDisabled = [settings callOutDisabled];
UISwitch *sv = (UISwitch*)sender;
[[[ZhumuSDK sharedSDK] getMeetingSettings] setAutoConnectInternetAudio:sv.on];
[[[ZhumuSDK sharedSDK] getMeetingSettings] setMuteAudioWhenJoinMeeting:sv.on];
[[[ZhumuSDK sharedSDK] getMeetingSettings] setMuteVideoWhenJoinMeeting:sv.on];
[[[ZhumuSDK sharedSDK] getMeetingSettings] disableDriveMode:sv.on];
[[[ZhumuSDK sharedSDK] getMeetingSettings] disableCallIn:sv.on];
[[[ZhumuSDK sharedSDK] getMeetingSettings] disableCallOut:sv.on];
在开启/加入会议后,您可以暂停/恢复会议音频:
BOOL isNoAudio = [[[ZhumuSDK sharedSDK] getMeetingService] isNoMeetingAudio];
[[[ZhumuSDK sharedSDK] getMeetingService] pauseMeetingAudio:!isNoAudio];
会议共享时,您可以显示/隐藏参会人视频:
[[ZhumuSDK sharedSDK] getMeetingSettings]. thumbnailInShare= hidden;
您可以隐藏会议主持人的“离开会议”选项:
[[ZhumuSDK sharedSDK] getMeetingSettings].hostLeaveHidden = hidden;
入会后,您可以自定义“短信邀请”、“邮件邀请”以及“复制URL”的内容,并且可以开启或关闭“短信邀请”、“复制URL”、“邮件邀请”功能:
//是否启用“复制URL”
//[ZhumuSDKInviteHelper sharedInstance].disableCopyURL = YES;
//是否启用“邮件邀请”
[ZhumuSDKInviteHelper sharedInstance].disableInviteEmail = YES;
//是否启用“短信邀请”
[ZhumuSDKInviteHelper sharedInstance].disableInviteSMS = YES;
if (state == ZhumuSDKMeetingState_InMeeting)
{
//自定义邀请SMS内容
NSString *meetingID = [[ZhumuSDKInviteHelper sharedInstance] meetingID];
NSString *smsMessage = [NSString stringWithFormat:NSLocalizedString(@"Please join meeting with ID: %@", @""), meetingID];
[[ZhumuSDKInviteHelper sharedInstance] setInviteSMS:smsMessage];
//自定义邀请邮件内容
[ZhumuSDKInviteHelper sharedInstance].inviteEmailSubject = @"Invite by Email";
[ZhumuSDKInviteHelper sharedInstance].inviteEmailContent = [NSString
stringWithFormat:NSLocalizedString(@"Please join meeting with ID: %@", @""), meetingID];
//自定义Copy URL内容
NSString *joinURL = [[ZhumuSDKInviteHelper sharedInstance] joinMeetingURL];
NSString *copyURLMsg = [NSString stringWithFormat:NSLocalizedString(@"Meeting URL: %@", @""), joinURL];
[[ZhumuSDKInviteHelper sharedInstance] setInviteCopyURL:copyURLMsg];
}
云端录制功能:
ZhumuSDKMeetingService *ms = [[ZhumuSDK sharedSDK] getMeetingService];
//检查是否支持云端录制
[ms isCMREnabled];
//检查是否正在云端录制
[ms isCMRInProgress];
//开启云端录制
[ms turnOnCMR:YES];
//关闭云端录制
[ms turnOnCMR:NO];
当您的应用启动或者加入一个会议,如果账号支持,您便可以自定义呼叫会议室系统的行为:
//加入会议后,您可以按如下方式来呼叫会议室系统
//呼入会议室设备
ZhumuSDKMeetingService *ms = [[ZhumuSDK sharedSDK] getMeetingService];
[ms sendPairingCode:@"xxxyyy"];
//呼出会议室设备
ZhumuSDKRoomDevice *device = [[ZhumuSDKRoomDevice alloc] init];
device.deviceName = @"abc";
device.ipAddress = @"111.111.111.1111";
device.e164num = 0;
device.deviceType = ZhumuSDKDeviceType_H323;
device.encryptType = ZhumuSDKDeviceEncryptType_None;
[ms callRoomDevice:device];
您可以通过如下代码获取呼叫会议室系统的状态:
- (void)onSendPairingCodeStateChanged:(NSUInteger)state
{
NSLog(@"onSendPairingCodeStateChanged %zd", state);
}
- (void)onCallRoomDeviceStateChanged:( ZhumuH323CallOutStatus)state
{
NSLog(@"onCallRoomDeviceStateChanged %zd", state);
}
如果您想要实现参会人列表,Zhumu SDK提供了获取会议参会人的接口,并在参会人状态更新时提供委托来通知您:
ZhumuSDKMeetingService *ms = [[ZhumuSDK sharedSDK] getMeetingService];
NSArray *users = [ms getInMeetingUserList];
NSLog(@"In Meeting users:%@", users);
ZhumuSDKMeetingUserInfo *my = [ms userInfoByID:[ms myselfUserID]];
NSLog(@"In Meeting myself:%@", myself);
在参会人状态更新时通过委托来通知您:
- (void)inMeetingUserUpdated
{
NSLog(@"inMeetingUserUpdated");
}
applicationWillResignActive中调用 [[ZhumuSDK sharedSDK] appWillResignActive];
applicationDidEnterBackground中调用 [[ZhumuSDK sharedSDK] appDidEnterBackgroud];
applicationDidBecomeActive中调用 [[ZhumuSDK sharedSDK] appDidBecomeActive];
applicationWillTerminate中调用 [[ZhumuSDK sharedSDK] appWillTerminate];
当应用从后台进入前台时,Zhumu SDK需要忽略SIGPIPE信号以避免崩溃,代码请加在main.m文件的 main(int argc, char * argv[]) 方法中:
struct sigaction sa;
sa.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &sa, NULL);
iOS SDK支持共享应用内界面启会,同时会议界面在共享时会从背景隐藏:
//会议启动后,您可以在“onMeetingReady”中开始应用共享
- (void)onMeetingReady
{
ZhumuSDKMeetingService *ms = [[ZhumuSDK sharedSDK] getMeetingService];
if ([ms isDirectAppShareMeeting])
{
if ([ms isStartingShare] || [ms isViewingShare])
{
NSLog(@"There exist an ongoing share");
[ms showZhumuMeeting: ^(void){
[ms stopAppShare];
}];
return;
}
BOOL ret = [ms startAppShare];
NSLog(@"Start App Share... ret:%zd", ret);
}
}
//通知用户点击会议界面的共享按钮,用户可以隐藏会议界面并共享应用内的界面
- (void)onClickedShareButton
{
ZhumuSDKMeetingService *ms = [[ZhumuSDK sharedSDK] getMeetingService];
if (ms)
{
if ([ms isStartingShare] || [ms isViewingShare])
{
NSLog(@"There exist an ongoing share");
return;
}
[ms hideZhumuMeeting:^(void){
[ms startAppShare];
}];
}
}
//通知用户存在没有进行的共享,用户可以决定是否共享他的内容
- (void)onOngoingShareStopped
{
NSLog(@"There does not exist ongoing share");
// ZhumuSDKMeetingService *ms = [[ZhumuSDK sharedSDK] getMeetingService];
// if (ms)
// {
// [ms startAppShare];
// }
}
(1) 在调用开启/加入会议接口的view controller中的viewWillAppear方法加入以下代码:
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
(2) 在您工程的配置文件(工程名-info.plist)中,增加如下标签:
在您工程的配置文件(工程名-info.plist)中,增加如下标签:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
ATS会阻止不安全的明文HTTP资源访问,您可以通过应用的Info.plist配置允许临时例外:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
</true/>
</dict>
注意:NSAllowsArbitraryLoadsInWebContent仅在iOS10下有效,并且如果在Info.plist文件增加NSAllowsArbitraryLoadsInWebContent,则NSAllowsArbitraryLoads将会失效
在Xcode8 iOS10.x下,应用未添加惯例描述就访问私有敏感数据将导致崩溃。应用的Info.plist必须包含
NSCameraUsageDescription / NSMicrophoneUsageDescription / NSPhotoLibraryUsageDescription键值并添加描述向用户解释应用如何使用这些数据。
<key>NSCameraUsageDescription</key>
<string>cameraDescription</string>
<key>NSMicrophoneUsageDescription</key>
<string>microphoneDescription</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>photoLibraryDescription</string>
在工程Build Setting中设置“Debug Information Format” = “DWARF”
您可以在本地化文件Localizable.string中自定义文字,需要匹配Zhumu SDK中的键值。
在demo中,我们自定义了一些文字:
"Waiting..." = "Waiting...";
"Leave" = "Exit";
"Leave Meeting" = "Exit Meeting";
您可以自定义SDK的图片资源,文件名需要与SDK里的一致。
在demo中,我们自定义了一些图片:
icon_meeting_share.png
icon_meeting_share@2x.png
icon_meeting_share@3x.png
icon_meeting_stopshare.png
icon_meeting_stopshare@2x.png
icon_meeting_stopshare@3x.png
1. 安排、编辑、删除、更新会议;
2. 设置会议主题、生成会议ID、设定会议密码;
3. 开启、加入、结束会议;
4. 获取会议ID、入会链接、会议密码
5. PSTN语音接入
6. 定制邀请邮件;
7. 获取会议状态(解除静音/静音、锁定/解锁);
8. 检查云录制状态;
9. 检查共享状态;
10. 共享瞩目应用(控制页面与屏幕);
11. 音频控制(静音/自我解除静音、全体解除静音);
12. 控制视频缩略图的位置;
13. 隐藏会议标题与下方工具栏;
14. 会前配置(隐藏会议标题,隐藏离开按钮、隐藏音频/视频按钮、隐藏邀请按钮、隐藏参会人按钮、隐藏共享屏幕按钮、隐藏上下工具栏);
15. 静音/关闭视频入会;
16. 普通模式与驾驶模式的切换;
用户可以根据应用需求定制SDK的调用,因此应用可以控制会议预设和会议中的控制。从app启动了起会/入会链接后,SDK启动会议中UI,下列项目可以自定义:
会议主题和id(app可以显示不同的id而不是真实的瞩目会议id)
Logo
会议中设置窗口的位置
显示/隐藏顶部和底部工具栏
预设会议控制信息 (关闭/开启音、视频等)
控制屏幕共享/远程控制/注释
发言者模式至视频墙模式等的切换
视频布局-SDK支持两种视频布局,app可任选一种
App可以获取会议UI并设置该UI的位置,这样在屏幕的其他位置可以显示其他数据。
共享屏幕时瞩目支持两种不同的布局:
默认的格式为:
默认格式可变更为:
可以通过开/关SDK中“隐藏视频缩略图”选项来定义视频布局:
在回调或返回值可能出现错误码,下表是错误码列表:
描述 | 错误码 | 处理 |
成功-请求成功 | 0 | 无 |
不正确的会议号 | 1 | 检查会议ID,重新启动/加入会议 |
会议超时 | 2 | 无 |
无法连接网络-如果网络有误瞩目无法连接会议 | 3 | 离开重新加入会议 |
客户端不兼容 | 4 | 联系客户人员确认是否是最新版SDK |
会议满员 | 5 | 无 |
会议结束-开启或加入会议时提示会议已经结束 | 6 | 创建另一个会议 |
会议不存在 | 7 | 检查会议ID |
会议被锁定-试图加入一个被锁定的会议 | 8 | 无 |
会议受限 | 9 | 无 |
JBH限制 | 10 | 无 |
无效参数 | 99 | 检查app code |
无效用户类型 | 100 | 检查app code |
已在另一场会议中 | 101 | 无 |
内部错误 | 102 | 联系客户 |
我们提供了zhumuDemo演示工程,更细节的使用请参考具体工程。
注意:
Zhumu SDK需要集成在主线程
使用前请先在AppDelegate.m中填好AppKey及AppSecret
当入会成功后,可以自定义工具栏界面并调用相应控制方法。在onMeetingStateChange:委托方法中添加如下代码:
if (state == ZhumuSDKMeetingState_InMeeting)
{
ZhumuSDKMeetingService *ms = [[ZhumuSDK sharedSDK] getMeetingService];
UIView *v = [ms meetingView];
CGFloat offsetY = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) ? 220 : 180;
UIView *sv = [[UIView alloc] initWithFrame:CGRectMake(0, offsetY, v.frame.size.width, 50)];
sv.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleBottomMargin;
sv.backgroundColor = [UIColor redColor];
[v addSubview:sv];
[self addTestingSubViews:sv];
}
添加按钮:
-(void)addTestingSubViews:(UIView *)sv
{
UIButton *audioButton = [UIButton buttonWithType:UIButtonTypeCustom];
[audioButton setTitle:NSLocalizedString(@"AudioBtn", @"") forState:UIControlStateNormal];
[audioButton setTintColor:[UIColor whiteColor] ];
audioButton.frame = CGRectMake(5, 5, 60, 40);
[audioButton addTarget:self action:@selector(onAudioButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
[sv addSubview:audioButton];
UIButton *videoButton = [UIButton buttonWithType:UIButtonTypeCustom];
[videoButton setTitle:NSLocalizedString(@"VideoBtn", @"") forState:UIControlStateNormal];
[videoButton setTintColor:[UIColor whiteColor] ];
videoButton.frame = audioButton.frame;
videoButton.frame = CGRectOffset(audioButton.frame, 60+10, 0);
[videoButton addTarget:self action:@selector(onVideoButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
[sv addSubview:videoButton];
UIButton *handButton = [UIButton buttonWithType:UIButtonTypeCustom];
[handButton setTitle:NSLocalizedString(@"HandBtn", @"") forState:UIControlStateNormal];
[handButton setTintColor:[UIColor whiteColor] ];
handButton.frame = videoButton.frame;
handButton.frame = CGRectOffset(videoButton.frame, 60+10, 0);
[handButton addTarget:self action:@selector(onHandButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
[sv addSubview:handButton];
UIButton *chatButton = [UIButton buttonWithType:UIButtonTypeCustom];
[chatButton setTitle:NSLocalizedString(@"ChatBtn", @"") forState:UIControlStateNormal];
[chatButton setTintColor:[UIColor whiteColor] ];
chatButton.frame = handButton.frame;
chatButton.frame = CGRectOffset(handButton.frame, 60+10, 0);
[chatButton addTarget:self action:@selector(onChatButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
[sv addSubview:chatButton];
}
添加相应按钮事件处理:
- (void)onAudioButtonClicked:(id)sender
{
ZhumuSDKMeetingService *ms = [[ZhumuSDK sharedSDK] getMeetingService];
//For Mute/Unmute my audio
[ms startOrStopAudio];
//For switch audio source
//[ms switchMeetingAudioSource];
//For Lock Share
//BOOL notLocked = ![ms isShareLocked];
//[ms lockShare:¬Locked];
//For Lock Meeting
//BOOL notLocked = ![ms isMeetingLocked];
//[ms lockMeeting:¬Locked];
//For Mute All
//static BOOL canUnmuteMyself = NO;
//[ms muteAllAudio:&canUnmuteMyself];
//For Un-Mute All
//[ms unmuteAllAudio];
//For Mute on Entry
//BOOL unmute = ![ms isMuteOnEntryOn];
//[ms muteOnEntry:&unmute];
//For Play Chime
//BOOL notPlay = NO;//![ms isPlayChimeOn];
//[ms playChime:¬Play];
//For Call-In Room Device
//[ms sendPairingCode:@"xxxyyy"];
//For Call-Out Room Device
//ZhumuSDKRoomDevice *device = [ZhumuSDKRoomDevice new];
//device.deviceName = @"abc";
//device.ipAddress = @"111.111.111.1111";
//device.e164num = 0;
//device.deviceType = ZhumuSDKDeviceType_H323;
//device.encryptType = ZhumuSDKDeviceEncryptType_None;
//[ms callRoomDevice:device];
}
- (void)onVideoButtonClicked:(id)sender
{
ZhumuSDKMeetingService *ms = [[ZhumuSDK sharedSDK] getMeetingService];
[ms startOrStopVideo];
//For switch camera
//[ms switchMyCamera];
}
- (void)onHandButtonClicked:(id)sender
{
ZhumuSDKMeetingService *ms = [[ZhumuSDK sharedSDK] getMeetingService];
if (ms)
{
ZhumuSDKMeetingUserInfo *my = [ms userInfoByID:[ms myselfUserID]];
if (my.handRaised)
{
[ms lowerHand:my.userID];
}
else
{
[ms raiseMyHand];
}
}
}
- (void)onChatButtonClicked:(id)sender
{
ZhumuSDKMeetingService *ms = [[ZhumuSDK sharedSDK] getMeetingService];
[ms presentInMeetingChat];
}