react-native-zoom-sdk
Getting started
Before you start, you should add Zoom SDK by downloading iOS and Android SDK to your project
place iOS SDK in ios/lib/
directory of your project.
Or add this line to your Podfile
pod 'ZoomMobileRTC'
After that install the package with:
$ npm install react-native-zoom-sdk --save
Mostly automatic installation
Run the link
command. It will execute other SDK config to your app.
$ react-native link react-native-zoom-sdk
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-zoom-sdk
and addRNMobileRTC.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNMobileRTC.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactor.RNMobileRTCPackage;
to the imports at the top of the file - Add
new RNMobileRtcPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-zoom-sdk' project(':react-native-zoom-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zoom-sdk/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-zoom-sdk')
Methods
initialize
Initializes the SDK with SDK authorization. Returns a promise as a result.
Catch and handle errors with codes from RNMobileRTC.AuthError
object.
Signature:
RNMobileRTC
startMeeting
Starts the new meeting. Returns a promise that represents a result of starting
the meeting. Catch and handle error types from RNMobileRTC.MeetingError
object
Signature:
RNMobileRTC
joinMeeting
Joins the user to the meeting. Returns a promise that represents a result of joining
to the meeting. Catch and handle error types from RNMobileRTC.MeetingError
object
Signature:
RNMobileRTC
Constants
User types
const UserType = RNMobileRTC; UserTypeAPI_USER // API user type UserTypeZOOM_USER // Work email user type UserTypeSSO_USER // Single-sign-on user type
Auth error
Usage
; <{}> { super; ... RNMobileRTC ; } { // Join the meeting RNMobileRTC ; } { return <View style=stylescontainer> <TouchableOpacity onPress=thishandleJoinTheMeeting> <Text style=styleswelcome> Join the meeting! </Text> </TouchableOpacity> </View> ; }