8.0.1 • Published 1 day ago

react-native-zoom-us v8.0.1

Weekly downloads
266
License
MIT
Repository
-
Last release
1 day ago

react-native-zoom-us

This is a bridge for ZoomUS SDK.

npm

PlatformVersionSDK UrlChangelog
iOS5.17.11.14222ZoomSDKmarketplace.zoom.us
Android5.17.11.20433jitpack-zoom-usmarketplace.zoom.us

Tested on Android and iOS: (See details)

Pull requests are welcome.

Docs

Getting started

Install npm lib: npm install react-native-zoom-us

Installation

Android

  1. Declare permissions

Depending on how you will use the lib, you will need to declare permissions in /android/app/src/main/AndroidManifest.xml. This is the minimum set of permissions you need to add in order to use audio and video:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
  <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
  <uses-permission android:name="android.permission.CAMERA"/>
  <uses-permission android:name="android.permission.RECORD_AUDIO"/>

  ...
</manifest>

You may also need the following permissions:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

  ...
</manifest>
  1. Add this to /android/app/src/debug/AndroidManifest.xml
<application
  ...
  tools:remove="android:networkSecurityConfig"
  tools:replace="android:usesCleartextTraffic"
>

This is needed because ZoomSDK declares android:networkSecurityConfig

  1. npm run android

iOS

  1. Make sure you have appropriate description in Info.plist:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>We will use your Bluetooth to access your Bluetooth headphones.</string>

<key>NSCameraUsageDescription</key>
<string>For people to see you during meetings, we need access to your camera.</string>

<key>NSMicrophoneUsageDescription</key>
<string>For people to hear you during meetings, we need access to your microphone.</string>

<key>NSPhotoLibraryUsageDescription</key>
<string>For people to share, we need access to your photos.</string>
  1. Update pods using cd ios/ && pod install && cd ..

  2. npm run ios

Usage

import ZoomUs from 'react-native-zoom-us';

// initialize
await ZoomUs.initialize({
  jwtToken: '...',
});

// initialize with extra config
await ZoomUs.initialize(
  {
    jwtToken: '...',
    domain: 'zoom.us',
  },
  {
    disableShowVideoPreviewWhenJoinMeeting: true,
    enableCustomizedMeetingUI: true,
  },
);

// Start Meeting
await ZoomUs.startMeeting({
  userName: 'Johny',
  meetingNumber: '12345678',
  zoomAccessToken: zak,
  userType: 2, // optional
});

// Join Meeting
await ZoomUs.joinMeeting({
  userName: 'Johny',
  meetingNumber: '12345678',
});

// Join Meeting with extra params
await ZoomUs.joinMeeting({
  userName: 'Johny',
  meetingNumber: '12345678',
  password: '1234',
  noAudio: true,
  noVideo: true,
});

// Leave Meeting
await ZoomUs.leaveMeeting();

// Connect Audio
await ZoomUs.connectAudio();
// you can also use autoConnectAudio: true in `ZoomUs.joinMeeting`

Events Api

Hook sample for listening events:

import ZoomUs from 'react-native-zoom-us';

useEffect(() => {
  const listener = ZoomUs.onMeetingStatusChange(({event}) => {
    console.log('onMeetingStatusChange', event);
  });
  const joinListener = ZoomUs.onMeetingJoined(() => {
    console.log('onMeetingJoined');
  });

  return () => {
    listener.remove();
    joinListener.remove();
  };
}, []);

If you need more events, take a look Events

Testing

The plugin has been tested for joinMeeting using smoke test procedure:

  • react-native-zoom-us: 6.18.0
  • react-native: 0.72.2
  • node: 16.20.1
  • macOS: 13.4.1 M1
  • XCode: 14.3.1
  • Android minSdkVersion: 23

FAQ

Does library support Expo?

You have to eject your expo project to use this library.

8.0.1

1 day ago

8.0.0

1 day ago

7.0.0

23 days ago

6.20.0

4 months ago

6.19.6

4 months ago

6.19.4

4 months ago

6.18.2

5 months ago

6.18.1

6 months ago

6.17.0

10 months ago

6.17.1

10 months ago

6.18.0

10 months ago

6.16.3

1 year ago

6.16.4

1 year ago

6.16.5

1 year ago

6.15.1

2 years ago

6.15.0

2 years ago

6.11.0

2 years ago

6.13.0

2 years ago

6.12.0

2 years ago

6.10.0

2 years ago

6.14.1

2 years ago

6.14.0

2 years ago

6.9.0

2 years ago

6.8.1

2 years ago

6.8.0

2 years ago

6.7.0

2 years ago

6.7.1

2 years ago

6.6.1

2 years ago

6.6.0

3 years ago

6.5.1

3 years ago

6.5.0

3 years ago

6.4.0

3 years ago

6.3.0

3 years ago

6.3.1

3 years ago

6.2.5

3 years ago

6.2.4

3 years ago

6.2.3

3 years ago

6.2.2

3 years ago

6.2.1

3 years ago

6.1.5

3 years ago

6.1.4

3 years ago

6.1.3

3 years ago

6.1.0

3 years ago

6.0.1

3 years ago

6.1.2

3 years ago

6.0.3

3 years ago

6.1.1

3 years ago

6.0.2

3 years ago

6.0.4

3 years ago

5.12.1

3 years ago

5.12.0

3 years ago

5.11.0

3 years ago

5.10.0

3 years ago

5.9.0

3 years ago

5.8.5

3 years ago

5.8.4

3 years ago

5.8.3

3 years ago

5.8.2

3 years ago

5.8.1

3 years ago

5.8.0

3 years ago

5.6.2

3 years ago

5.7.0

3 years ago

5.6.1

3 years ago

5.6.0

3 years ago

5.5.0

3 years ago

5.4.2

3 years ago

5.4.1

3 years ago

5.4.0

3 years ago

5.3.4

3 years ago

5.3.3

3 years ago

5.3.1

3 years ago

5.3.0

3 years ago

5.2.0

3 years ago

5.1.0

4 years ago

5.0.0

4 years ago

4.0.4

4 years ago

4.0.1

4 years ago

3.0.0

4 years ago

2.0.2

4 years ago

2.0.0

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago