Skip to content

Commit 2885e7e

Browse files
authored
Merge pull request #3059 from element-hq/fkwp/doc_update
Refactor README.md
2 parents 30b5bcd + 88b862b commit 2885e7e

10 files changed

+295
-126
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ node_modules
44
dist
55
dist-ssr
66
*.local
7+
*.bkp
78
.idea/
89
public/config.json
910
backend/synapse_tmp/*

README.md

Lines changed: 131 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -2,148 +2,143 @@
22

33
[![Chat](https://img.shields.io/matrix/webrtc:matrix.org)](https://matrix.to/#/#webrtc:matrix.org)
44
[![Localazy](https://img.shields.io/endpoint?url=https%3A%2F%2Fconnect.localazy.com%2Fstatus%2Felement-call%2Fdata%3Fcontent%3Dall%26title%3Dlocalazy%26logo%3Dtrue)](https://localazy.com/p/element-call)
5+
[![License](https://img.shields.io/github/license/element-hq/element-call)](LICENSE-AGPL-3.0)
56

6-
Group calls with WebRTC that leverage [Matrix](https://matrix.org) and an
7-
open-source WebRTC toolkit from [LiveKit](https://livekit.io/).
7+
[🎬 Live Demo 🎬](https://call.element.io)
88

9-
For prior version of the Element Call that relied solely on full-mesh logic,
10-
check [`full-mesh`](https://github.com/element-hq/element-call/tree/full-mesh)
11-
branch.
9+
The world's first 🌐 decentralized and 🤝 federated video conferencing solution
10+
powered by **the Matrix protocol**.
11+
12+
## 📌 Overview
13+
14+
**Element Call** is a native Matrix video conferencing application developed by
15+
[Element](https://element.io/), designed for **secure**, **scalable**,
16+
**privacy-respecting**, and **decentralized** video and voice calls over the
17+
Matrix protocol. Built on **MatrixRTC**
18+
([MSC4143](https://github.com/matrix-org/matrix-spec-proposals/pull/4143)), it
19+
utilizes
20+
**[MSC4195](https://github.com/hughns/matrix-spec-proposals/blob/hughns/matrixrtc-livekit/proposals/4195-matrixrtc-livekit.md)**
21+
with **[LiveKit](https://livekit.io/)** as its backend.
1222

1323
![A demo of Element Call with six people](demo.jpg)
1424

15-
To try it out, visit our hosted version at
16-
[call.element.io](https://call.element.io). You can also find the latest
17-
development version continuously deployed to
25+
You can find the latest development version continuously deployed to
1826
[call.element.dev](https://call.element.dev/).
1927

20-
## Host it yourself
28+
> [!NOTE]
29+
> For prior version of the Element Call that relied solely on full-mesh logic,
30+
> check [`full-mesh`](https://github.com/element-hq/element-call/tree/full-mesh)
31+
> branch.
2132
22-
Until prebuilt tarballs are available, you'll need to build Element Call from
23-
source. First, clone and install the package:
33+
## ✨ Key Features
2434

25-
```sh
26-
git clone https://github.com/element-hq/element-call.git
27-
cd element-call
28-
yarn
29-
yarn build
30-
```
35+
**Decentralized & Federated** – No central authority; works across Matrix
36+
homeservers.
37+
**End-to-End Encrypted** – Secure and private calls.
38+
**Standalone & Widget Mode** – Use as an independent app or embed in Matrix
39+
clients.
40+
**WebRTC-based** – No additional software required.
41+
**Scalable with LiveKit** – Supports large meetings via SFU
42+
([MSC4195: MatrixRTC using LiveKit backend](https://github.com/hughns/matrix-spec-proposals/blob/hughns/matrixrtc-livekit/proposals/4195-matrixrtc-livekit.md)).
43+
**Raise Hand** – Participants can signal when they want to speak, helping to
44+
organize the flow of the meeting.
45+
**Emoji Reactions** – Users can react with emojis 👍️ 🎉 👏 🤘, adding
46+
engagement and interactivity to the conversation.
3147

32-
If all went well, you can now find the build output under `dist` as a series of
33-
static files. These can be hosted using any web server that can be configured
34-
with custom routes (see below).
48+
## 🚀 Deployment Options
3549

36-
You also need to add a configuration file which goes in `public/config.json` -
37-
you can use the sample as a starting point:
50+
Element Call can be packaged in two ways:
3851

39-
```sh
40-
cp config/config.sample.json public/config.json
41-
# edit public/config.json
42-
```
52+
**Full Package** – Supports both **Standalone** and **Widget** mode. Hosted as
53+
a static web page and accessed via a URL when used as a widget.
4354

44-
The sample needs editing to contain the homeserver and LiveKit backend that you
45-
are using.
46-
47-
Because Element Call uses client-side routing, your server must be able to route
48-
any requests to non-existing paths back to `/index.html`. For example, in Nginx
49-
you can achieve this with the `try_files` directive:
50-
51-
```jsonc
52-
server {
53-
...
54-
location / {
55-
...
56-
try_files $uri /$uri /index.html;
57-
}
58-
}
59-
```
55+
**Embedded Package** – 🚧 **Coming [Soon](https://github.com/element-hq/element-call/issues/2994):** Designed for **Widget mode** only. Bundled with a
56+
messenger app for seamless integration. This is the recommended method for
57+
embedding Element Call into a messenger app.
6058

61-
Element Call requires a homeserver with registration enabled without any 3pid or
62-
token requirements, if you want it to be used by unregistered users.
63-
Furthermore, it is not recommended to use it with an existing homeserver where
64-
user accounts have joined normal rooms, as it may not be able to handle those
65-
yet and it may behave unreliably.
66-
67-
Therefore, to use a self-hosted homeserver, this is recommended to be a new
68-
server where any user account created has not joined any normal rooms anywhere
69-
in the Matrix federated network. The homeserver used can be setup to disable
70-
federation, so as to prevent spam registrations (if you keep registrations open)
71-
and to ensure Element Call continues to work in case any user decides to log in
72-
to their Element Call account using the standard Element app and joins normal
73-
rooms that Element Call cannot handle.
74-
75-
## Configuration
76-
77-
There are currently two different config files. `.env` holds variables that are
78-
used at build time, while `public/config.json` holds variables that are used at
79-
runtime. Documentation and default values for `public/config.json` can be found
80-
in [ConfigOptions.ts](src/config/ConfigOptions.ts).
81-
82-
If you're using [Synapse](https://github.com/element-hq/synapse/), you'll need
83-
to additionally add the following to `homeserver.yaml` or Element Call won't
84-
work:
85-
86-
```yaml
87-
experimental_features:
88-
# MSC3266: Room summary API. Used for knocking over federation
89-
msc3266_enabled: true
90-
# MSC4222 needed for syncv2 state_after. This allow clients to
91-
# correctly track the state of the room.
92-
msc4222_enabled: true
93-
94-
# The maximum allowed duration by which sent events can be delayed, as
95-
# per MSC4140.
96-
max_event_delay_duration: 24h
97-
98-
rc_message:
99-
# This needs to match at least the heart-beat frequency plus a bit of headroom
100-
# Currently the heart-beat is every 5 seconds which translates into a rate of 0.2s
101-
per_second: 0.5
102-
burst_count: 30
103-
```
59+
### Standalone mode
60+
61+
![Element Call in Standalone Mode](./docs/element_call_standalone.drawio.png)
62+
63+
In Standalone mode Element Call operates as an independent, full-featured video
64+
conferencing web application, allowing users to join or host calls without
65+
requiring a separate Matrix client.
66+
67+
### Widget mode embedded in Messenger Apps
68+
69+
![Element Call in Widget Mode](./docs/element_call_widget.drawio.png)
70+
71+
Element Call can be embedded as a widget inside apps like
72+
[**Element Web**](https://github.com/element-hq/element-web) or **Element X
73+
([iOS](https://github.com/element-hq/element-x-ios),
74+
[Android](https://github.com/element-hq/element-x-android))**, bringing
75+
**MatrixRTC** capabilities to messenger apps for seamless decentralized video
76+
and voice calls within Matrix rooms.
10477

105-
MSC3266 allows to request a room summary of rooms you are not joined. The
106-
summary contains the room join rules. We need that to decide if the user gets
107-
prompted with the option to knock ("Request to join call"), a cannot join error or the
108-
join view.
78+
> [!IMPORTANT]
79+
> Embedded packaging is recommended for Element Call in widget mode!
10980
110-
MSC4222 allow clients to opt-in to a change of the sync v2 API that allows them
111-
to correctly track the state of the room. This is required by Element Call to
112-
track room state reliably.
81+
## 🛠️ Self-Hosting
11382

114-
Element Call requires a Livekit SFU alongside a [Livekit JWT
115-
service](https://github.com/element-hq/lk-jwt-service) to work. The url to the
116-
Livekit JWT service can either be configured in the config of Element Call
117-
(fallback/legacy configuration) or be configured by your homeserver via the
118-
`.well-known/matrix/client`. This is the recommended method.
83+
For operating and deploying Element Call on your own server, refer to the
84+
[**Self-Hosting Guide**](./docs/self-hosting.md).
11985

120-
The configuration is a list of Foci configs:
86+
## 🧭 MatrixRTC Backend Discovery and Selection
87+
88+
For proper Element Call operation each site deployment needs a MatrixRTC backend
89+
setup as outlined in the [Self-Hosting](#self-hosting). A typical federated site
90+
deployment for three different sites A, B and C is depicted below.
91+
92+
![Element Call federated setup](./docs/Federated_Setup.drawio.png)
93+
94+
### Backend Discovery
95+
96+
MatrixRTC backend (according to
97+
[MSC4143](https://github.com/matrix-org/matrix-spec-proposals/pull/4143))
98+
is announced by the homeserver's `.well-known/matrix/client` file and discovered
99+
via the `org.matrix.msc4143.rtc_foci` key, e.g.:
121100

122101
```json
123102
"org.matrix.msc4143.rtc_foci": [
124103
{
125104
"type": "livekit",
126105
"livekit_service_url": "https://someurl.com"
127106
},
128-
{
129-
"type": "livekit",
130-
"livekit_service_url": "https://livekit2.com"
131-
},
132-
{
133-
"type": "another_foci",
134-
"props_for_another_foci": "val"
135-
},
136107
]
137108
```
138109

139-
## Translation
110+
where the format for MatrixRTC using LiveKit backend is defined in
111+
[MSC4195](https://github.com/hughns/matrix-spec-proposals/blob/hughns/matrixrtc-livekit/proposals/4195-matrixrtc-livekit.md).
112+
In the example above Matrix clients do discover a focus of type `livekit` which
113+
points them to a Matrix LiveKit JWT Auth Service via `livekit_service_url`.
114+
115+
### Backend Selection
116+
117+
- Each call participant proposes their discovered MatrixRTC backend from
118+
`org.matrix.msc4143.rtc_foci` in their `org.matrix.msc3401.call.member` state event.
119+
- For **LiveKit** MatrixRTC backend
120+
([MSC4195](https://github.com/hughns/matrix-spec-proposals/blob/hughns/matrixrtc-livekit/proposals/4195-matrixrtc-livekit.md)),
121+
the **first participant who joined the call** defines via the `foci_preferred`
122+
key in their `org.matrix.msc3401.call.member` which actual MatrixRTC backend
123+
will be used for this call.
124+
- During the actual call join flow, the **LiveKit JWT Auth Service** provides
125+
the client with the **LiveKit SFU WebSocket URL** and an **access JWT token**
126+
in order to exchange media via WebRTC.
127+
128+
The example below illustrates how backend selection works across **Matrix
129+
federation**, using the setup from sites A, B, and C. It demonstrates backend
130+
selection for **Matrix rooms 123 and 456**, which include users from different
131+
homeservers.
132+
![Element Call SFU selection over Matrix federation](./docs/SFU_selection.drawio.png)
133+
134+
## 🌍 Translation
140135

141136
If you'd like to help translate Element Call, head over to
142137
[Localazy](https://localazy.com/p/element-call). You're also encouraged to join
143138
the [Element Translators](https://matrix.to/#/#translators:element.io) space to
144139
discuss and coordinate translation efforts.
145140

146-
## Development
141+
## 🛠️ Development
147142

148143
### Frontend
149144

@@ -155,13 +150,15 @@ cd element-call
155150
yarn
156151
```
157152

158-
To use it, create a local config by, e.g., `cp ./config/config.devenv.json ./public/config.json`
159-
and adapt it if necessary. The `config.devenv.json` config should work with the backend
160-
development environment as outlined in the next section out of box.
153+
To use it, create a local config by, e.g.,
154+
`cp ./config/config.devenv.json ./public/config.json` and adapt it if necessary.
155+
The `config.devenv.json` config should work with the backend development
156+
environment as outlined in the next section out of box.
161157

162-
(Be aware, that this `config.devenv.json` is exposing a deprecated fallback
163-
LiveKit config key. If the homeserver advertises SFU backend via
164-
`.well-known/matrix/client` this has precedence.)
158+
> [!NOTE]
159+
> Be aware, that this `config.devenv.json` is exposing a deprecated fallback
160+
> LiveKit config key. If the homeserver advertises SFU backend via
161+
> `.well-known/matrix/client` this has precedence.
165162
166163
You're now ready to launch the development server:
167164

@@ -200,7 +197,8 @@ yarn backend
200197

201198
To add a new translation key you can do these steps:
202199

203-
1. Add the new key entry to the code where the new key is used: `t("some_new_key")`
200+
1. Add the new key entry to the code where the new key is used:
201+
`t("some_new_key")`
204202
1. Run `yarn i18n` to extract the new key and update the translation files. This
205203
will add a skeleton entry to the `locales/en/app.json` file:
206204

@@ -212,30 +210,38 @@ To add a new translation key you can do these steps:
212210
}
213211
```
214212

215-
1. Update the skeleton entry in the `locales/en/app.json` file with
216-
the English translation:
213+
1. Update the skeleton entry in the `locales/en/app.json` file with the English
214+
translation:
217215

218-
```jsonc
216+
```jsonc
219217
{
220218
...
221219
"some_new_key": "Some new key",
222220
...
223221
}
224-
```
222+
```
225223

226-
## Documentation
224+
## 📖 Documentation
227225

228226
Usage and other technical details about the project can be found here:
229227

230228
[**Docs**](./docs/README.md)
231229

232-
## Copyright & License
230+
## 📝 Copyright & License
233231

234232
Copyright 2021-2025 New Vector Ltd
235233

236-
This software is dual-licensed by New Vector Ltd (Element). It can be used either:
234+
This software is dual-licensed by New Vector Ltd (Element). It can be used
235+
either:
237236

238-
(1) for free under the terms of the GNU Affero General Public License (as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version); OR
237+
(1) for free under the terms of the GNU Affero General Public License (as
238+
published by the Free Software Foundation, either version 3 of the License, or
239+
(at your option) any later version); OR
239240

240-
(2) under the terms of a paid-for Element Commercial License agreement between you and Element (the terms of which may vary depending on what you and Element have agreed to).
241-
Unless required by applicable law or agreed to in writing, software distributed under the Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses.
241+
(2) under the terms of a paid-for Element Commercial License agreement between
242+
you and Element (the terms of which may vary depending on what you and Element
243+
have agreed to). Unless required by applicable law or agreed to in writing,
244+
software distributed under the Licenses is distributed on an "AS IS" BASIS,
245+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
246+
Licenses for the specific language governing permissions and limitations under
247+
the Licenses.

docs/Federated_Setup.drawio.png

85.6 KB
Loading

docs/MSC4195_setup.drawio.png

49.1 KB
Loading

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ This folder contains documentation for Element Call setup and usage.
55
- [Embedded vs standalone mode](./embedded-standalone.md)
66
- [Url format and parameters](./url-params.md)
77
- [Global JS controls](./controls.md)
8+
- [Self-Hosting](./self-hosting.md)

docs/SFU_selection.drawio.png

15.1 KB
Loading
909 KB
Loading
867 KB
Loading

docs/embedded-standalone.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Element call is developed using the js-sdk with matroska mode. This means the app can run either as a standalone app directly connected to a homeserver providing login interfaces or it can be used as a widget.
44

5-
As a widget the app only uses the core calling (matrixRTC) parts. The rest (authentication, sending events, getting room state updates about calls) is done by the hosting client.
5+
As a widget the app only uses the core calling (MatrixRTC) parts. The rest (authentication, sending events, getting room state updates about calls) is done by the hosting client.
66
Element Call and the hosting client are connected via the widget api.
77

88
Element call detects that it is run as a widget if a widgetId is defined in the url parameters. If `widgetId` is present element call will try to connect to the client via the widget postMessage api using the parameters provided in [Url Format and parameters

0 commit comments

Comments
 (0)