From b9bb6f589aa40357e3ec4490d1aa5bfb3b22cafe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=B9=BE=E6=B3=BD?= Date: Mon, 3 Jun 2019 13:57:20 +0800 Subject: [PATCH] web readme update --- .gitignore | 1 + Group-Video/OpenVideoCall-Web/README.md | 95 ++++++++------------ Group-Video/OpenVideoCall-Web/README.yaml | 41 ++------- Group-Video/OpenVideoCall-Web/README.zh.md | 40 +++++---- Group-Video/OpenVideoCall-Web/README.zh.yaml | 24 ++--- gen_readme.sh | 4 + 6 files changed, 76 insertions(+), 129 deletions(-) mode change 100644 => 100755 gen_readme.sh diff --git a/.gitignore b/.gitignore index c690fbb6..5e059773 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.vscode *.framework *.a diff --git a/Group-Video/OpenVideoCall-Web/README.md b/Group-Video/OpenVideoCall-Web/README.md index c92a6e4e..e69c2857 100755 --- a/Group-Video/OpenVideoCall-Web/README.md +++ b/Group-Video/OpenVideoCall-Web/README.md @@ -1,83 +1,62 @@ -# Agora Open Video Call for Web +# Open Video Call for Web -*Read this in other languages: [中文](README.zh.md)* +*English | [中文](README.zh.md)* -This tutorial shows you how to quickly create an open video call using the Agora sample app and the [Agora 2.0+ API](https://docs.agora.io/en/2.2/product/Voice/API%20Reference/communication_web_audio#voice-call-api). +This tutorial shows you how to quickly create an open video call using the Agora sample app. ## Prerequisites -- Agora.io Developer Account + - Node.js 6.9.1+ - A web server that supports SSL (https) ## Quick Start + This section shows you how to prepare, build, and run the sample application. -### Create an Account and Obtain an App ID -To build and run the sample application, get an App ID: +### Obtain an App ID +To build and run the sample application, get an App ID: 1. Create a developer account at [agora.io](https://dashboard.agora.io/signin/). 2. In the Dashboard that opens, click **Projects** > **Project List** in the left navigation. -3. Copy the **App ID** from the Dashboard to a text file. You will use this when you launch the app. -4. Open the **src/utils/Settings.js** file. At the bottom of the file, replace `<#YOUR APP ID#>` with the App ID from the dashboard. - - **Note:** Place the App ID within single or double quotes. - -```xml -export const APP_ID = <#YOUR APP ID#>; -``` - -### Update and Run the Sample Application - -1. Using the Terminal app, enter the `install` command in your project directory. This command installs libraries that are required to run the sample application. - - ``` bash - # install dependencies - npm install - ``` - -2. Start the application by entering the `run dev` or `run build` command. - - The `run dev` command is for development purposes. - - ``` bash - # serve with hot reload at localhost:8080 - npm run dev - ``` +3. Copy the **App ID** from the Dashboard. - The `run build` command is for production purposes and minifies code. - - ``` bash - # build for production with minification - npm run build - ``` - -3. Your default browser should open and display the sample application, as shown here. +4. Open the **src/utils/Settings.js** file. At the bottom of the file, replace `<#YOUR APP ID#>` with the App ID from the dashboard. - ![index.jpg](images/index.jpg) + **Note:** Place the App ID within single or double quotes. - **Note:** In some cases, you may need to open a browser and enter `http://localhost:8080` as the URL. + ```xml + export const APP_ID = <#YOUR APP ID#>; + ``` -4. Additional commands are available for the sample application. +### Install dependencies and integrate the Agora Video SDK - Use the `run lint` command to use [**ESLint**](https://eslint.org/) and `run format` command to improve code quality. - ``` bash - # use eslint and prettier to improve code quality - npm run lint - npm run format - ``` - Use the `run test` command to run unit tests. +1. Using the Terminal app, enter the `install` command in your project directory. This command installs libraries that are required to run the sample application. + ``` bash + # install dependencies + npm install + ``` +2. Start the application by entering the `run dev` or `run build` command. + The `run dev` command is for development purposes. + ``` bash + # serve with hot reload at localhost:8080 + npm run dev + ``` + The `run build` command is for production purposes and minifies code. + ``` bash + # build for production with minification + npm run build + ``` +3. Your default browser should open and display the sample application. + **Note:** In some cases, you may need to open a browser and enter `http://localhost:8080` as the URL. - ``` bash - # unit testing - npm run test - ``` ## Resources -* A detailed code walkthrough for this sample is available in [Steps to Create this Sample](./guide.md). -* Complete API documentation is available at the [Document Center](https://docs.agora.io/en/). -* You can file bugs about this sample [here](https://github.com/AgoraIO/Basic-Video-Call/issues). + +- You can find full API document at [Document Center](https://docs.agora.io/en/) +- You can file bugs about this demo at [issue](https://github.com/AgoraIO/Basic-Video-Call/issues) ## License -This software is under the MIT License (MIT). [View the license](LICENSE.md). + +The MIT License (MIT) diff --git a/Group-Video/OpenVideoCall-Web/README.yaml b/Group-Video/OpenVideoCall-Web/README.yaml index 745aa8c7..9b3d71aa 100644 --- a/Group-Video/OpenVideoCall-Web/README.yaml +++ b/Group-Video/OpenVideoCall-Web/README.yaml @@ -16,48 +16,19 @@ QuickStart: sections: - title: Obtain an App ID content: | - To build and run the sample application, get an App ID: - 1. Create a developer account at [agora.io](https://dashboard.agora.io/signin/). - 2. In the Dashboard that opens, click **Projects** > **Project List** in the left navigation. - 3. Copy the **App ID** from the Dashboard. - - title: Install dependencies and integrate the Agora Video SDK - content: | - 1. Open the **src/utils/Settings.js** file. At the bottom of the file, replace `<#YOUR APP ID#>` with the App ID from the dashboard. + $_{APPID} + 4. Open the **src/utils/Settings.js** file. At the bottom of the file, replace `<#YOUR APP ID#>` with the App ID from the dashboard. **Note:** Place the App ID within single or double quotes. ```xml export const APP_ID = <#YOUR APP ID#>; ``` + - title: Install dependencies and integrate the Agora Video SDK + content: | + - 2. Using the Terminal app, enter the `install` command in your project directory. This command installs libraries that are required to run the sample application. - - ``` bash - # install dependencies - npm install - ``` - - 3. Start the application by entering the `run dev` or `run build` command. - - The `run dev` command is for development purposes. - - ``` bash - # serve with hot reload at localhost:8080 - npm run dev - ``` - - The `run build` command is for production purposes and minifies code. - - ``` bash - # build for production with minification - npm run build - ``` - - 4. Your default browser should open and display the sample application, as shown here. - - ![index.jpg](images/index.jpg) - - **Note:** In some cases, you may need to open a browser and enter `http://localhost:8080` as the URL. + $_{WEB_RUN} Resources: document: https://docs.agora.io/en/ diff --git a/Group-Video/OpenVideoCall-Web/README.zh.md b/Group-Video/OpenVideoCall-Web/README.zh.md index 9b5d19e1..bee48f25 100644 --- a/Group-Video/OpenVideoCall-Web/README.zh.md +++ b/Group-Video/OpenVideoCall-Web/README.zh.md @@ -1,16 +1,17 @@ -# Agora Open Video Call for Web +# Open Video Call for Web -这个实例代码展示了如何使用[Agora2.0+](https://docs.agora.io/en/2.2/product/Voice/API%20Reference/communication_web_audio#voice-call-api)接口快速实现视频电话应用 +*[English](README.md) | 中文* + +这个开源示例项目演示了如何快速集成 Agora 视频 SDK,实现多人视频通话。 ## 环境准备 -- Agora开发者账号 - Node.js 6.9.1+ - 支持SSL(https)的服务器 ## 运行示例程序 -这个段落主要讲解了如果编译和运行实例程序 +这个段落主要讲解了如何编译和运行示例程序。 ### 创建Agora账号并获取AppId @@ -18,28 +19,31 @@ 1. 在[agora.io](https://dashboard.agora.io/signin/)创建一个开发者账号 2. 前往后台页面,点击左部导航栏的 **项目 > 项目列表** 菜单 3. 复制后台的 **App ID** 并备注,稍后启动应用时会用到它 + 4. 打开 **src/utils/Settings.js** 文件。在文件的底部,将`<#YOUR APP ID#>`替换为您自己的App ID -**注意:** App ID是字符串类型,需要双引号或者单引号 -```javascript -export const APP_ID = <#YOUR APP ID#>; -``` -### 更新并启动实例程序 + **注意:** App ID是字符串类型,需要双引号或者单引号 + ```javascript + export const APP_ID = <#YOUR APP ID#>; + ``` + +### 集成 Agora 视频 SDK 1. 在Terminal中,在您的项目根目录输入`install`命令以安装项目依赖 -```shell -# install dependencies -npm install -``` + ```shell + # install dependencies + npm install + ``` 2. 输入`run dev`命令以启动Web程序 -```shell -# serve with hot reload at localhost:8080 -npm run dev -``` + ```shell + # serve with hot reload at localhost:8080 + npm run dev + ``` + ## 联系我们 -- 完整的 API 文档见 [文档中心](https://docs.agora.io/en/) +- 完整的 API 文档见 [文档中心](https://docs.agora.io/cn/) - 如果发现了示例代码的 bug, 欢迎提交 [issue](https://github.com/AgoraIO/Basic-Video-Call/issues) ## 代码许可 diff --git a/Group-Video/OpenVideoCall-Web/README.zh.yaml b/Group-Video/OpenVideoCall-Web/README.zh.yaml index b7a8d974..c0134978 100644 --- a/Group-Video/OpenVideoCall-Web/README.zh.yaml +++ b/Group-Video/OpenVideoCall-Web/README.zh.yaml @@ -16,28 +16,16 @@ QuickStart: sections: - title: 创建Agora账号并获取AppId content: | - 在编译和启动实例程序前,您需要首先获取一个可用的App ID: - 1. 在[agora.io](https://dashboard.agora.io/signin/)创建一个开发者账号 - 2. 前往后台页面,点击左部导航栏的 **项目 > 项目列表** 菜单 - 3. 复制后台的 **App ID** 并备注,稍后启动应用时会用到它 - - - title: 集成 Agora 视频 SDK - content: | - 1. 打开 **src/utils/Settings.js** 文件。在文件的底部,将`<#YOUR APP ID#>`替换为您自己的App ID + $_{APPID} + 4. 打开 **src/utils/Settings.js** 文件。在文件的底部,将`<#YOUR APP ID#>`替换为您自己的App ID + **注意:** App ID是字符串类型,需要双引号或者单引号 ```javascript export const APP_ID = <#YOUR APP ID#>; ``` - 2. 在Terminal中,在您的项目根目录输入`install`命令以安装项目依赖 - ```shell - # install dependencies - npm install - ``` - 2. 输入`run dev`命令以启动Web程序 - ```shell - # serve with hot reload at localhost:8080 - npm run dev - ``` + - title: 集成 Agora 视频 SDK + content: | + $_{WEB_RUN} Resources: document: https://docs.agora.io/cn/ diff --git a/gen_readme.sh b/gen_readme.sh old mode 100644 new mode 100755 index e69de29b..eba85ba5 --- a/gen_readme.sh +++ b/gen_readme.sh @@ -0,0 +1,4 @@ +#Open Video Call +echo =============$1================= +create-agora-readme -i $1/README.yaml -o $1/README.md +create-agora-readme -i $1/README.zh.yaml -o $1/README.zh.md \ No newline at end of file