logo
Video Call
On this page

Running Example Source Code


This guide introduces how to quickly run the example source code and experience the basic Video Call service.

Prepare Environment

Before starting to integrate ZEGO Express SDK, please install a browser according to the following compatibility requirements:

BrowserWindowsMacAndroidiOSHarmony OS
Chrome 58 or above✔️✔️✔️
  • iOS 14.3 or above supports stream publishing and playing
  • iOS 14.3 below only supports stream playing
FireFox 56 or above✔️✔️✔️
Safari 11 or above-✔️-✔️
Opera 45 or above✔️✔️Partially supported
QQ Browser latest version✔️✔️Partially supported
360 Secure Browser speed mode✔️✔️
WeChat Browser--✔️
  • iOS 14.3 or above, and when WeChat version is 6.5 or above, supports stream publishing and playing
  • iOS 14.3 below only supports stream playing
WebView--✔️
  • iOS 14.3 or above supports stream publishing and playing
  • iOS 14.3 below only supports stream playing
Huawei BrowserMate 60 Pro model, Huawei Browser on HarmonyOS NEXT beta 2
Warning

Only web servers with SSL (HTTPS) are supported. The web service domain name of local debugging tools can use localhost or 127.0.0.1.

Prerequisites

You have created a project in the ZEGOCLOUD Console, applied for a valid AppID, and obtained the Server URL for accessing the server.

Warning
  • If using SDK version 3.7.0 or above, the server parameter can be filled with the Server URL obtained from the console or directly filled with an empty string.
  • The Server URL is not the ServerSecret. You can refer to the following image to obtain the Server URL in the ZEGOCLOUD Console.

Get Example Source Code

Example Source Code Directory Structure

The following directory structure shows the file structure of the express-demo-web subdirectory. All file paths mentioned below are relative to this directory.

.
├── README.md
...
└── src  # Source code folder
    ├── Examples  # Example code
    │   ├── AdvancedAudioProcessing   # Advanced audio features
    │   ├── AdvancedStreaming         # Advanced stream publishing and playing
    │   ├── AdvancedVideoProcessing   # Advanced video features
    │   ├── CommonFeatures            # Common features
    │   ├── DebugAndConfig            # Debugging and configuration
    │   ├── Framework                 # Best practices/framework related
    │   ├── Others                    # Other features
    │   ├── QuickStart                # Quick Start
    │   └── Scenes                    # Best practices/scenario related
    ├── assets    # Resource folder, storing project shared resource files, including SDK, various dependency libraries, translation related configuration files, etc.
    └── KeyCenter.js  # Configuration related file, can fill in the applied AppID, server URL, etc.

Run Example Source Code

  1. In the downloaded example source code, use a supported browser to open the "./src/Examples/DebugAndConfig/InitSettings/index.html" file, enter the AppID and Server URL obtained in Prerequisites (not ServerSecret), and click "Settings".

  2. After the settings are completed, you can start experiencing Demo features. You can use a supported browser to open the HTML files of various scenario features under the "./src/Examples" folder. For example, open "index.html" under the "QuickStart/CommonUsage" folder.

Warning
  • If the local path where the page is stored contains Chinese characters, some browsers may fail to load CSS and other style files when opening the page, and the page will display abnormally. It is recommended that developers set all path names of source code files to "English characters".
  • To facilitate developer debugging, the ZEGOCLOUD Console provides the function of generating temporary Tokens. Developers can directly obtain temporary Tokens for use. For details, please refer to Console - Development Assistance. However, in the developer's own online environment, Tokens must be generated through their own server.

Experience Video Call Features

Run the project on a real device. After running successfully, you can see the local video.

For convenience of experience, ZEGO provides a Web platform for debugging. On this page, enter the same AppID and RoomID, enter different UserIDs, and the corresponding Token, you can join the same Room to communicate with real device. When the Video Call starts successfully, you can hear the remote audio and see the remote video.

Previous

Common Error codes

Next

Integrating SDK

On this page

Back to top