Running Example Source Code
This article describes how to quickly run the example source code and experience the basic audio and video call service.
Prepare Environment
Please ensure that your development environment meets the following technical requirements:
- React Native 0.60 or above.
- iOS device or simulator running iOS 12.0 or above that supports audio and video (using a real device is recommended).
- Android device or simulator running Android 4.4 or above that supports audio and video (using a real device is recommended). If using a real device, enable the "Allow debugging" option.
- iOS/Android device is connected to the Internet.
- Install Node.js, and it is recommended to use the Long Term Support (LTS) version displayed on the official website homepage.
Prerequisites
You have created a project in the ZEGOCLOUD Console and applied for a valid AppID and AppSign.
The SDK also supports Token authentication. If you need to upgrade the authentication method, please refer to How to Upgrade from AppSign Authentication to Token Authentication.
Get Example Source Code
GitHub Download
Run Example Code
- Use VS Code to open the project.
- Modify the "/App.js" file and fill in the "appID" and "appSign" required for SDK initialization.
Please fill in correctly with the AppID and AppSign obtained in the Prerequisites of this article, otherwise the example source code cannot run normally.

- Execute the following commands to install dependencies and start.
When executing the npm install command to install the SDK, if the download from the npm official mirror is slow, you can execute the npm set https://registry.npmmirror.com/ command to switch to the domestic mirror.
npm install
npx react-native run-android/npx react-native run-iosExperience Video Call Features
Run the project on a real device. After running successfully, you can see the local video image.
For convenience, ZEGO provides a Web platform for debugging. On this page, enter the same AppID and RoomID, enter different UserIDs, and the corresponding Token, to join the same room and communicate with the real device. When the audio and video call starts successfully, you can hear the remote audio and see the remote video image.
