Skip to content

Commit

Permalink
docs: add livekit deployment document
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Jul 29, 2023
1 parent f29352d commit 559867d
Show file tree
Hide file tree
Showing 23 changed files with 216 additions and 88 deletions.
2 changes: 1 addition & 1 deletion docker/livekit.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.3"

services:
# 后台应用
# livekit webhook receiver
tailchat-livekit-webhook-receiver:
build:
context: ../
Expand Down
2 changes: 1 addition & 1 deletion website/docs/meeting/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Video Conference",
"position": 60
"position": 35
}
4 changes: 4 additions & 0 deletions website/docs/meeting/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ sidebar_position: 2
title: Deploy Tailchat Meeting
---

:::info
The `Tailchat Meeting` solution is currently not integrated with `Tailchat`, if you want to use the video conferencing solution in Tailchat, please choose `agora` or `livekit` solution
:::

The video conferencing service `Tailchat Meeting` can exist as an independent application. In this section, we will describe how to deploy `Tailchat Meeting` independently

The following content is based on the `docker` environment, please ensure that the server has the most basic `docker` environment.
Expand Down
9 changes: 0 additions & 9 deletions website/docs/meeting/design.md

This file was deleted.

52 changes: 32 additions & 20 deletions website/docs/meeting/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,46 @@
sidebar_position: 1
title: Summary
---
`Tailchat` provides two solutions for video and voice calls, you can choose according to the actual situation:
- `tailchat-meeting` self-deploying video conferencing (WIP)

:::info
Video Conference solutions require SSL support, so only websites that support https will work properly
:::

`Tailchat` provides those 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)
- `livekit` Allow self-host solution: [Livekit Plugin Deployment Guide](./livekit.md)

## Tailchat Meeting

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
<details>
<summary>Collapsed content is outdated</summary>

## 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
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

### Project repository
At the same time, `tailchat-meeting` can also exist as an independent product, and you can quickly initiate/join meetings without logging in

- Open source address: [https://github.com/msgbyte/tailchat-meeting](https://github.com/msgbyte/tailchat-meeting)
- Open source agreement: Apache 2.0
### Project repository

:::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).
- Open source address: [https://github.com/msgbyte/tailchat-meeting](https://github.com/msgbyte/tailchat-meeting)
- Open source agreement: Apache 2.0

:::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).

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
:::

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

### Project Architecture
![](/img/architecture/meeting.excalidraw.svg)

![](/img/architecture/meeting.excalidraw.svg)
</details>
73 changes: 73 additions & 0 deletions website/docs/meeting/livekit.md
Original file line number Diff line number Diff line change
@@ -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.

![](/img/advanced-usage/livekit/1.png)

After completion, we will enter the console main dashboard:

![](/img/advanced-usage/livekit/2.png)

### 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

![](/img/advanced-usage/livekit/3.png)

![](/img/advanced-usage/livekit/4.png)

![](/img/advanced-usage/livekit/5.png)

Here we can get `LIVEKIT_API_KEY` and `LIVEKIT_API_SECRET`.

Record and fill in the environment variables and start `Tailchat`.

### Start the webhook

