Description
Hi, we’re trying to get our app to auto connect to internet audio so users don’t have to tap to enable. We’re experiencing some weird behavior when making the connection and can’t figure out how to get it to work properly.
I’d appreciate any help or guidance users or Zoom could offer here. To be quite honest we’ve inherited a rough code base and it wouldn’t surprise me if we’re way off base.
Thanks in advance!
We are using mieszko’s react native bridge GitHub - mieszko4/react-native-zoom-us but it seems our problem is in the objective-c layer. I’ve attached the relevant code below for joining the meeting.
What we’re seeing now is:
If we set joinParam.noAudio = **NO** ; joinParam.noVideo = **NO** ;
then the meeting connects fine - but without auto connecting audio.
If we set noAudio & noVideo = YE
S then we get the following in the console and the meeting never connects, we just get the “waiting” spinner
**2021-02-03 12:09:47.335007-0800 Ortholive[19335:4348033] nZoomSDKInitializeResult, errorCode=0**
**2021-02-03 12:09:47.350769-0800 Ortholive[19335:4348033] joinMeeting, joinMeetingResult=0**
Which version?
5.0.24433.0616 & Miezko4’s React Native Zoom Us GitHub - mieszko4/react-native-zoom-us
- I know RNZoomUS isn’t an official Zoom library, however it seems like the issue I’m having here is at a lower level.
Relevant Code
RCT_EXPORT_METHOD(
joinMeeting: (NSDictionary *)data
withResolve: (RCTPromiseResolveBlock)resolve
withReject: (RCTPromiseRejectBlock)reject
)
{
@try {
meetingPromiseResolve = resolve;
meetingPromiseReject = reject;
MobileRTCMeetingService *ms = [[MobileRTC sharedRTC] getMeetingService];
if (ms) {
ms.delegate = self;
MobileRTCMeetingJoinParam * joinParam = [[MobileRTCMeetingJoinParam alloc]init];
joinParam.userName = data[@"userName"];
joinParam.meetingNumber = data[@"meetingNumber"];
joinParam.password = data[@"password"];
joinParam.participantID = data[@"participantID"];
joinParam.zak = data[@"zoomAccessToken"];
joinParam.webinarToken = data[@"webinarToken"];
joinParam.noAudio = NO;
joinParam.noVideo = NO;
[ms connectMyAudio: YES];
MobileRTCMeetingSettings *settings = [[MobileRTC sharedRTC] getMeetingSettings];
[[[MobileRTC sharedRTC] getMeetingSettings] setAutoConnectInternetAudio:YES];
MobileRTCMeetError joinMeetingResult = [ms joinMeetingWithJoinParam:joinParam];
BOOL isAutoConnected = [settings autoConnectInternetAudio];
BOOL isAudioMuted = [settings muteAudioWhenJoinMeeting];
BOOL isVideoMuted = [settings muteVideoWhenJoinMeeting];
BOOL disabled = [settings driveModeDisabled];
BOOL disabledCallIn = [settings callInDisabled];
BOOL disabledCallOut = [settings callOutDisabled];
NSLog(@"joinMeeting, joinMeetingResult=%d", joinMeetingResult);
}
} @catch (NSError *ex) {
reject(@“ERR_UNEXPECTED_EXCEPTION”, @“Executing joinMeeting”, ex);
}
}