Zoom meeting sdk in react native

68 views Asked by At

How to integrate zoom meeting sdk in react-native? Can anyone suggest me the right document for the integration. Suggest me any library or codes to integrate the zoom functionalities in react native application.

1

There are 1 answers

0
Jaimin Raval On

Use this sdk for implementing zoom in react-native.

To join a session, make the following call on the Zoom Video SDK instance:

const doZoomThings = async() => {
  await zoom.joinSession({
    sessionName: 'name of video session',
    token: 'JWT goes here',
    username: 'name of user as it will appear in the video session to others',
    audioOptions: {
      connect: true,
      mute: false,
    },
    videoOptions: {
      localVideoOn: true,
    },
    videoOptions: {
      localVideoOn: true,
    },
  });
};

Render video using this:

<View style={styles.fullScreenVideo}>
  <VideoView
    user={fullScreenUser}
    sharing={fullScreenUser?.userId === sharingUser?.userId}
    onPress={() => {
      isKeyboardOpen ? toggleUI() : Keyboard.dismiss();
    }}
    fullScreen
  />
</View>

check Audio connections

user.audioStatus.isMuted(); // Check if the user is muted
user.audioStatus.isTalking(); // Check if the user is talking
user.audioStatus.getAudioType(); // Check if the user is connected

start sharing your screen :

const zoomHelper = await zoom.shareHelper;
const isOtherSharing = await zoomHelper.isOtherSharing();
const isShareLocked = await zoomHelper.isShareLocked();
if (isOtherSharing) {
  Alert.alert('Other is sharing');
} else if (isShareLocked) {
  Alert.alert('Share is locked by host');
}
zoom.shareHelper.shareScreen();