Example Code Running Guide
Prepare environment
Please ensure the development environment meets the following technical requirements:
- Windows: Windows 7 or above.
- macOS: macOS 11.0 or above.
- Linux: Linux operating systems supporting x86_64, aarch64, armhf architectures. If you need to use the Linux platform, please contact ZEGO Technical Support.
- Audio and video peripherals such as microphones and cameras, ensure the computer is properly connected to the Internet.
- Node.js installed, it is recommended to use the Long Term Support version displayed on the official website homepage.
Prerequisites
You have created a project in the ZEGOCLOUD Console and applied for 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
Local Download
Run example code
-
Use Visual Studio Code to open the example source code.
-
In the "/keycenter.js" file, fill in the "AppID" and "AppSign" required for SDK initialization.
Please use the AppID and AppSign obtained in the Prerequisites of this article to fill in correctly, otherwise the example source code cannot run normally.

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