Documentation
ExpressAudioSDK Voice Call
Documentation
Demo APP
SDK Center
API Center
FAQ
Code Market
Console
Sign Up
Log In
中文站 English
  • Documentation
  • Voice Call
  • Resources & Reference
  • Sample code
Sample Code
Download
  • Download
Note

Instructions for running sample code

This article describes how to quickly run the sample source code and experience basic audio and video calling services.

Prepare the environment

Please ensure that the development environment meets the following technical requirements:

  • Operating system Windows7 or above / macOS 11.0 or above
  • Audio / Video device and internet connection available
  • Node.js installed, LTS version recommended

Get AppID

The AppID required by the SDK are missing in the sample code, please make sure a project has been created in ZEGOCLOUD Console and a valid AppID have been applied.

Run sample code

  1. Open project with Visual Studio Code

  2. The "AppID", "UserID" and "Token" required for SDK initialization are missing from the sample codes, and the /keycenter.js file needs to be modified. Please fill in them correctly, otherwise, the sample code cannot be run. You can get the appID and a temporary token in ZEGOCLOUD Console.

  3. Install dependencies and run

$ npm install
$ npm run start

Experience Real-time Audio and Video Functions

We recommend you run your project on a real device. If your app runs successfully, you should hear the sound and see the video captured locally from your device.

To test out the real-time audio and video features, visit the ZEGO Express Web Demo, and enter the same AppID, Server and RoomID to join the same room. If it runs successfully, you should be able to view the video from both the local side and the remote side, and hear the sound from both sides as well.

In audio-only scenarios, no video will be captured and displayed.

Page Directory
  • Free trial
  • 提交工单
    咨询集成、功能及报价等问题
    电话咨询
    400 1006 604
    Get Consulting
    Scan Wechat QR code