Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-zoom-sdk

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-zoom-sdk

Zoom.us SDK bridge for React Native

  • 0.19.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by233.33%
Maintainers
2
Weekly downloads
 
Created
Source

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
  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-zoom-sdk and add RNMobileRTC.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNMobileRTC.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)
Android
  1. 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 the getPackages() method
  1. 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')
    
  2. 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.initialize(sdkKey, sdkSecret, 'zoom.us')

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.startMeeting({
  meetingNumber: '0123456789',
  userName: 'Nana',
  userType: UserType.ZOOM_USER,
})

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.joinMeeting({ meetingNumber: '0123456789', userName: 'Nana', })

Constants

User types

  const { UserType } = RNMobileRTC;
  UserType.API_USER // API user type
  UserType.ZOOM_USER // Work email user type
  UserType.SSO_USER // Single-sign-on user type

Auth error

Usage

import RNMobileRTC from 'react-native-zoom-sdk';

export default class App extends Component<{}> {
  constructor() {
    super();
    ...
    RNMobileRTC.initialize(key, secret, domain)
      .then((result) => alert(result))
      .catch((error) => { throw new Error(error.message) });
  }

  handleJoinTheMeeting() {
    // Join the meeting
    RNMobileRTC.joinMeeting({
      meetingNumber: '0123456789',
      userName: 'Nana',
      // pwd: 'my password',
      // participantId: '111',
    }).then((result) => alert(result))
      .catch((error) => {
        if (error.code === RNMobileRTC.MeetingError.MEETING_NOT_EXIST) {
          console.error('Meeting does not exist!');
        }
      });
  }

  render() {
    return (
      <View style={styles.container}>
        <TouchableOpacity onPress={this.handleJoinTheMeeting}>
          <Text style={styles.welcome}>
            Join the meeting!
        	</Text>
        </TouchableOpacity>
      </View>
    );
  }
}	

Keywords

FAQs

Package last updated on 15 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc