Skip to content

Commit

Permalink
web readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
plutoless committed Jun 3, 2019
1 parent 3cb224e commit b9bb6f5
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 129 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode
*.framework
*.a

Expand Down
95 changes: 37 additions & 58 deletions Group-Video/OpenVideoCall-Web/README.md
Original file line number Diff line number Diff line change
@@ -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)
41 changes: 6 additions & 35 deletions Group-Video/OpenVideoCall-Web/README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
40 changes: 22 additions & 18 deletions Group-Video/OpenVideoCall-Web/README.zh.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,49 @@
# 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

在编译和启动实例程序前,您需要首先获取一个可用的App ID:
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)

## 代码许可
Expand Down
24 changes: 6 additions & 18 deletions Group-Video/OpenVideoCall-Web/README.zh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
4 changes: 4 additions & 0 deletions gen_readme.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b9bb6f5

Please sign in to comment.