2020-07-17 13:19:19 +02:00
# Jitsi in Element
2020-04-03 21:25:33 +02:00
2020-07-17 13:19:19 +02:00
Element uses [Jitsi ](https://jitsi.org/ ) for conference calls, which provides options for
2020-04-03 21:25:33 +02:00
self-hosting your own server and supports most major platforms.
1:1 calls, or calls between you and one other person, do not use Jitsi. Instead, those
2020-04-06 22:50:06 +02:00
calls work directly between clients or via TURN servers configured on the respective
homeservers.
2020-04-03 21:25:33 +02:00
There's a number of ways to start a Jitsi call: the easiest way is to click on the
voice or video buttons near the message composer in a room with more than 2 people. This
will add a Jitsi widget which allows anyone in the room to join.
Integration managers (available through the 4 squares in the top right of the room) may
2020-04-06 22:50:06 +02:00
provide their own approaches for adding Jitsi widgets.
2020-04-03 21:25:33 +02:00
2020-07-17 13:19:19 +02:00
## Configuring Element to use your self-hosted Jitsi server
2020-04-03 21:25:33 +02:00
2020-07-17 13:19:19 +02:00
Element will use the Jitsi server that is embedded in the widget, even if it is not the
2020-04-03 21:25:33 +02:00
one you configured. This is because conference calls must be held on a single Jitsi
server and cannot be split over multiple servers.
2020-07-17 13:19:19 +02:00
However, you can configure Element to *start* a conference with your Jitsi server by adding
2020-04-03 21:25:33 +02:00
to your [config ](./config.md ) the following:
```json
{
"jitsi": {
"preferredDomain": "your.jitsi.example.org"
}
}
```
2020-07-17 13:19:19 +02:00
The default is `jitsi.riot.im` (a free service offered by Element), and the demo site for
2020-04-03 21:25:33 +02:00
Jitsi uses `meet.jit.si` (also free).
2020-07-17 13:19:19 +02:00
Once you've applied the config change, refresh Element and press the call button. This
2020-04-03 21:25:33 +02:00
should start a new conference on your Jitsi server.
2020-07-17 13:19:19 +02:00
**Note**: The widget URL will point to a `jitsi.html` page hosted by Element. The Jitsi
2020-04-03 21:25:33 +02:00
domain will appear later in the URL as a configuration parameter.
2020-04-07 00:12:36 +02:00
**Hint**: If you want everyone on your homeserver to use the same Jitsi server by
2020-04-21 21:27:05 +02:00
default, and you are using riot-web 1.6 or newer, set the following on your homeserver's
`/.well-known/matrix/client` config:
2020-04-07 00:12:36 +02:00
```json
{
"im.vector.riot.jitsi": {
"preferredDomain": "your.jitsi.example.org"
}
}
```
2020-08-13 19:09:36 +02:00
## Element Android
2020-08-19 19:18:50 +02:00
Element Android (1.0.5+) supports custom Jitsi domains, similar to Element Web above.
2020-08-13 19:09:36 +02:00
1:1 calls, or calls between you and one other person, do not use Jitsi. Instead, those
calls work directly between clients or via TURN servers configured on the respective
homeservers.
2020-08-19 19:18:50 +02:00
For rooms with more than 2 joined members, when creating a Jitsi conference via call/video buttons of the toolbar (not via integration manager), Element Android will create a widget using the [wrapper ](https://github.com/vector-im/element-web/blob/develop/docs/jitsi-dev.md ) hosted on `app.element.io` .
The domain used is the one specified by the `/.well-known/matrix/client` endpoint, and if not present it uses the fallback defined in `config.xml` (jitsi.riot.im)
2020-08-13 19:09:36 +02:00
2020-08-19 19:18:50 +02:00
For active Jitsi widgets in the room, a native Jitsi widget UI is created and points to the instance specified in the `domain` key of the widget content data.
2020-08-13 19:09:36 +02:00
2020-08-19 19:18:50 +02:00
Element Android manages allowed native widgets permissions a bit differently than web widgets (as the data shared are different and never shared with the widget URL). For Jitsi widgets, permissions are requested only once per domain (consent saved in account data).
2020-08-13 19:09:36 +02:00
2020-08-19 19:18:50 +02:00
## Element iOS
2020-04-03 21:25:33 +02:00
2020-07-17 13:19:19 +02:00
Currently the Element mobile apps do not support custom Jitsi servers and will instead
2020-04-03 21:25:33 +02:00
use the default `jitsi.riot.im` server. When users on the mobile apps join the call,
they will be joining a different conference which has the same name, but not the same
2020-04-06 22:50:06 +02:00
participants. This is a known bug and which needs to be fixed.