Skip to content

This is a sample application that demonstrates how to use the Zoom Video SDK in a React Native application.

Notifications You must be signed in to change notification settings

zoom/videosdk-reactnative-quickstart

Repository files navigation

Zoom VideoSDK React Native Demo

Use of this sample app is subject to our Terms of Use.

This is a sample application that demonstrates how to use the Zoom Video SDK in a React Native application. Built with Expo.

Prerequisites

Getting Started

  1. Clone the Repo
git clone https://github.com/zoom/VideoSDK-ReactNative-Quickstart.git
  1. Install the dependencies
bun install
  1. Install cocoapods (iOS only)
bunx pod-install ## (or) cd ios && pod install
  1. Run the app
bunx expo run:ios
# or
bunx expo run:android
  1. In the input field for the JWT, input a JWT for your session name (default: "TestOne").

  2. Click "Join" to join the session

JWT Helper

The project provides a generateToken.ts file that can be used to generate a temporary JWT:

  1. Create a .env file in the root directory of the project, you can do this by copying the .env.example file (cp .env.example .env) and replacing the values with your own. The .env file should look like this:
SDK_KEY=abc123XXXXXXXXXX
SDK_SECRET=abc123XXXXXXXXXX
  1. Run bun generateToken.ts TestOne --copy-to-clipboard

The script generates a token for the proivded session name and the --copy-to-clipboard or -c flag copies it to your clipboard.

How to setup in a fresh project

  1. Create a new project, we recommend using Expo to simplify the setup
bunx create-expo-app zoom-video-sdk --template # select Blank (Typescript)
# or
bunx react-native@latest init zoomRNCli --template react-native-template-typescript
  1. Install the Zoom Video SDK
bunx expo add @zoom/react-native-videosdk
  • For iOS run: npx pod-install to install the pods
  1. Add permissions for the camera and microphone
  • Add the following to your app.json.
{
  "expo": {
    "android": {
      "permissions": ["CAMERA", "RECORD_AUDIO"]
    },
    "ios": {
      "infoPlist": {
        "NSCameraUsageDescription": "Text",
        "NSMicrophoneUsageDescription": "Text"
      }
    }
  }
}

If you're not using Expo:

  • For iOS you'll have to add these to your info.plist manually.
  • For Android, you can request permissions at runtime using the Permissions module as done in usePermission in utils/lib.tsx or add these to your AndroidManifest file.
  1. Wrap your app in the ZoomVideoSdkProvider
function App() {
  ...
  return (
    <ZoomVideoSdkProvider config={{....}}>
      <YourApp>
    </ZoomVideoSdkProvider>
  );
  1. Use the Zoom Video SDK
function YourApp() {
  const zoom = useZoom();
  const handleJoin = async () => {
     await zoom.joinSession({....});
  }
  ...
  1. Scaffold the native code (Skip if not using Expo)
bunx expo prebuild
  1. Run the app
  • Expo
bunx expo run:ios
# or
bunx expo run:android
  • React Native
bun run android
# or
bun run ios

Need help?

If you're looking for help, try Developer Support or our Developer Forum. Priority support is also available with Premier Developer Support plans.

About

This is a sample application that demonstrates how to use the Zoom Video SDK in a React Native application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •