You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/setup/server/voice.md
+57-6Lines changed: 57 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,23 @@
2
2
3
3
**Currently only WebRTC connections are supported. UDP connections will be dropped**
4
4
5
-
Voice support is left as an optional dependency in {{ project.name }}, which means that it is disabled by default unless you decide to install additional dependencies. {{ project.name }} is designed so that anyone can develop a voice package compatible with the project as long as the implementation adheres to the [WebRTC types]({{ repositories.base_url }}/{{ repositories.voice_types }}). Currently there are two sample implementations which can be used:
6
-
7
-
-[Medooze Implementation]({{ repositories.base_url }}/{{ repositories.voice_medooze }}) - Supports video&audio for guild voice, DM voice, as well as GoLive streams. Only supports Linux & MacOS environments.
8
-
-[Mediasoup Implementation]({{ repositories.base_url }}/{{ repositories.voice_mediasoup }}) - Supports audio only for guild voice, DM voice, and GoLive streams. Supports Windows, Linux, and MacOS environments
5
+
Voice support is left as an optional dependency in {{ project.name }}, which means that it is disabled by default unless you decide to install additional dependencies. {{ project.name }} is designed so that anyone can develop a voice package compatible with the project as long as the implementation adheres to the [WebRTC types]({{ repositories.base_url }}/{{ repositories.voice_types }}). Currently there are three sample implementations which can be used:
6
+
7
+
- (**Recommended**) [Pion Implementation]({{ repositories.base_url }}/{{repositories.voice_pion }}) - Golang SFU which is bridged via IPC to communicate with your voice gateway
8
+
- ✅ Video
9
+
- ✅ Audio
10
+
- ✅ Guild + DM voice
11
+
- ✅ Go Live streams
12
+
-[Medooze Implementation]({{ repositories.base_url }}/{{ repositories.voice_medooze }}) - SFU written in C++ with Node.js native bindings
13
+
- ✅ Video
14
+
- ✅ Audio
15
+
- ✅ Guild + DM voice
16
+
- ✅ Go Live streams
17
+
-[Mediasoup Implementation]({{ repositories.base_url }}/{{ repositories.voice_mediasoup }}) - From the Mediasoup FAQ: "mediasoup launches a set of C++ child processes (media workers) and communicates with them by means of inter-process communication"
18
+
- ❌ Video
19
+
- ✅ Audio
20
+
- ✅ Guild + DM voice
21
+
- ❌ Go Live streams (no video, only audio)
9
22
10
23
## Configuring Voice Gateway
11
24
@@ -18,7 +31,7 @@ WRTC_WS_PORT=3004
18
31
You also have to configure the Voice Gateway endpoint in your database. In table `config` you can set the default region endpoint to your Voice Gateway domain. It is set to `localhost:3004` by default:
You can install one of the provided sample implementations or you can choose to install another third-party one. Installation process will be the same regardless:
58
71
72
+
### Pion implementation installation
73
+
74
+
1. First install the package in your {{ project.name }} server:
2. Configure the package name in your {{ project.name }} server `.env`:
81
+
82
+
```
83
+
WRTC_LIBRARY={{ npm_packages.voice_pion }}
84
+
```
85
+
86
+
3. Download the Golang SFU from [Pion Repository]({{ repositories.base_url }}/{{repositories.voice_pion }})
87
+
4. Make sure you have Golang installed, then start your SFU:
88
+
```
89
+
cd pion-sfu
90
+
go run . -port <udp port> -ip <your server public ip>
91
+
```
92
+
The ip should be a public IP that can be accessed from the internet if this is a production instance. It will be the address that will get sent to the client during the WebRTC connection negotiation
93
+
59
94
### Medooze implementation installation
60
95
61
96
1. First install the package in your {{ project.name }} server:
@@ -78,4 +113,20 @@ You can install one of the provided sample implementations or you can choose to
78
113
79
114
### Mediasoup implementation installation
80
115
81
-
The process is exactly the same as the Medooze installation, just replace the package name in the commands with ` {{ npm_packages.voice_mediasoup }} `
116
+
1. First install the package in your {{ project.name }} server:
2. Configure the package name in your {{ project.name }} server `.env`:
123
+
124
+
```
125
+
WRTC_LIBRARY={{ npm_packages.voice_mediasoup }}
126
+
```
127
+
128
+
3. Configure the public IP for your WebRTC server in your {{ project.name }} server `.env`. This should be a public IP that can be accessed from the internet if this is a production instance. It will be the address that will get sent to the client during the WebRTC connection negotiation:
main: &repo_url https://github.com/spacebarchat/spacebarchat # This gets read by mkdocs without being pre-proccessed by mkdocs-macros, which is why the URL is in full.
19
20
site:
20
21
name: &site_name Spacebar Documentation
21
22
description: &site_description "Documentation for Spacebar: a free open source selfhostable chat, voice and video discord-compatible platform"
22
23
edit_uri: &edit_uri https://github.com/spacebarchat/docs/edit/master/docs/ # This gets read by mkdocs without being pre-proccessed by mkdocs-macros, which is why the URL is in full.
0 commit comments