Implementation of native Android and iOS zoom.us SDK for React Native.
This is an implementation of the native Android and iOS zoom.us SDK so before you start you need to install the native Android and iOS SDK first to your project.
Follow Zoom Developer Documentation to create a developer account and application.
Follow Zoom Android SDK Documentation to install native Android SDK in your project.
Follow Zoom iOS SDK Documentation to just download the library and don't add it to project.
using either Yarn:
$ yarn add https://github.com/EslamElMeniawy/react-native-zoom-us-sdk
or npm:
$ npm install --save https://github.com/EslamElMeniawy/react-native-zoom-us-sdk
Move the iOS lib
folder downloaded in first step to
projectDir/node_modules/react-native-zoom-us-sdk/ios
- React Native 0.60+
CLI autolink feature links the module while building the app.
- React Native <= 0.59
$ react-native link react-native-zoom-us-sdk
Note For iOS
using cocoapods
, run:
$ cd ios/ && pod install
import ZoomUsSdk from 'react-native-zoom-us-sdk';
try {
const initializeResult = await ZoomUsSdk.initializeZoom(
'SdkApiKey',
'SdkApiSecret',
'WebDomain',
);
console.log(initializeResult);
} catch (exception) {
console.error('Error initialize zoom', exception);
}
try {
const startResult = await ZoomUsSdk.startMeeting(
'JwtAccessToken',
'ZoomToken',
'ZoomAccessToken',
'MeetingNnumber',
'UserId',
'DisplayName',
// Meeting options.
{
autoConnectAudio: true,
disableCallIn: true,
disableCallOut: true,
meetingInviteHidden: true,
meetingShareHidden: true,
meetingIdHidden: true,
meetingPasswordHidden: true,
meetingAudioHidden: true,
meetingVideoHidden: true,
meetingParticipantHidden: true,
meetingMoreHidden: true,
},
);
console.log(startResult);
} catch (exception) {
if (exception.code === 'ERR_ZOOM_IN_MEETING') {
// User already in a meeting.
// You can either use ZoomUsSdk.returnToCurrentMeeting()
// Or ZoomUsSdk.leaveCurrentMeeting()
// Or let the user decide.
} else {
console.error('Error start meeting', exception);
}
}
try {
const joinResult = await ZoomUsSdk.joinMeeting(
'MeetingNnumber', // This value is returened in start meeting result.
'MeetingPassword', // This value is returened in start meeting result.
'DisplayName',
// Meeting options.
{
autoConnectAudio: true,
disableCallIn: true,
disableCallOut: true,
meetingInviteHidden: true,
meetingShareHidden: true,
meetingIdHidden: true,
meetingPasswordHidden: true,
meetingAudioHidden: true,
meetingVideoHidden: true,
meetingParticipantHidden: true,
meetingMoreHidden: true,
},
);
console.log(joinResult);
} catch (exception) {
if (exception.code === 'ERR_ZOOM_IN_MEETING') {
// User already in a meeting.
// You can either use ZoomUsSdk.returnToCurrentMeeting()
// Or ZoomUsSdk.leaveCurrentMeeting()
// Or let the user decide.
} else {
console.error('Error join meeting', exception);
}
}
try {
const returnToMeetingResult = await ZoomUsSdk.returnToCurrentMeeting();
console.log(returnToMeetingResult);
} catch (exception) {
console.error('Error returning to current meeting', exception);
}
try {
const leaveMeetingResult = await ZoomUsSdk.leaveCurrentMeeting();
console.log(leaveMeetingResult);
} catch (exception) {
console.error('Error leaving current meeting', exception);
}
An example of usage of this library can be found at react-native-zoom-us-sdk-example.