docs: add livekit deployment document
@ -1,4 +1,4 @@
 | 
			
		||||
{
 | 
			
		||||
  "label": "Video Conference",
 | 
			
		||||
  "position": 60
 | 
			
		||||
  "position": 35
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,9 +0,0 @@
 | 
			
		||||
---
 | 
			
		||||
sidebar_position: 99
 | 
			
		||||
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.
 | 
			
		||||
@ -0,0 +1,73 @@
 | 
			
		||||
---
 | 
			
		||||
sidebar_position: 20
 | 
			
		||||
title: Livekit Plugin Deployment Guide
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
`Livekit` is an open source video conferencing solution based on the `Apache-2.0` open source protocol, allowing self-host, supporting video conferencing, live streaming, recording and other scenarios
 | 
			
		||||
 | 
			
		||||
You can use his cloud service or self-host. Below I will introduce how to integrate `Livekit` into `Tailchat`:
 | 
			
		||||
 | 
			
		||||
## Cloud Services
 | 
			
		||||
 | 
			
		||||
First enter the Livekit cloud platform: [https://cloud.livekit.io/](https://cloud.livekit.io/), in the first time you enter, you need to create a project:
 | 
			
		||||
 | 
			
		||||
It will ask some questions, just answer them according to the situation.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
After completion, we will enter the console main dashboard:
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
### Get the required environment variables
 | 
			
		||||
 | 
			
		||||
For the plugin to work, we need the following environment variables:
 | 
			
		||||
 | 
			
		||||
- `LIVEKIT_URL`
 | 
			
		||||
- `LIVEKIT_API_KEY`
 | 
			
		||||
- `LIVEKIT_API_SECRET`
 | 
			
		||||
 | 
			
		||||
Among them, `LIVEKIT_URL` can be obtained directly from the console, in the form of `wss://********.livekit.cloud`
 | 
			
		||||
 | 
			
		||||
In the `Settings` menu on the left, we need to create a pair of secret keys by ourselves
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
Here we can get `LIVEKIT_API_KEY` and `LIVEKIT_API_SECRET`.
 | 
			
		||||
 | 
			
		||||
Record and fill in the environment variables and start `Tailchat`.
 | 
			
		||||
 | 
			
		||||
### Start the webhook
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
If you need the above-mentioned channel online prompts to be updated immediately, you need to start a `webhook-receiver` separately to accept pushes from `livekit` and forward the received events to `Tailchat`, so that `Tailchat` can update all groups Display of group membership.
 | 
			
		||||
 | 
			
		||||
The official `docker-compose` configuration has been prepared for you with one click, just like `admin`:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker/livekit.yml
 | 
			
		||||
docker compose -f docker-compose.yml -f livekit.yml up -d
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
At this point you can see a `tailchat-livekit-webhook-receiver` service in the docker running container.
 | 
			
		||||
 | 
			
		||||
Then we switch to the `livekit` console and add our address in the `webhook`.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
Generally `https://<your tailchat url>/livekit/webhook`, remember to choose the same key pair as the service
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
> PS: There may be some delays in cloud applications.
 | 
			
		||||
 | 
			
		||||
## Self-host
 | 
			
		||||
 | 
			
		||||
See the official documentation for self-host: [https://docs.livekit.io/oss/deployment/](https://docs.livekit.io/oss/deployment/)
 | 
			
		||||
 | 
			
		||||
In addition to the different deployment methods and configuration first, others are the same as using cloud services
 | 
			
		||||
@ -1,6 +0,0 @@
 | 
			
		||||
---
 | 
			
		||||
sidebar_position: 3
 | 
			
		||||
title: Plugin deployment
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
TODO
 | 
			
		||||
@ -1,6 +0,0 @@
 | 
			
		||||
---
 | 
			
		||||
sidebar_position: 4
 | 
			
		||||
title: SDK
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
TODO
 | 
			
		||||
@ -1,4 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "label": "视频会议",
 | 
			
		||||
  "position": 60
 | 
			
		||||
}
 | 
			
		||||
@ -1,9 +0,0 @@
 | 
			
		||||
---
 | 
			
		||||
sidebar_position: 99
 | 
			
		||||
title: SDK设计文档
 | 
			
		||||
draft: true
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
## 基本路径
 | 
			
		||||
 | 
			
		||||
用户基本操作路径是: 加入房间 —— 监听变更/推送本地媒体流 —— 离开房间这样完整的生命周期。
 | 
			
		||||
@ -0,0 +1,73 @@
 | 
			
		||||
---
 | 
			
		||||
sidebar_position: 20
 | 
			
		||||
title: Livekit 插件部署指南
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
`Livekit` 是一款基于 `Apache-2.0` 开源协议的,允许自部署的开源视频会议解决方案,支持视频会议、视频直播、录制等场景
 | 
			
		||||
 | 
			
		||||
你可以使用他的云端服务或者自部署。以下我会介绍怎么将 `Livekit` 集成到 `Tailchat` 中:
 | 
			
		||||
 | 
			
		||||
## 云端服务
 | 
			
		||||
 | 
			
		||||
首先进入Livekit云平台: [https://cloud.livekit.io/](https://cloud.livekit.io/), 首次进入要创建一下项目:
 | 
			
		||||
 | 
			
		||||
此时会问一些问题,按照情况随便回答一下就行
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
完成后我们会进入控制台主界面:
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
### 获取需要的环境变量
 | 
			
		||||
 | 
			
		||||
为使插件工作,我们需要以下环境变量:
 | 
			
		||||
 | 
			
		||||
- `LIVEKIT_URL`
 | 
			
		||||
- `LIVEKIT_API_KEY`
 | 
			
		||||
- `LIVEKIT_API_SECRET`
 | 
			
		||||
 | 
			
		||||
其中 `LIVEKIT_URL` 我们可以直接从控制台上获取,形如 `wss://********.livekit.cloud`
 | 
			
		||||
 | 
			
		||||
在左边 `Settings` 菜单中,我们需要自行创建一对秘钥
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
在这里我们可以获取到 `LIVEKIT_API_KEY` 和 `LIVEKIT_API_SECRET`.
 | 
			
		||||
 | 
			
		||||
记录下来填入环境变量后启动 `Tailchat` 即可.
 | 
			
		||||
 | 
			
		||||
### 启动 webhook
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
如果你需要上述的频道在线提示能够即时更新,则需要单独启动一个 `webhook-receiver` 来接受来自 `livekit` 的推送并将接收到的事件转发给 `Tailchat`,让 `Tailchat` 来更新所有群组成员的显示。
 | 
			
		||||
 | 
			
		||||
官方已为您准备好了一键启动的`docker-compose`配置, 就像 `admin` 一样:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker/livekit.yml 
 | 
			
		||||
docker compose -f docker-compose.yml -f livekit.yml up -d 
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
此时你可以在docker运行的容器中看到一个 `tailchat-livekit-webhook-receiver` 服务.
 | 
			
		||||
 | 
			
		||||
然后我们切换到 `livekit` 控制台,在 `webhook` 中添加我们的地址。
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
一般为 `https://<your tailchat url>/livekit/webhook`, 记得选择与服务一致的密钥对
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
> PS: 在云端应用可能会有一些延时。
 | 
			
		||||
 | 
			
		||||
## 自部署
 | 
			
		||||
 | 
			
		||||
自部署可见官方文档: [https://docs.livekit.io/oss/deployment/](https://docs.livekit.io/oss/deployment/)
 | 
			
		||||
 | 
			
		||||
除了部署方式不一样与配置为先,其他的与使用云端服务一样
 | 
			
		||||
@ -1,6 +0,0 @@
 | 
			
		||||
---
 | 
			
		||||
sidebar_position: 3
 | 
			
		||||
title: 插件部署
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
TODO
 | 
			
		||||
@ -1,6 +0,0 @@
 | 
			
		||||
---
 | 
			
		||||
sidebar_position: 4
 | 
			
		||||
title: SDK
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
TODO
 | 
			
		||||
| 
		 After Width: | Height: | Size: 44 KiB  | 
| 
		 After Width: | Height: | Size: 81 KiB  | 
| 
		 After Width: | Height: | Size: 37 KiB  | 
| 
		 After Width: | Height: | Size: 11 KiB  | 
| 
		 After Width: | Height: | Size: 23 KiB  | 
| 
		 After Width: | Height: | Size: 6.9 KiB  | 
| 
		 After Width: | Height: | Size: 96 KiB  | 
| 
		 After Width: | Height: | Size: 38 KiB  |