![](/img/advanced-usage/livekit/6.png)

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`.

![](/img/advanced-usage/livekit/7.png)

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

![](/img/advanced-usage/livekit/8.png)

> 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
6 changes: 0 additions & 6 deletions website/docs/meeting/plugin.md

This file was deleted.

6 changes: 0 additions & 6 deletions website/docs/meeting/sdk.md

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ sidebar_position: 2
title: 部署视频会议
---

:::info
`Tailchat Meeting` 方案目前没有与 `Tailchat` 做集成,如果你期望在Tailchat中使用视频会议方案请选择 `agora``livekit` 解决方案
:::

视频会议服务 `Tailchat Meeting` 可以作为一个独立应用单品存在。在本节中将会讲述如何独立部署 `Tailchat Meeting`

以下内容均基于`docker`环境,请确保服务端有 `docker` 最基本程度的环境。
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,42 @@ sidebar_position: 1
title: 概述
---

`Tailchat` 提供两套方案用于视频语音通话,可以根据实际情况自行选择:
- `tailchat-meeting` 自部署视频会议(WIP)
:::info
音视频解决方案需要SSL支持,因此只有支持https的网站才能正常使用
:::

`Tailchat` 提供以下方案用于视频语音通话,可以根据实际情况自行选择:
- ~~`tailchat-meeting` 自研视频会议(WIP)~~
- `agora` 声网集成, 详细说明见: [声网插件部署指南](./agora.md)
- `livekit` 可自部署的解决方案: [Livekit 插件部署指南](./livekit.md)

## Tailchat Meeting

视频会议模块是 `Tailchat` 系列的一套重要组成部分。提供能力如下:
- 语音通信
- 视频会话
- 屏幕共享
- 虚拟背景
- 文件传输
- 聊天记录
<details>
<summary>折叠内容已过时</summary>

视频会议模块是 `Tailchat` 系列的一套重要组成部分。提供能力如下:
- 语音通信
- 视频会话
- 屏幕共享
- 虚拟背景
- 文件传输
- 聊天记录

同时 `tailchat-meeting` 还可以作为独立单品存在,无需登录即可快速发起/加入会议
同时 `tailchat-meeting` 还可以作为独立单品存在,无需登录即可快速发起/加入会议

### 项目仓库
### 项目仓库

- 开源地址: [https://github.com/msgbyte/tailchat-meeting](https://github.com/msgbyte/tailchat-meeting)
- 开源协议: GPL-3.0
- 开源地址: [https://github.com/msgbyte/tailchat-meeting](https://github.com/msgbyte/tailchat-meeting)
- 开源协议: GPL-3.0

:::info 开源声明
本项目基于 [edumeet](https://github.com/edumeet/edumeet)[mediasoup](https://github.com/versatica/mediasoup) 进行二次开发而来。
:::info 开源声明
本项目基于 [edumeet](https://github.com/edumeet/edumeet)[mediasoup](https://github.com/versatica/mediasoup) 进行二次开发而来。

在此基础上进行了功能追加与SDK实现以及代码优化。如果想要找到开源协议更加宽松(MIT + ISC 协议)的实现可以看一下这两个项目
:::
在此基础上进行了功能追加与SDK实现以及代码优化。如果想要找到开源协议更加宽松(MIT + ISC 协议)的实现可以看一下这两个项目
:::


### 项目架构
### 项目架构

![](/img/architecture/meeting.excalidraw.svg)
![](/img/architecture/meeting.excalidraw.svg)
</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
sidebar_position: 20
title: Livekit 插件部署指南
---

`Livekit` 是一款基于 `Apache-2.0` 开源协议的,允许自部署的开源视频会议解决方案,支持视频会议、视频直播、录制等场景

你可以使用他的云端服务或者自部署。以下我会介绍怎么将 `Livekit` 集成到 `Tailchat` 中:

## 云端服务

首先进入Livekit云平台: [https://cloud.livekit.io/](https://cloud.livekit.io/), 首次进入要创建一下项目:

此时会问一些问题,按照情况随便回答一下就行

![](/img/advanced-usage/livekit/1.png)

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

![](/img/advanced-usage/livekit/2.png)

### 获取需要的环境变量

为使插件工作,我们需要以下环境变量:

- `LIVEKIT_URL`
- `LIVEKIT_API_KEY`
- `LIVEKIT_API_SECRET`

其中 `LIVEKIT_URL` 我们可以直接从控制台上获取,形如 `wss://********.livekit.cloud`

在左边 `Settings` 菜单中,我们需要自行创建一对秘钥

![](/img/advanced-usage/livekit/3.png)

![](/img/advanced-usage/livekit/4.png)

![](/img/advanced-usage/livekit/5.png)

在这里我们可以获取到 `LIVEKIT_API_KEY``LIVEKIT_API_SECRET`.

记录下来填入环境变量后启动 `Tailchat` 即可.

### 启动 webhook

![](/img/advanced-usage/livekit/6.png)

如果你需要上述的频道在线提示能够即时更新,则需要单独启动一个 `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` 中添加我们的地址。

![](/img/advanced-usage/livekit/7.png)

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

![](/img/advanced-usage/livekit/8.png)

> PS: 在云端应用可能会有一些延时。
## 自部署

自部署可见官方文档: [https://docs.livekit.io/oss/deployment/](https://docs.livekit.io/oss/deployment/)

除了部署方式不一样与配置为先,其他的与使用云端服务一样

This file was deleted.

This file was deleted.

Binary file added website/static/img/advanced-usage/livekit/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/advanced-usage/livekit/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/advanced-usage/livekit/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/advanced-usage/livekit/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/advanced-usage/livekit/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/advanced-usage/livekit/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/advanced-usage/livekit/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/advanced-usage/livekit/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 559867d

Please sign in to comment.