Description
I copied following code from your sample:
let ret = meetingActionController?.actionMeeting(
with: ActionMeetingCmd_UnMuteAudio,
userID: 0,
on: ScreenType_First
)
Unfortunately it doesn’t work - my user is still muted and the method returns ZoomSDKError_WrongUsage
error.
Do you have a clue what can cause this problem?
My app connects to a meeting without any problem.
Which version?
v4.6.21666.0427
Smartphone (please complete the following information):
- Device: MacBook
- OS: macOS 10.15.2 (19C57)
Additional context
The app is very simple. Just connecting using sdk and joining to meeting like:
let sdk: ZoomSDK = ZoomSDK.shared()
let meetingService = sdk.getMeetingService()
sdk.getSettingService()?.getAudioSetting()?.enableAutoJoinVoip(true)
meetingService?.joinMeeting(
ZoomSDKUserType_APIUser,
toke4enfrocelogin: nil,
webinarToken: nil,
participantId: nil,
meetingNumber: "...",
displayName: "...",
password: "...",
isDirectShare: false,
sharedApp: 0,
isVideoOff: false,
isAuidoOff: false,
vanityID: nil
)
And then trying to call the actionMeeting, but no luck
UPDATE
We’ve migrated the code from Swift to ObjC and copied parts directly from the sample application. Still same error, and still no clues what this SDK is expecting:
#import "ViewController.h"
#define kZoomSDKDomain @"zoom.us"
#define kZoomSDKKey @"..."
#define kZoomSDKSecret @"..."
#define kSDKUserName @"Bobin"
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
BOOL useCustomizedUI = NO;
ZoomSDK* sdk = [ZoomSDK sharedSDK];
NSString* domain = kZoomSDKDomain;
NSString* key = kZoomSDKKey;
NSString* secret = kZoomSDKSecret;
[sdk initSDK:useCustomizedUI];
[sdk setZoomDomain:domain];
ZoomSDKError ret = [[sdk getAuthService] sdkAuth:key appSecret:secret];
}
- (IBAction)joinClicked:(id)sender {
ZoomSDKMeetingService* meetingService = [[ZoomSDK sharedSDK] getMeetingService];
NSString* userName = kSDKUserName;
NSString* pwd = @"...";
NSString* meetingNumber = @"...";
ZoomSDKError ret = [meetingService joinMeeting:ZoomSDKUserType_APIUser
toke4enfrocelogin:nil
webinarToken:nil
participantId:nil
meetingNumber:meetingNumber
displayName:userName
password:pwd
isDirectShare:NO
sharedApp:0
isVideoOff:NO
isAuidoOff:NO
vanityID:nil];
}
- (IBAction)unmuteClicked:(id)sender {
ZoomSDKMeetingService* meetingService = [[ZoomSDK sharedSDK] getMeetingService];
ZoomSDKError* result = [[meetingService getMeetingActionController] actionMeetingWithCmd:ActionMeetingCmd_UnMuteAudio userID:0 onScreen:ScreenType_First];
// result is ZoomSDKError_WrongUsage :-(((
}
@end