style: translate more docs for i18n
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "cli",
|
||||
"label": "Cli",
|
||||
"position": 40
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "视频会议",
|
||||
"label": "Video Conference",
|
||||
"position": 60
|
||||
}
|
||||
|
@ -1,93 +1,98 @@
|
||||
---
|
||||
sidebar_position: 10
|
||||
title: 声网插件部署指南
|
||||
title: Agora Plugin Deployment Guide
|
||||
---
|
||||
|
||||
:::info
|
||||
声网插件需要确保您的 `tailchat` 镜像版本在 1.4.0+
|
||||
The agora plugin needs to ensure that your `tailchat` image version is 1.4.0+
|
||||
:::
|
||||
|
||||
## 在声网平台申请项目
|
||||
## Apply for projects on the agora platform
|
||||
|
||||
Tailchat 声网集成是依赖声网服务实现的音视频通话功能,因此在使用前需要在声网平台上注册。
|
||||
The Tailchat agora integration is an audio and video call function that relies on the agora service, so it needs to be registered on the agora platform before use.
|
||||
|
||||
声网官方: [https://www.agora.io/](https://www.agora.io/)
|
||||
Agora website: [https://www.agora.io/](https://www.agora.io/)
|
||||
|
||||
### 获取配置参数
|
||||
### Get configuration parameters
|
||||
|
||||
注册完毕后/登录后会自动跳转到控制台。在控制台中可以进行项目配置
|
||||
After registration/login, it will automatically jump to the console. Project configuration can be done in the console
|
||||
|
||||

|
||||
|
||||
如果没有创建项目则需要先创建项目。如下图所示
|
||||
If you have not created a project, you need to create a project first. As shown below
|
||||
|
||||

|
||||
|
||||
建议使用安全模式以避免被其他人盗用。
|
||||
It is recommended to use safe mode to avoid being stolen by others.
|
||||
|
||||
接下来我们需要获取一些配置项用于配置`Tailchat`的声网插件。
|
||||
Next we need to get some configuration items to configure the Tailchat's agora plugin.
|
||||
|
||||

|
||||
|
||||
在项目配置中我们可以获取 `appid` 和`app cert`。这两个分别是我们之后要用到的环境变量 `AGORA_APP_ID` 和 `AGORA_APP_CERT`
|
||||
In project configuration we can get `appid` and `app cert`. These two are the environment variables `AGORA_APP_ID` and `AGORA_APP_CERT` that we will use later
|
||||
|
||||
|
||||
### 获取客户凭证
|
||||
### Get client credentials
|
||||
|
||||
另外我们还需要在右上角的 `RESTful API` 处获得客户的权限,
|
||||
In addition, we also need to obtain the customer's permission at the `RESTful API` in the upper right corner,
|
||||
|
||||
操作如图所示:
|
||||
The operation is as shown in the figure:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
这样我们就拿到了另外两个环境变量: `AGORA_CUSTOMER_KEY` 和 `AGORA_CUSTOMER_SECRET`。
|
||||
In this way we get two other environment variables: `AGORA_CUSTOMER_KEY` and `AGORA_CUSTOMER_SECRET`.
|
||||
|
||||
我们初步的准备工作就完成了
|
||||
Our initial preparations are complete
|
||||
|
||||
## 安装插件
|
||||
## Install plugin
|
||||
|
||||
目前声网插件的服务端插件已经被默认安装,您无需做任何事情。但是为了正常使用需要配置环境变量
|
||||
At present, the server-side plugin of the Agora plugin has been installed by default, and you do not need to do anything. However, environment variables need to be configured for use.
|
||||
|
||||
### 配置环境变量
|
||||
### Configure environment variables
|
||||
|
||||
配置环境变量请见 [环境变量](../deployment/environment.md)
|
||||
To configure environment variables, see [environment variables](../deployment/environment.md)
|
||||
|
||||
声网插件需要环境变量如下:
|
||||
The agora plugin requires environment variables as follows:
|
||||
|
||||
- `AGORA_APP_ID`: 声网项目应用id
|
||||
- `AGORA_APP_CERT`: 声网项目证书
|
||||
- `AGORA_CUSTOMER_KEY`: 声网客户id
|
||||
- `AGORA_CUSTOMER_SECRET`: 声网客户秘钥
|
||||
- `AGORA_APP_ID`: the application id of the Agora project
|
||||
- `AGORA_APP_CERT`: AGORA project certificate
|
||||
- `AGORA_CUSTOMER_KEY`: AGORA customer id
|
||||
- `AGORA_CUSTOMER_SECRET`: AGORA customer secret key
|
||||
|
||||
这些环境变量都可以在上面的教程中获取。
|
||||
These environment variables can be obtained in the above tutorial.
|
||||
|
||||
配置环境变量完毕后即可
|
||||
After configuring the environment variables, every will be final
|
||||
|
||||
## 申请服务状态回调
|
||||
|
||||
为了使通话状态能够同步给`Tailchat`, 需要在声网中申请服务端回调。
|
||||
## Application service status callback
|
||||
|
||||
在项目配置中,我们需要在`服务配置` 中启用`消息通知服务`
|
||||
:::info
|
||||
you can skip it if you dont need it.
|
||||
:::
|
||||
|
||||
In order to synchronize the call status to `Tailchat`, it is necessary to apply for a server callback in Agora.
|
||||
|
||||
In project configuration, we need to enable `Notification Center Service Configuration` in `Service Config`
|
||||
|
||||

|
||||
|
||||
需要订阅以下事件:
|
||||
Need to subscribe to the following events:
|
||||
|
||||
- channel create=101
|
||||
- channel destroy=102
|
||||
- broadcaster join channel=103
|
||||
- broadcaster leave channel=104
|
||||
|
||||
接收服务器 URL 一般为: `https://<YOUR SERVER DOMAIN>/api/plugin:com.msgbyte.agora/webhook`, 其中`<YOUR SERVER DOMAIN>` 换成你的 `Tailchat` 域名。
|
||||
The receiving server URL is generally: `https://<YOUR SERVER DOMAIN>/api/plugin:com.msgbyte.agora/webhook`, where `<YOUR SERVER DOMAIN>` is replaced with your `Tailchat` domain name.
|
||||
|
||||
:::info
|
||||
声网的服务会对服务器做连通性检查,因此需要配置好环境变量启动服务后再执行本次步骤。
|
||||
The service of Agora will check the connectivity of the server, so it is necessary to configure the environment variables and start the service before performing this step.
|
||||
|
||||
另外声网需要配置`https` 且 `webrtc`服务也依赖`https`, 因此需要确保服务器网关支持`https`协议
|
||||
In addition, the Agora needs to configure `https` and `webrtc` service also depends on `https`, so you need to ensure that the server gateway supports the `https` protocol
|
||||
:::
|
||||
|
||||
配置完成后你会看到如下提示。等待声网工作人员确认完毕后即可生效。
|
||||
After the configuration is complete, you will see the following prompt. It will take effect after the confirmation of the staff of the agora.
|
||||
|
||||

|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
sidebar_position: 99
|
||||
title: SDK设计文档
|
||||
title: SDK design document
|
||||
draft: true
|
||||
---
|
||||
|
||||
## 基本路径
|
||||
## base path
|
||||
|
||||
用户基本操作路径是: 加入房间 —— 监听变更/推送本地媒体流 —— 离开房间这样完整的生命周期。
|
||||
The user's basic operation path is: join the room - monitor changes/push local media streams - leave the complete life cycle of the room.
|
||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 214 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 296 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 138 KiB |
@ -1,36 +1,35 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: 概述
|
||||
title: Summary
|
||||
---
|
||||
|
||||
`Tailchat` 提供两套方案用于视频语音通话,可以根据实际情况自行选择:
|
||||
- `tailchat-meeting` 自部署视频会议(WIP)
|
||||
- `agora` 声网集成, 详细说明见: [声网插件部署指南](./agora.md)
|
||||
`Tailchat` provides two solutions for video and voice calls, you can choose according to the actual situation:
|
||||
- `tailchat-meeting` self-deploying video conferencing (WIP)
|
||||
- `agora` Acoustic Network integration, for details, see: [Acoustic Network Plug-in Deployment Guide](./agora.md)
|
||||
|
||||
## Tailchat Meeting
|
||||
|
||||
视频会议模块是 `Tailchat` 系列的一套重要组成部分。提供能力如下:
|
||||
- 语音通信
|
||||
- 视频会话
|
||||
- 屏幕共享
|
||||
- 虚拟背景
|
||||
- 文件传输
|
||||
- 聊天记录
|
||||
The video conferencing module is an important part of the suite of `Tailchat` series. Capabilities are provided as follows:
|
||||
- Voice communication
|
||||
- Video session
|
||||
- screen sharing
|
||||
- virtual background
|
||||
- file transfer
|
||||
- chat record
|
||||
|
||||
同时 `tailchat-meeting` 还可以作为独立单品存在,无需登录即可快速发起/加入会议
|
||||
At the same time, `tailchat-meeting` can also exist as an independent product, and you can quickly initiate/join meetings without logging in
|
||||
|
||||
### 项目仓库
|
||||
### Project repository
|
||||
|
||||
- 开源地址: [https://github.com/msgbyte/tailchat-meeting](https://github.com/msgbyte/tailchat-meeting)
|
||||
- 开源协议: GPL-3.0
|
||||
- Open source address: [https://github.com/msgbyte/tailchat-meeting](https://github.com/msgbyte/tailchat-meeting)
|
||||
- Open source agreement: Apache 2.0
|
||||
|
||||
:::info 开源声明
|
||||
本项目基于 [edumeet](https://github.com/edumeet/edumeet) 和 [mediasoup](https://github.com/versatica/mediasoup) 进行二次开发而来。
|
||||
:::info Open source statement
|
||||
This project is based on secondary development of [edumeet](https://github.com/edumeet/edumeet) and [mediasoup](https://github.com/versatica/mediasoup).
|
||||
|
||||
在此基础上进行了功能追加与SDK实现以及代码优化。如果想要找到开源协议更加宽松(MIT + ISC 协议)的实现可以看一下这两个项目
|
||||
On this basis, function addition, SDK implementation and code optimization were carried out. If you want to find a looser implementation of the open source protocol (MIT + ISC protocol), you can take a look at these two projects
|
||||
:::
|
||||
|
||||
|
||||
### 项目架构
|
||||
### Project Architecture
|
||||
|
||||

|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
title: 插件部署
|
||||
title: Plugin deployment
|
||||
---
|
||||
|
||||
TODO
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "开发插件",
|
||||
"label": "Develop plugins",
|
||||
"position": 70
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "API 接口",
|
||||
"label": "API Interface",
|
||||
"position": 99
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
title: 全局CSS变量
|
||||
title: Global CSS Variables
|
||||
---
|
||||
|
||||
- `--tc-primary-color`: 主色调
|
||||
- `--tc-background-image`: 背景图片
|
||||
- `--tc-content-background-image`: 内容页背景图片
|
||||
- `--tc-content-background-image-opacity`: 内容页背景图片透明度,默认 **0.15**
|
||||
- `--tc-primary-color`: primary color
|
||||
- `--tc-background-image`: background image
|
||||
- `--tc-content-background-image`: content page background image
|
||||
- `--tc-content-background-image-opacity`: content page background image opacity, default **0.15**
|
||||
|
@ -1,20 +1,20 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
title: Icon 图标
|
||||
title: Icon
|
||||
---
|
||||
|
||||
```ts
|
||||
import { Icon } from '@capital/component';
|
||||
```
|
||||
|
||||
`tailchat` 的 icon 解决方案来自 `iconify`
|
||||
The icon solution for `tailchat` comes from `iconify`
|
||||
|
||||
使用方法很简单:
|
||||
- 在下述网站中选择想要的图标: [https://icon-sets.iconify.design/](https://icon-sets.iconify.design/)
|
||||
- 复制选中的key。传给 `Icon` 组件, 示例:
|
||||
The way of use is very simple:
|
||||
- Select the desired icon from the following website: [https://icon-sets.iconify.design/](https://icon-sets.iconify.design/)
|
||||
- Duplicate the selected key. Pass to `Icon` component, example:
|
||||
```tsx
|
||||
<Icon icon="mdi:account" />
|
||||
```
|
||||
|
||||
推荐使用`mdi`来统一化图标视觉设计:
|
||||
It is recommended to use `mdi` to unify icon visual design:
|
||||
[https://icon-sets.iconify.design/mdi/](https://icon-sets.iconify.design/mdi/)
|
||||
|
@ -1,59 +1,60 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: 开始开发插件
|
||||
title: Start developing plugins
|
||||
---
|
||||
|
||||
## 认识 MiniStar
|
||||
## Learn MiniStar
|
||||
|
||||
`MiniStar` 是一套完整的微内核架构开发工具链,`tailchat`的插件架构就是基于 `MiniStar` 进行开发。
|
||||
`MiniStar` is a complete microkernel architecture development toolchain, and the plugin architecture of `tailchat` is developed based on `MiniStar`.
|
||||
|
||||
关于更多的 `MiniStar` 相关问题可以查看 `MiniStar` 的官方文档: [https://ministar.moonrailgun.com/](https://ministar.moonrailgun.com/)
|
||||
Learn more about `MiniStar`, you can check the official documentation of `MiniStar`: [https://ministar.moonrailgun.com/](https://ministar.moonrailgun.com/)
|
||||
|
||||
## 创建一个基础项目
|
||||
## Create a base project
|
||||
|
||||
首先创建一个基本的 npm 项目, 并全局安装 `MiniStar`
|
||||
First, create a basic npm project and install `MiniStar` globally
|
||||
|
||||
```bash
|
||||
npm install --global mini-star
|
||||
```
|
||||
|
||||
在项目中执行: `ministar createPlugin` 来创建一个基本的插件
|
||||
Execute: `ministar createPlugin` in the project to create a basic plugin
|
||||
|
||||
在项目中执行: `ministar buildPlugin` 来编译插件
|
||||
Execute: `ministar buildPlugin` in the project to compile the plugin
|
||||
|
||||
> 值得一提的是, 虽然 `Tailchat` 并没有强制规定插件命名规范,但是还是推荐使用 `反域名` 的命名方式(类似于java中的包命名), 然后对插件中的部件,使用 `/` 进行分割
|
||||
> It is worth mentioning that although `Tailchat` does not enforce the naming convention of plugins, it is still recommended to use `anti-domain name` naming method (similar to package naming in java), and then use `/` for the components in the plugin to split
|
||||
>
|
||||
> 如:
|
||||
> 插件名: `com.msgbyte.webview`
|
||||
> such as:
|
||||
>
|
||||
> 注册内容: `com.msgbyte.webview/grouppanel`
|
||||
> Plugin name: `com.msgbyte.webview`
|
||||
>
|
||||
> Registration content: `com.msgbyte.webview/grouppanel`
|
||||
|
||||
## 安装插件
|
||||
## Install Plugin
|
||||
|
||||
### 手动安装插件
|
||||
### Manually install plugin
|
||||
|
||||
在不经过任何预设的情况下,一个通用的办法是自己构造一个 `manifest` 配置, 然后在 `tailchat` 提供手动安装插件 Tab 中将配置文件粘贴进去安装。
|
||||
Without any presets, a general method is to construct a `manifest` configuration by yourself, and then paste the configuration file into the tab of `tailchat` to provide manual installation plug-ins for installation.
|
||||
|
||||
插件的url路径可以通过 `oss对象存储服务` / `static-server` 等办法代理
|
||||
The url path of the plugin can be proxied through methods such as `oss object storage service` / `static-server`
|
||||
|
||||
一个作为示例的`manifest.json`配置如下:
|
||||
An example `manifest.json` configuration is as follows:
|
||||
|
||||
```json
|
||||
{
|
||||
"label": "网页面板插件",
|
||||
"label": "Web Panel Plugin",
|
||||
"name": "com.msgbyte.webview",
|
||||
"url": "/plugins/com.msgbyte.webview/index.js",
|
||||
"version": "0.0.0",
|
||||
"author": "msgbyte",
|
||||
"description": "为群组提供创建网页面板的功能",
|
||||
"description": "Provides groups with the ability to create web panels",
|
||||
"requireRestart": false
|
||||
}
|
||||
```
|
||||
|
||||
## 其他有用的资源
|
||||
## other helpful resources
|
||||
|
||||
- 插件化架构内核依赖库 [MiniStar](https://ministar.moonrailgun.com/)
|
||||
- 来自基础项目提供的API: [API 文档](./api/common)
|
||||
- 导出接口源码
|
||||
- Plugin architecture kernel dependency library [MiniStar](https://ministar.moonrailgun.com/)
|
||||
- From the API provided by the base project: [API Documentation](./api/common)
|
||||
- Export interface source code
|
||||
- [@capital/common](https://github.com/msgbyte/tailchat/blob/master/client/web/src/plugin/common/index.ts)
|
||||
- [@capital/component](https://github.com/msgbyte/tailchat/blob/master/client/web/src/plugin/component/index.tsx)
|
||||
|