Before starting to integrate the SDK, please make sure that the development environment meets the following requirements:
Platform | Remarks |
---|---|
Windows | 32-bit node |
macOS | 64-bit node |
You can go to node official website to download and refer to Tutorial to install.
Please go to the ZEGO Admin Console to register an account and apply for the AppID and AppSign required to initialize the SDK. For the application process, please refer to Project Management.
whiteboard_demo
├─ .gitignore
├─ .prettierrc.js
├─ README.md
├─ biz.js // API Specific usage example
├─ index.html // Project entry file
├─ lib
├─ main.js
├─ pack.config.js
├─ sdk
│ ├─ biz.js // API Specific usage example
│ ├─ init.js // Initialize SDK related
│ ├─ init_express.js // Initialize SDK related
│ ├─ zego-express-docsview-electron // File SDK
│ └─ zego-express-engine-electron // Whiteboard SDK
├─ style.css
└─ style_login.css
The downloaded sample source code lacks the AppID and AppSign required for SDK initialization, and the whiteboard_demo/sdk/init.js file needs to be modified. Please use the AppID and AppSign obtained in the "Prerequisites" of this article to fill in correctly.
// APP account
var _openConfig = {
appID: 0, // Please fill in the APPID you applied for
appSignStr: '', // Please fill in the APPSIGN you applied for
sdkPath: {
express: './sdk/zego-express-engine-electron/ZegoExpressEngine.js',
expressWb: './sdk/zego-express-engine-electron/ZegoWhiteBoardView.js',
docs: './sdk/zego-express-docsview-electron'
}
};
Switch to the project directory in Terminal and execute yarn install
or npm install
command to install dependencies.
Execute the yarn start
or npm run start
command in Terminal to run the sample source code, and the login window will pop up automatically after the run is successful.
Execute the Control+C
command in Terminal to stop the operation.