Compare commits

..
Author SHA1 Message Date
Half-Shot 30a130ac70 fix whoopsie 2025-09-16 14:10:27 +01:00
Half-Shot 82392bf582 Expose livekitConnectionState directly 2025-09-16 12:51:57 +01:00
Half-Shot f072fd2f9c Add tests 2025-09-16 10:46:29 +01:00
Half-Shot c00298f4a5 Update signature 2025-09-16 10:23:06 +01:00
Half-Shot 0721d48c20 Use "unknown" 2025-09-16 10:22:53 +01:00
Half-Shot b16ba52e13 Refactor disconnection handling 2025-09-16 10:20:06 +01:00
54 changed files with 371 additions and 1247 deletions
@@ -44,8 +44,6 @@ jobs:
run: | run: |
if [[ "${VERSION}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then if [[ "${VERSION}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "TAG=latest" >> "$GITHUB_OUTPUT" echo "TAG=latest" >> "$GITHUB_OUTPUT"
elif [[ "${VERSION}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+\-rc\.[0-9]+$ ]]; then
echo "TAG=rc" >> "$GITHUB_OUTPUT"
else else
echo "TAG=other" >> "$GITHUB_OUTPUT" echo "TAG=other" >> "$GITHUB_OUTPUT"
fi fi
@@ -165,8 +163,6 @@ jobs:
run: | run: |
if [[ "${{ needs.versioning.outputs.TAG }}" == "latest" ]]; then if [[ "${{ needs.versioning.outputs.TAG }}" == "latest" ]]; then
echo "ARTIFACT_VERSION=${{ needs.versioning.outputs.UNPREFIXED_VERSION }}" >> "$GITHUB_ENV" echo "ARTIFACT_VERSION=${{ needs.versioning.outputs.UNPREFIXED_VERSION }}" >> "$GITHUB_ENV"
elif [[ "${{ needs.versioning.outputs.TAG }}" == "rc" ]]; then
echo "ARTIFACT_VERSION=${{ needs.versioning.outputs.UNPREFIXED_VERSION }}" >> "$GITHUB_ENV"
else else
echo "ARTIFACT_VERSION=${{ needs.versioning.outputs.UNPREFIXED_VERSION }}-SNAPSHOT" >> "$GITHUB_ENV" echo "ARTIFACT_VERSION=${{ needs.versioning.outputs.UNPREFIXED_VERSION }}-SNAPSHOT" >> "$GITHUB_ENV"
fi fi
-1
View File
@@ -8,7 +8,6 @@ dist-ssr
.idea/ .idea/
public/config.json public/config.json
backend/synapse_tmp/* backend/synapse_tmp/*
backend/synapse_tmp_othersite/*
/coverage /coverage
config.json config.json
+9 -9
View File
@@ -206,22 +206,22 @@ See also:
### Backend ### Backend
A docker compose file `dev-backend-docker-compose.yml` is provided to start the A docker compose file `dev-backend-docker-compose.yml` is provided to start the
whole stack of components which is required for a local development environment whole stack of components which is required for a local development environment:
including federation:
- Minimum Synapse Setup (servernameis: `synapse.m.localhost`, `synapse.othersite.m.localhost`) - Minimum Synapse Setup (servername: `synapse.m.localhost`)
- MatrixRTC Authorization Service (Note requires Federation API and hence a TLS reverse proxy) - MatrixRTC Authorization Service (Note requires Federation API and hence a TLS reverse proxy)
- Minimum LiveKit SFU setup using dev defaults for config - Minimum LiveKit SFU Setup using dev defaults for config
- Redis db for completeness
- Minimum `localhost` Certificate Authority (CA) for Transport Layer Security (TLS) - Minimum `localhost` Certificate Authority (CA) for Transport Layer Security (TLS)
- Hostnames: `m.localhost`, `*.m.localhost`, `*.othersite.m.localhost` - Hostnames: `m.localhost`, `*.m.localhost`
- Add [./backend/dev_tls_local-ca.crt](./backend/dev_tls_local-ca.crt) to your web browsers trusted - Add [./backend/dev_tls_local-ca.crt](./backend/dev_tls_local-ca.crt) to your web browsers trusted
certificates certificates
- Minimum TLS reverse proxy for - Minimum TLS reverse proxy for
- Synapse homeserver: `synapse.m.localhost` and `synapse.othersite.m.localhost` - Synapse homeserver: `synapse.m.localhost`
- MatrixRTC backend: `matrix-rtc.m.localhost` and `matrix-rtc.othersite.m.localhost` - MatrixRTC backend: `matrix-rtc.m.localhost`
- Local Element Call development `call.m.localhost` via `yarn dev --host ` - Local Element Call development `call.m.localhost` via `yarn dev --host `
- Element Web `app.m.localhost` and `app.othersite.m.localhost` - Element Web `app.m.localhost`
- Note certificates will expire on Thr, 20 September 2035 14:27:35 CEST - Note certificates will expire on Thu, 03 May 2035 10:32:02 GMT
These use a test 'secret' published in this repository, so this must be used These use a test 'secret' published in this repository, so this must be used
only for local development and **_never be exposed to the public Internet._** only for local development and **_never be exposed to the public Internet._**
-64
View File
@@ -1,64 +0,0 @@
server_name: "synapse.othersite.m.localhost"
public_baseurl: https://synapse.othersite.m.localhost/
pid_file: /data/homeserver.pid
listeners:
- port: 18008
tls: false
type: http
x_forwarded: true
resources:
- names: [client, federation, openid]
compress: false
database:
name: sqlite3
args:
database: /data/homeserver.db
media_store_path: /data/media_store
signing_key_path: "/data/SERVERNAME.signing.key"
# Due to custom TLS certificate with domains
# - m.localhost, localhost
# - *.m.localhost
# - *.othersite.m.localhost
# we disable certificate verification to allow for federation
# WARNING: DO NOT USE IN PRODUCTION!!!
federation_verify_certificates: false
ip_range_blacklist: []
trusted_key_servers:
- server_name: "synapse.m.localhost"
accept_keys_insecurely: true
experimental_features:
# MSC3266: Room summary API. Used for knocking over federation
msc3266_enabled: true
# MSC4222 needed for syncv2 state_after. This allow clients to
# correctly track the state of the room.
msc4222_enabled: true
# The maximum allowed duration by which sent events can be delayed, as
# per MSC4140. Must be a positive value if set. Defaults to no
# duration (null), which disallows sending delayed events.
max_event_delay_duration: 24h
# Required for Element Call in Single Page Mode due to on-the-fly user registration
enable_registration: true
enable_registration_without_verification: true
report_stats: false
serve_server_wellknown: true
# Ratelimiting settings for client actions (registration, login, messaging).
#
# Each ratelimiting configuration is made of two parameters:
# - per_second: number of requests a client can send per second.
# - burst_count: number of requests a client can send before being throttled.
rc_message:
# This needs to match at least the heart-beat frequency plus a bit of headroom
# Currently the heart-beat is every 5 seconds which translates into a rate of 0.2s
per_second: 0.5
burst_count: 30
+8 -18
View File
@@ -19,18 +19,8 @@ database:
media_store_path: /data/media_store media_store_path: /data/media_store
signing_key_path: "/data/SERVERNAME.signing.key" signing_key_path: "/data/SERVERNAME.signing.key"
# Due to custom TLS certificate with domains
# - m.localhost, localhost
# - *.m.localhost
# - *.othersite.m.localhost
# we disable certificate verification to allow for federation.
# WARNING: DO NOT USE IN PRODUCTION!!!
federation_verify_certificates: false
ip_range_blacklist: []
trusted_key_servers: trusted_key_servers:
- server_name: "synapse.othersite.m.localhost" - server_name: "matrix.org"
accept_keys_insecurely: true
experimental_features: experimental_features:
# MSC3266: Room summary API. Used for knocking over federation # MSC3266: Room summary API. Used for knocking over federation
@@ -44,13 +34,6 @@ experimental_features:
# duration (null), which disallows sending delayed events. # duration (null), which disallows sending delayed events.
max_event_delay_duration: 24h max_event_delay_duration: 24h
# Required for Element Call in Single Page Mode due to on-the-fly user registration
enable_registration: true
enable_registration_without_verification: true
report_stats: false
serve_server_wellknown: true
# Ratelimiting settings for client actions (registration, login, messaging). # Ratelimiting settings for client actions (registration, login, messaging).
# #
# Each ratelimiting configuration is made of two parameters: # Each ratelimiting configuration is made of two parameters:
@@ -62,3 +45,10 @@ rc_message:
# Currently the heart-beat is every 5 seconds which translates into a rate of 0.2s # Currently the heart-beat is every 5 seconds which translates into a rate of 0.2s
per_second: 0.5 per_second: 0.5
burst_count: 30 burst_count: 30
# Required for Element Call in Single Page Mode due to on-the-fly user registration
enable_registration: true
enable_registration_without_verification: true
report_stats: false
serve_server_wellknown: true
-20
View File
@@ -1,20 +0,0 @@
port: 17880
bind_addresses:
- "0.0.0.0"
rtc:
tcp_port: 17881
port_range_start: 50300
port_range_end: 50400
use_external_ip: false
turn:
enabled: false
domain: localhost
cert_file: ""
key_file: ""
tls_port: 5349
udp_port: 443
external_tls: true
keys:
devkey: secret
room:
auto_create: false
+5
View File
@@ -6,6 +6,11 @@ rtc:
port_range_start: 50100 port_range_start: 50100
port_range_end: 50200 port_range_end: 50200
use_external_ip: false use_external_ip: false
#redis:
# address: redis:6379
# username: ""
# password: ""
# db: 0
turn: turn:
enabled: false enabled: false
domain: localhost domain: localhost
+8 -128
View File
@@ -1,5 +1,4 @@
# Synapse reverse proxy including .well-known/matrix/client # Synapse reverse proxy including .well-known/matrix/client
# domain synapse.m.localhost
server { server {
listen 80; listen 80;
listen [::]:80; listen [::]:80;
@@ -27,53 +26,14 @@ server {
# This is also required for development environment. # This is also required for development environment.
# Reason: the lk-jwt-service uses the federation API for the openid token # Reason: the lk-jwt-service uses the federation API for the openid token
# verification, which requires TLS # verification, which requires TLS
location ~ ^(/_matrix|/_synapse/client) { location / {
proxy_pass "http://homeserver:8008"; proxy_pass "http://homeserver:8008";
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
}
error_page 500 502 503 504 /50x.html;
}
# Synapse reverse proxy including .well-known/matrix/client
# domain synapse.othersite.m.localhost
server {
listen 80;
listen [::]:80;
listen 443 ssl;
listen 8448 ssl;
listen [::]:443 ssl;
listen [::]:8448 ssl;
server_name synapse.othersite.m.localhost;
ssl_certificate /root/ssl/cert.pem;
ssl_certificate_key /root/ssl/key.pem;
# well-known config adding rtc_foci backend
# Note well-known is currently not effective due to:
# https://spec.matrix.org/v1.12/client-server-api/#well-known-uri the spec
# says it must be at https://$server_name/... (implied port 443) Hence, we
# currently rely for local development environment on deprecated config.json
# setting for livekit_service_url
location /.well-known/matrix/client {
add_header Access-Control-Allow-Origin *;
return 200 '{"m.homeserver": {"base_url": "https://synapse.othersite.m.localhost"}, "org.matrix.msc4143.rtc_foci": [{"type": "livekit", "livekit_service_url": "https://matrix-rtc.othersite.m.localhost/livekit/jwt"}]}';
default_type application/json;
}
# Reverse proxy for Matrix Synapse Homeserver
# This is also required for development environment.
# Reason: the lk-jwt-service uses the federation API for the openid token
# verification, which requires TLS
location ~ ^(/_matrix|/_synapse/client) {
proxy_pass "http://homeserver-1:18008";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
} }
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
@@ -81,7 +41,6 @@ server {
} }
# MatrixRTC reverse proxy # MatrixRTC reverse proxy
# domain matrix-rtc.m.localhost
# - MatrixRTC Authorization Service # - MatrixRTC Authorization Service
# - LiveKit SFU websocket signaling connection # - LiveKit SFU websocket signaling connection
upstream jwt-auth-services { upstream jwt-auth-services {
@@ -90,14 +49,16 @@ upstream jwt-auth-services {
} }
server { server {
listen 80;
listen [::]:80;
listen 443 ssl; listen 443 ssl;
listen [::]:443 ssl; listen [::]:443 ssl;
listen 8448 ssl;
listen [::]:8448 ssl;
server_name matrix-rtc.m.localhost; server_name matrix-rtc.m.localhost;
ssl_certificate /root/ssl/cert.pem; ssl_certificate /root/ssl/cert.pem;
ssl_certificate_key /root/ssl/key.pem; ssl_certificate_key /root/ssl/key.pem;
http2 on;
location ^~ /livekit/jwt/ { location ^~ /livekit/jwt/ {
@@ -133,54 +94,6 @@ server {
} }
# MatrixRTC reverse proxy
# domain matrix-rtc.othersite.m.localhost
# - MatrixRTC Authorization Service
# - LiveKit SFU websocket signaling connection
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name matrix-rtc.othersite.m.localhost;
ssl_certificate /root/ssl/cert.pem;
ssl_certificate_key /root/ssl/key.pem;
http2 on;
location ^~ /livekit/jwt/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# JWT Service running at port 16080
proxy_pass http://auth-service-1:16080/;
}
location ^~ /livekit/sfu/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_send_timeout 120;
proxy_read_timeout 120;
proxy_buffering off;
proxy_set_header Accept-Encoding gzip;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# LiveKit SFU websocket connection running at port 17880
proxy_pass http://livekit-sfu-1:17880/;
}
error_page 500 502 503 504 /50x.html;
}
# Convenience reverse proxy for the call.m.localhost domain to yarn dev --host # Convenience reverse proxy for the call.m.localhost domain to yarn dev --host
server { server {
listen 80; listen 80;
@@ -246,36 +159,3 @@ server {
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
} }
# Convenience reverse proxy app.othersite.m.localhost for element web
server {
listen 80;
listen [::]:80;
server_name app.othersite.m.localhost;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name app.othersite.m.localhost;
ssl_certificate /root/ssl/cert.pem;
ssl_certificate_key /root/ssl/key.pem;
location ^~ / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://element-web-1:18081;
proxy_ssl_verify off;
}
error_page 500 502 503 504 /50x.html;
}
+17 -17
View File
@@ -1,19 +1,19 @@
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIDGjCCAgKgAwIBAgIUbSbx+1UGptOTGefqEn7Zh3yoChIwDQYJKoZIhvcNAQEL MIIDGjCCAgKgAwIBAgIUGdiFHhH4KL2pqBjMQHQ+PVIkSV8wDQYJKoZIhvcNAQEL
BQAwHjEcMBoGA1UEAwwTRWxlbWVudCBDYWxsIERldiBDQTAeFw0yNTA5MjIxMjI3 BQAwHjEcMBoGA1UEAwwTRWxlbWVudCBDYWxsIERldiBDQTAeFw0yNTA1MDUxMDMy
MzVaFw0zNTA5MjAxMjI3MzVaMB4xHDAaBgNVBAMME0VsZW1lbnQgQ2FsbCBEZXYg MDJaFw0zNTA1MDMxMDMyMDJaMB4xHDAaBgNVBAMME0VsZW1lbnQgQ2FsbCBEZXYg
Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwA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AQB8m2YfFGLugNt5vAAOvNxVqDA8c72yCVYr3CBCpmTIEY5Z
XMakRw92vsyk/iWOnLPNPcpVWzPcvINaCs/bahgnGSOAnrA4jjcXqymyGIy/6xc5 d3qVGhG9//ux6+J8ntkSwd9nV5GJyYXHukCG1VavnAWolWdNF/WAllf0jhLuz7kD
1EeZAxehiL9E5q4LQ841HDX0gps4ZzUO1BRYQcjG9Rdts83JO2ekkfHkZdNj2eQr /cJnuI1By4tBsBmSz851i6HJ4t5k99Be+6GQVzi0e7zzfxTHZE4xP2J6Ox8QbPsP
KOrr92Na1/w+EQdo/T9Rs2ES623xKEOxPqb8d/rx5Z4DdeuGx1u+3AfS76Lpo4ni n0m76nIp/WbWaJqzvIIjJhmUUPPv+4wN+eOArgjiGLzptM2qTtGZtd0c9nS5gvep
EJ0g1ImqdSUtiOLzeCQh6pqqb+vuFbxAyeyYSAJ49847EtFBvZCmWmPL2JICg9uq +mEbSUN9zkhAroZf80wf+hEvy+fJ94VbZ9QjTzTg7odZLrsXGIe8DaG63EYRQ25b
7rKW/qDfEK9GUs0GWCs3+mJkNvOOxBwtMuQrL7ZF W5iYBAreln5fGSt7qHsGfqwZibTEk/Lx3dydO1Kg
-----END CERTIFICATE----- -----END CERTIFICATE-----
+26 -26
View File
@@ -1,28 +1,28 @@
-----BEGIN PRIVATE KEY----- -----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDHODfkrFsOkqCn MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDA2y0hjmNn1vRs
XnTbQWz3LkUtNCoVvM7wFouirRnITJYG+lFwF+zNl89Eaq+uUN4bwd8ml1ZuR9p+ VSdy8IOfo8N1q9UgkhQWpGKXzPh+D5d1fnuJEmHIVwtDEtS/PwQ43LTmegChPtKH
1azCSlklD5adhCR/ErknfUWamQEf6amSs3p0NnqnhXbnDEEbQOwNaPU/aGc6aw0+ 9jdTtG0Iih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Q
AMm56FNB7e1l0b1Fots730RfpCPuXpiAxL4pisS0X1dMVeeM v2z2/aMI/7sAD2Q=
-----END CERTIFICATE----- -----END CERTIFICATE-----
+26 -26
View File
@@ -1,28 +1,28 @@
-----BEGIN PRIVATE KEY----- -----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDK1DNwTQWmyK71 MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCrzGSScSgaQuZd
Ar56NvmSMQ8sqUY3jGqqPVORjfDUtDCrPPdCxT+ZlnsAgdonElWoWqczMrSyBRgf ELGFYiLiYRwrLKyUdNr0rsPcOo0bvbeZ3zQMeUMRNlA69zGFdarumiDRXUoAmZI3
JlZMd4lEvt6VEEiZGUvA/lG1XIVgrx1kMSHKBoJj7lCBN6r3IWmYe6CxgfZurgp+ 9WmH95aX3d+AU7EFnWev7xpWSVhSYj8T0d4rke8HjGk3LpaffJ93tbJuagBIH1ou
7Z22i6cGMOnQ0XduX5Asup6zk5V7AE6i9eKrJsUjYmRBXtk099IitkER4TMqh6Wx uN6AOdzWs8hpRYIomWleEeeuVnnfaMwaXOdc+ihJJ6wzm2hwQSfdpjZPWBDd/DFf
JmFF+eV9P/axfxkon+bQWITwP1PLC1UOTK7lR0EcVan5aY6WMs/6RfO4Gw/dvuiV t1ZXxIZOCjDsrEIiI7uU8iZPLB3QEM/tgxSSAOxrcKvQvxZokk+FD7aMJFP71Ifi
G1jCrVcaKNGTPYqmQqs+MOvyIqJ9kYELRZu+6bhPWSXk2ESpSIUIPH9twfnmWrnc eLCEzMTP1VXatP7UTAKAqB2NyDJ8m3IHbOINiqcdFvFR3R1D9bXOYE4oRynNvYZr
neIJR24/AgMBAAECggEANRp6vzfDN4gKWoaV5TyYegCTNv+4rRl74cd9pjmx6Jam QUGnL2RtAgMBAAECggEAJaFQii8U/KOYt9vXNoMnZvSkaeSQLLhn2V6Kciu1CtWE
uWaUXC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3ITY53qAY4Bx88CByIFuu8CEUdUZprh98jSl6ic1tMinZfUhRMwABLrUD51
+2F0NqQL6Li+xQGibAvDj0Jxyol38RvFC0J/w2vQmuF0hTuH95yknSd7FPXK+DPG DGst8iGLPD9u83iMcUHI/L+p7AbxrKLvWXZrF5UZm440c9mSWqfhPaTBosPtNDsG
qYgXLjun9dht6kx9vGJ69wI= LfETwH1flKXMTXd2xA9RTE4=
-----END PRIVATE KEY----- -----END PRIVATE KEY-----
-1
View File
@@ -34,6 +34,5 @@ subjectAltName = @alt_names
DNS.1 = localhost DNS.1 = localhost
DNS.2 = m.localhost DNS.2 = m.localhost
DNS.3 = *.m.localhost DNS.3 = *.m.localhost
DNS.4 = *.othersite.m.localhost
EOF EOF
) )
-53
View File
@@ -1,53 +0,0 @@
{
"default_server_config": {
"m.homeserver": {
"base_url": "https://synapse.othersite.m.localhost",
"server_name": "synapse.othersite.m.localhost"
}
},
"disable_custom_urls": false,
"disable_guests": false,
"disable_login_language_selector": false,
"disable_3pid_login": false,
"force_verification": false,
"brand": "Element",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_widgets_urls": [
"https://scalar.vector.im/_matrix/integrations/v1",
"https://scalar.vector.im/api",
"https://scalar-staging.vector.im/_matrix/integrations/v1",
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"default_widget_container_height": 280,
"default_country_code": "GB",
"show_labs_settings": false,
"features": {
"feature_element_call_video_rooms": true,
"feature_video_rooms": true,
"feature_group_calls": true,
"feature_release_announcement": false
},
"default_federate": true,
"default_theme": "light",
"room_directory": {
"servers": ["matrix.org"]
},
"enable_presence_by_hs_url": {
"https://matrix.org": false,
"https://matrix-client.matrix.org": false
},
"setting_defaults": {
"breadcrumbs": true,
"feature_group_calls": true
},
"jitsi": {
"preferred_domain": "meet.element.io"
},
"element_call": {
"participant_limit": 8,
"brand": "Element Call"
},
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"
}
@@ -1,81 +0,0 @@
server_name: "synapse.othersite.m.localhost"
public_baseurl: https://synapse.othersite.m.localhost/
pid_file: /data/homeserver.pid
listeners:
- port: 18008
tls: false
type: http
x_forwarded: true
resources:
- names: [client, federation, openid]
compress: false
database:
name: sqlite3
args:
database: /data/homeserver.db
media_store_path: /data/media_store
signing_key_path: "/data/SERVERNAME.signing.key"
# Due to custom TLS certificate with domains
# - m.localhost, localhost
# - *.m.localhost
# - *.othersite.m.localhost
# we disable certificate verification to allow for federation.
# WARNING: DO NOT USE IN PRODUCTION!!!
federation_verify_certificates: false
ip_range_blacklist: []
trusted_key_servers:
- server_name: "synapse.m.localhost"
accept_keys_insecurely: true
experimental_features:
# MSC3266: Room summary API. Used for knocking over federation
msc3266_enabled: true
# MSC4222 needed for syncv2 state_after. This allow clients to
# correctly track the state of the room.
msc4222_enabled: true
# The maximum allowed duration by which sent events can be delayed, as
# per MSC4140. Must be a positive value if set. Defaults to no
# duration (null), which disallows sending delayed events.
max_event_delay_duration: 24h
# Required for Element Call in Single Page Mode due to on-the-fly user registration
enable_registration: true
enable_registration_without_verification: true
report_stats: false
serve_server_wellknown: true
# Ratelimiting settings for client actions (registration, login, messaging).
#
# Each ratelimiting configuration is made of two parameters:
# - per_second: number of requests a client can send per second.
# - burst_count: number of requests a client can send before being throttled.
rc_message:
per_second: 10000
burst_count: 10000
rc_delayed_event_mgmt:
per_second: 10000
burst_count: 10000
rc_login:
address:
per_second: 10000
burst_count: 10000
account:
per_second: 10000
burst_count: 10000
failed_attempts:
per_second: 10000
burst_count: 10000
rc_registration:
per_second: 10000
burst_count: 10000
+8 -22
View File
@@ -19,18 +19,8 @@ database:
media_store_path: /data/media_store media_store_path: /data/media_store
signing_key_path: "/data/SERVERNAME.signing.key" signing_key_path: "/data/SERVERNAME.signing.key"
# Due to custom TLS certificate with domains
# - m.localhost, localhost
# - *.m.localhost
# - *.othersite.m.localhost
# we disable certificate verification to allow for federation.
# WARNING: DO NOT USE IN PRODUCTION!!!
federation_verify_certificates: false
ip_range_blacklist: []
trusted_key_servers: trusted_key_servers:
- server_name: "synapse.othersite.m.localhost" - server_name: "matrix.org"
accept_keys_insecurely: true
experimental_features: experimental_features:
# MSC3266: Room summary API. Used for knocking over federation # MSC3266: Room summary API. Used for knocking over federation
@@ -44,13 +34,6 @@ experimental_features:
# duration (null), which disallows sending delayed events. # duration (null), which disallows sending delayed events.
max_event_delay_duration: 24h max_event_delay_duration: 24h
# Required for Element Call in Single Page Mode due to on-the-fly user registration
enable_registration: true
enable_registration_without_verification: true
report_stats: false
serve_server_wellknown: true
# Ratelimiting settings for client actions (registration, login, messaging). # Ratelimiting settings for client actions (registration, login, messaging).
# #
# Each ratelimiting configuration is made of two parameters: # Each ratelimiting configuration is made of two parameters:
@@ -61,10 +44,6 @@ rc_message:
per_second: 10000 per_second: 10000
burst_count: 10000 burst_count: 10000
rc_delayed_event_mgmt:
per_second: 10000
burst_count: 10000
rc_login: rc_login:
address: address:
per_second: 10000 per_second: 10000
@@ -79,3 +58,10 @@ rc_login:
rc_registration: rc_registration:
per_second: 10000 per_second: 10000
burst_count: 10000 burst_count: 10000
# Required for Element Call in Single Page Mode due to on-the-fly user registration
enable_registration: true
enable_registration_without_verification: true
report_stats: false
serve_server_wellknown: true
+5
View File
@@ -0,0 +1,5 @@
bind 0.0.0.0
protected-mode yes
port 6379
timeout 0
tcp-keepalive 300
+5 -69
View File
@@ -24,28 +24,6 @@ services:
networks: networks:
- ecbackend - ecbackend
auth-service-1:
image: ghcr.io/element-hq/lk-jwt-service:latest-ci
pull_policy: always
hostname: auth-server-1
environment:
- LIVEKIT_JWT_PORT=16080
- LIVEKIT_URL=wss://matrix-rtc.othersite.m.localhost/livekit/sfu
- LIVEKIT_KEY=devkey
- LIVEKIT_SECRET=secret
# If the configured homeserver runs on localhost, it'll probably be using
# a self-signed certificate
- LIVEKIT_INSECURE_SKIP_VERIFY_TLS=YES_I_KNOW_WHAT_I_AM_DOING
- LIVEKIT_FULL_ACCESS_HOMESERVERS=*
deploy:
restart_policy:
condition: on-failure
ports:
# HOST_PORT:CONTAINER_PORT
- 16080:16080
networks:
- ecbackend
livekit: livekit:
image: livekit/livekit-server:latest image: livekit/livekit-server:latest
pull_policy: always pull_policy: always
@@ -66,23 +44,15 @@ services:
networks: networks:
- ecbackend - ecbackend
livekit-1: redis:
image: livekit/livekit-server:latest image: redis:6-alpine
pull_policy: always pull_policy: always
hostname: livekit-sfu-1 command: redis-server /etc/redis.conf
command: --dev --config /etc/livekit.yaml
restart: unless-stopped
# The SFU seems to work far more reliably when we let it share the host
# network rather than opening specific ports (but why?? we're not missing
# any…)
ports: ports:
# HOST_PORT:CONTAINER_PORT # HOST_PORT:CONTAINER_PORT
- 17880:17880/tcp - 6379:6379
- 17881:17881/tcp
- 17882:17882/tcp
- 50300-50400:50300-50400/udp
volumes: volumes:
- ./backend/dev_livekit-othersite.yaml:/etc/livekit.yaml:Z - ./backend/redis.conf:/etc/redis.conf:Z
networks: networks:
- ecbackend - ecbackend
@@ -104,24 +74,6 @@ services:
networks: networks:
- ecbackend - ecbackend
synapse-1:
hostname: homeserver-1
image: docker.io/matrixdotorg/synapse:latest
pull_policy: always
environment:
- SYNAPSE_CONFIG_PATH=/data/cfg/homeserver.yaml
# Needed for rootless podman-compose such that the uid/gid mapping does
# fit local user uid. If the container runs as root (uid 0) it is fine as
# it actually maps to your non-root user on the host (e.g. 1000).
# Otherwise uid mapping will not match your non-root user.
- UID=0
- GID=0
volumes:
- ./backend/synapse_tmp_othersite:/data:Z
- ./backend/dev_homeserver-othersite.yaml:/data/cfg/homeserver.yaml:Z
networks:
- ecbackend
element-web: element-web:
image: ghcr.io/element-hq/element-web:develop image: ghcr.io/element-hq/element-web:develop
pull_policy: always pull_policy: always
@@ -134,19 +86,6 @@ services:
networks: networks:
- ecbackend - ecbackend
element-web-1:
image: ghcr.io/element-hq/element-web:develop
pull_policy: always
volumes:
- ./backend/ew.test.othersite.config.json:/app/config.json:Z
environment:
ELEMENT_WEB_PORT: 18081
ports:
# HOST_PORT:CONTAINER_PORT
- "18081:18081"
networks:
- ecbackend
nginx: nginx:
# see backend/dev_tls_setup for how to generate the tls certs # see backend/dev_tls_setup for how to generate the tls certs
hostname: synapse.m.localhost hostname: synapse.m.localhost
@@ -169,7 +108,4 @@ services:
networks: networks:
ecbackend: ecbackend:
aliases: aliases:
- synapse.m.localhost
- synapse.othersite.m.localhost
- matrix-rtc.m.localhost - matrix-rtc.m.localhost
- matrix-rtc.othersite.m.localhost
@@ -2,6 +2,3 @@ services:
synapse: synapse:
volumes: volumes:
- ./backend/playwright_homeserver.yaml:/data/cfg/homeserver.yaml:Z - ./backend/playwright_homeserver.yaml:/data/cfg/homeserver.yaml:Z
synapse-1:
volumes:
- ./backend/playwright_homeserver-othersite.yaml:/data/cfg/homeserver.yaml:Z
+4 -4
View File
@@ -159,8 +159,8 @@ export const widgetTest = test.extend<MyFixtures>({
} = await registerUser(browser, userB); } = await registerUser(browser, userB);
// Invite the second user // Invite the second user
await ewPage1.getByRole("button", { name: "Add", exact: true }).click(); await ewPage1.getByRole("button", { name: "Add room" }).click();
await ewPage1.getByRole("menuitem", { name: "New Room" }).click(); await ewPage1.getByText("New room").click();
await ewPage1.getByRole("textbox", { name: "Name" }).fill("Welcome Room"); await ewPage1.getByRole("textbox", { name: "Name" }).fill("Welcome Room");
await ewPage1.getByRole("button", { name: "Create room" }).click(); await ewPage1.getByRole("button", { name: "Create room" }).click();
await expect(ewPage1.getByText("You created this room.")).toBeVisible(); await expect(ewPage1.getByText("You created this room.")).toBeVisible();
@@ -184,9 +184,9 @@ export const widgetTest = test.extend<MyFixtures>({
// Accept the invite // Accept the invite
await expect( await expect(
ewPage2.getByRole("option", { name: "Welcome Room" }), ewPage2.getByRole("treeitem", { name: "Welcome Room" }),
).toBeVisible(); ).toBeVisible();
await ewPage2.getByRole("option", { name: "Welcome Room" }).click(); await ewPage2.getByRole("treeitem", { name: "Welcome Room" }).click();
await ewPage2.getByRole("button", { name: "Accept" }).click(); await ewPage2.getByRole("button", { name: "Accept" }).click();
await expect( await expect(
ewPage2.getByRole("main").getByRole("heading", { name: "Welcome Room" }), ewPage2.getByRole("main").getByRole("heading", { name: "Welcome Room" }),
-60
View File
@@ -1,60 +0,0 @@
/*
Copyright 2025 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
import { expect, test } from "@playwright/test";
// Skip test for Firefox, due to page.keyboard.press("Tab") not reliable on headless mode
test.skip(
({ browserName }) => browserName === "firefox",
'This test is not working on firefox, page.keyboard.press("Tab") not reliable in headless mode',
);
test("can only interact with header and footer while reconnecting", async ({
page,
}) => {
await page.goto("/");
await page.getByTestId("home_callName").click();
await page.getByTestId("home_callName").fill("Test call");
await page.getByTestId("home_displayName").click();
await page.getByTestId("home_displayName").fill("Test user");
// If we do not call fastForward here, we end up with Date.now() returning an actual timestamp
// but once we call `await page.clock.fastForward(20000);` later this will reset Date.now() to 0
// and we will never get into probablyDisconnected state?
await page.clock.fastForward(10);
await page.getByTestId("home_go").click();
await expect(page.locator("video")).toBeVisible();
await expect(page.getByTestId("lobby_joinCall")).toBeVisible();
// Join the call
await page.getByTestId("lobby_joinCall").click();
// The media tile for the local user should become visible
await new Promise((resolve) => setTimeout(resolve, 1500));
await expect(page.getByTestId("name_tag")).toContainText("Test user");
// Now disconnect from the internet
await page.route("https://synapse.m.localhost/**/*", async (route) => {
await new Promise((resolve) => setTimeout(resolve, 10000));
await route.continue();
});
await page.clock.fastForward(20000);
await expect(
page.getByRole("dialog", { name: "Reconnecting…" }),
).toBeVisible();
// Tab order should jump directly from header to footer, skipping media tiles
await page.getByRole("button", { name: "Mute microphone" }).focus();
await expect(
page.getByRole("button", { name: "Mute microphone" }),
).toBeFocused();
await page.keyboard.press("Tab");
await expect(page.getByRole("button", { name: "Stop video" })).toBeFocused();
// Most critically, we should be able to press the hangup button
await page.getByRole("button", { name: "End call" }).click();
});
+19 -24
View File
@@ -49,10 +49,7 @@ widgetTest("Start a new call as widget", async ({ asWidget, browserName }) => {
// Check the join indicator on the room list // Check the join indicator on the room list
await expect( await expect(
brooks.page brooks.page.locator("div").filter({ hasText: /^Joined • 1$/ }),
.locator('iframe[title="Element Call"]')
.contentFrame()
.getByRole("button", { name: "End call" }),
).toBeVisible(); ).toBeVisible();
// Join from the other side // Join from the other side
@@ -62,28 +59,26 @@ widgetTest("Start a new call as widget", async ({ asWidget, browserName }) => {
).toBeVisible(); ).toBeVisible();
await whistler.page.getByRole("button", { name: "Join" }).click(); await whistler.page.getByRole("button", { name: "Join" }).click();
// Currently disabled due to recent Element Web is bypassing Lobby await expect(
// await expect( whistler.page
// whistler.page .locator('iframe[title="Element Call"]')
// .locator('iframe[title="Element Call"]') .contentFrame()
// .contentFrame() .getByTestId("lobby_joinCall"),
// .getByTestId("lobby_joinCall"), ).toBeVisible();
// ).toBeVisible();
//
// await whistler.page
// .locator('iframe[title="Element Call"]')
// .contentFrame()
// .getByTestId("lobby_joinCall")
// .click();
// Currrenty disabled due to recent Element Web not indicating the number of participants await whistler.page
// await expect( .locator('iframe[title="Element Call"]')
// whistler.page.locator("div").filter({ hasText: /^Joined • 2$/ }), .contentFrame()
// ).toBeVisible(); .getByTestId("lobby_joinCall")
.click();
// await expect( await expect(
// brooks.page.locator("div").filter({ hasText: /^Joined • 2$/ }), whistler.page.locator("div").filter({ hasText: /^Joined • 2$/ }),
// ).toBeVisible(); ).toBeVisible();
await expect(
brooks.page.locator("div").filter({ hasText: /^Joined • 2$/ }),
).toBeVisible();
// Whistler leaves // Whistler leaves
await whistler.page.waitForTimeout(1000); await whistler.page.waitForTimeout(1000);
-2
View File
@@ -35,8 +35,6 @@ Please see LICENSE in the repository root for full details.
.bg.animate[data-state="closed"] { .bg.animate[data-state="closed"] {
animation: fade-out 130ms; animation: fade-out 130ms;
opacity: 0;
pointer-events: none;
} }
.overlay { .overlay {
+6 -6
View File
@@ -46,11 +46,11 @@ interface Props {
*/ */
Icon?: ComponentType<SVGAttributes<SVGElement>>; Icon?: ComponentType<SVGAttributes<SVGElement>>;
/** /**
* Whether the toast should be modal, making it fill the screen (by portalling * Whether the toast should be portaled into the root of the document (rather
* it into the root of the document) and trap focus until dismissed. * than rendered in-place within the component tree).
* @default true * @default true
*/ */
modal?: boolean; portal?: boolean;
} }
/** /**
@@ -62,7 +62,7 @@ export const Toast: FC<Props> = ({
autoDismiss, autoDismiss,
children, children,
Icon, Icon,
modal = true, portal = true,
}) => { }) => {
const onOpenChange = useCallback( const onOpenChange = useCallback(
(open: boolean) => { (open: boolean) => {
@@ -103,8 +103,8 @@ export const Toast: FC<Props> = ({
); );
return ( return (
<DialogRoot open={open} onOpenChange={onOpenChange} modal={modal}> <DialogRoot open={open} onOpenChange={onOpenChange}>
{modal ? <DialogPortal>{content}</DialogPortal> : content} {portal ? <DialogPortal>{content}</DialogPortal> : content}
</DialogRoot> </DialogRoot>
); );
}; };
+33 -92
View File
@@ -5,15 +5,12 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details. Please see LICENSE in the repository root for full details.
*/ */
import { describe, expect, it, onTestFinished, vi } from "vitest"; import { describe, expect, it } from "vitest";
import { logger } from "matrix-js-sdk/lib/logger";
import * as PlatformMod from "../src/Platform";
import { import {
getRoomIdentifierFromUrl, getRoomIdentifierFromUrl,
computeUrlParams,
HeaderStyle,
getUrlParams, getUrlParams,
HeaderStyle,
} from "../src/UrlParams"; } from "../src/UrlParams";
const ROOM_NAME = "roomNameHere"; const ROOM_NAME = "roomNameHere";
@@ -106,16 +103,16 @@ describe("UrlParams", () => {
describe("preload", () => { describe("preload", () => {
it("defaults to false", () => { it("defaults to false", () => {
expect(computeUrlParams().preload).toBe(false); expect(getUrlParams().preload).toBe(false);
}); });
it("ignored in SPA mode", () => { it("ignored in SPA mode", () => {
expect(computeUrlParams("?preload=true").preload).toBe(false); expect(getUrlParams("?preload=true").preload).toBe(false);
}); });
it("respected in widget mode", () => { it("respected in widget mode", () => {
expect( expect(
computeUrlParams( getUrlParams(
"?preload=true&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo", "?preload=true&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo",
).preload, ).preload,
).toBe(true); ).toBe(true);
@@ -124,20 +121,19 @@ describe("UrlParams", () => {
describe("returnToLobby", () => { describe("returnToLobby", () => {
it("is false in SPA mode", () => { it("is false in SPA mode", () => {
expect(computeUrlParams("?returnToLobby=true").returnToLobby).toBe(false); expect(getUrlParams("?returnToLobby=true").returnToLobby).toBe(false);
}); });
it("defaults to false in widget mode", () => { it("defaults to false in widget mode", () => {
expect( expect(
computeUrlParams( getUrlParams("?widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo")
"?widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo", .returnToLobby,
).returnToLobby,
).toBe(false); ).toBe(false);
}); });
it("respected in widget mode", () => { it("respected in widget mode", () => {
expect( expect(
computeUrlParams( getUrlParams(
"?returnToLobby=true&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo", "?returnToLobby=true&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo",
).returnToLobby, ).returnToLobby,
).toBe(true); ).toBe(true);
@@ -146,12 +142,12 @@ describe("UrlParams", () => {
describe("userId", () => { describe("userId", () => {
it("is ignored in SPA mode", () => { it("is ignored in SPA mode", () => {
expect(computeUrlParams("?userId=asd").userId).toBe(null); expect(getUrlParams("?userId=asd").userId).toBe(null);
}); });
it("is parsed in widget mode", () => { it("is parsed in widget mode", () => {
expect( expect(
computeUrlParams( getUrlParams(
"?userId=asd&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo", "?userId=asd&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo",
).userId, ).userId,
).toBe("asd"); ).toBe("asd");
@@ -160,12 +156,12 @@ describe("UrlParams", () => {
describe("deviceId", () => { describe("deviceId", () => {
it("is ignored in SPA mode", () => { it("is ignored in SPA mode", () => {
expect(computeUrlParams("?deviceId=asd").deviceId).toBe(null); expect(getUrlParams("?deviceId=asd").deviceId).toBe(null);
}); });
it("is parsed in widget mode", () => { it("is parsed in widget mode", () => {
expect( expect(
computeUrlParams( getUrlParams(
"?deviceId=asd&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo", "?deviceId=asd&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo",
).deviceId, ).deviceId,
).toBe("asd"); ).toBe("asd");
@@ -174,12 +170,12 @@ describe("UrlParams", () => {
describe("baseUrl", () => { describe("baseUrl", () => {
it("is ignored in SPA mode", () => { it("is ignored in SPA mode", () => {
expect(computeUrlParams("?baseUrl=asd").baseUrl).toBe(null); expect(getUrlParams("?baseUrl=asd").baseUrl).toBe(null);
}); });
it("is parsed in widget mode", () => { it("is parsed in widget mode", () => {
expect( expect(
computeUrlParams( getUrlParams(
"?baseUrl=asd&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo", "?baseUrl=asd&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo",
).baseUrl, ).baseUrl,
).toBe("asd"); ).toBe("asd");
@@ -189,28 +185,28 @@ describe("UrlParams", () => {
describe("viaServers", () => { describe("viaServers", () => {
it("is ignored in widget mode", () => { it("is ignored in widget mode", () => {
expect( expect(
computeUrlParams( getUrlParams(
"?viaServers=asd&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo", "?viaServers=asd&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo",
).viaServers, ).viaServers,
).toBe(null); ).toBe(null);
}); });
it("is parsed in SPA mode", () => { it("is parsed in SPA mode", () => {
expect(computeUrlParams("?viaServers=asd").viaServers).toBe("asd"); expect(getUrlParams("?viaServers=asd").viaServers).toBe("asd");
}); });
}); });
describe("homeserver", () => { describe("homeserver", () => {
it("is ignored in widget mode", () => { it("is ignored in widget mode", () => {
expect( expect(
computeUrlParams( getUrlParams(
"?homeserver=asd&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo", "?homeserver=asd&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo",
).homeserver, ).homeserver,
).toBe(null); ).toBe(null);
}); });
it("is parsed in SPA mode", () => { it("is parsed in SPA mode", () => {
expect(computeUrlParams("?homeserver=asd").homeserver).toBe("asd"); expect(getUrlParams("?homeserver=asd").homeserver).toBe("asd");
}); });
}); });
@@ -241,7 +237,7 @@ describe("UrlParams", () => {
controlledAudioDevices: platform === "desktop" ? false : true, controlledAudioDevices: platform === "desktop" ? false : true,
skipLobby: true, skipLobby: true,
returnToLobby: false, returnToLobby: false,
sendNotificationType: platform === "desktop" ? "notification" : "ring", sendNotificationType: "notification",
}); });
const joinExistingCallDefaults = (platform: string): object => ({ const joinExistingCallDefaults = (platform: string): object => ({
confineToRoom: true, confineToRoom: true,
@@ -256,55 +252,24 @@ describe("UrlParams", () => {
skipLobby: false, skipLobby: false,
returnToLobby: false, returnToLobby: false,
sendNotificationType: "notification", sendNotificationType: "notification",
defaultAudioEnabled: true,
defaultVideoEnabled: true,
}); });
it("use no-intent-defaults with unknown intent", () => { it("use no-intent-defaults with unknown intent", () => {
expect(computeUrlParams()).toMatchObject(noIntentDefaults); expect(getUrlParams()).toMatchObject(noIntentDefaults);
}); });
it("ignores intent if it is not a valid value", () => { it("ignores intent if it is not a valid value", () => {
expect(computeUrlParams("?intent=foo")).toMatchObject(noIntentDefaults); expect(getUrlParams("?intent=foo")).toMatchObject(noIntentDefaults);
}); });
it("accepts start_call", () => { it("accepts start_call", () => {
expect( expect(
computeUrlParams( getUrlParams("?intent=start_call&widgetId=1234&parentUrl=parent.org"),
"?intent=start_call&widgetId=1234&parentUrl=parent.org", ).toMatchObject(startNewCallDefaults("desktop"));
),
).toMatchObject({ ...startNewCallDefaults("desktop"), skipLobby: false });
});
it("accepts start_call_dm mobile", () => {
vi.spyOn(PlatformMod, "platform", "get").mockReturnValue("android");
onTestFinished(() => {
vi.spyOn(PlatformMod, "platform", "get").mockReturnValue("desktop");
});
expect(
computeUrlParams(
"?intent=start_call_dm&widgetId=1234&parentUrl=parent.org",
),
).toMatchObject(startNewCallDefaults("android"));
});
it("accepts start_call_dm mobile and prioritizes overwritten params", () => {
vi.spyOn(PlatformMod, "platform", "get").mockReturnValue("android");
onTestFinished(() => {
vi.spyOn(PlatformMod, "platform", "get").mockReturnValue("desktop");
});
expect(
computeUrlParams(
"?intent=start_call_dm&widgetId=1234&parentUrl=parent.org&sendNotificationType=notification",
),
).toMatchObject({
...startNewCallDefaults("android"),
sendNotificationType: "notification",
});
}); });
it("accepts join_existing", () => { it("accepts join_existing", () => {
expect( expect(
computeUrlParams( getUrlParams(
"?intent=join_existing&widgetId=1234&parentUrl=parent.org", "?intent=join_existing&widgetId=1234&parentUrl=parent.org",
), ),
).toMatchObject(joinExistingCallDefaults("desktop")); ).toMatchObject(joinExistingCallDefaults("desktop"));
@@ -313,55 +278,31 @@ describe("UrlParams", () => {
describe("skipLobby", () => { describe("skipLobby", () => {
it("defaults to false", () => { it("defaults to false", () => {
expect(computeUrlParams().skipLobby).toBe(false); expect(getUrlParams().skipLobby).toBe(false);
}); });
it("defaults to false if intent is start_call in SPA mode", () => { it("defaults to false if intent is start_call in SPA mode", () => {
expect(computeUrlParams("?intent=start_call").skipLobby).toBe(false); expect(getUrlParams("?intent=start_call").skipLobby).toBe(false);
}); });
it("defaults to false if intent is start_call in widget mode", () => { it("defaults to true if intent is start_call in widget mode", () => {
expect( expect(
computeUrlParams( getUrlParams(
"?intent=start_call&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo", "?intent=start_call&widgetId=12345&parentUrl=https%3A%2F%2Flocalhost%2Ffoo",
).skipLobby, ).skipLobby,
).toBe(false); ).toBe(true);
}); });
it("default to false if intent is join_existing", () => { it("default to false if intent is join_existing", () => {
expect(computeUrlParams("?intent=join_existing").skipLobby).toBe(false); expect(getUrlParams("?intent=join_existing").skipLobby).toBe(false);
}); });
}); });
describe("header", () => { describe("header", () => {
it("uses header if provided", () => { it("uses header if provided", () => {
expect(computeUrlParams("?header=app_bar&hideHeader=true").header).toBe( expect(getUrlParams("?header=app_bar&hideHeader=true").header).toBe(
"app_bar", "app_bar",
); );
expect(computeUrlParams("?header=none&hideHeader=false").header).toBe( expect(getUrlParams("?header=none&hideHeader=false").header).toBe("none");
"none",
);
});
});
describe("getUrlParams", () => {
it("uses cached values", () => {
const spy = vi.spyOn(logger, "info");
// call get once
const params = getUrlParams("?header=app_bar&hideHeader=true", "");
// call get twice
expect(getUrlParams("?header=app_bar&hideHeader=true", "")).toBe(params);
// expect compute to only be called once
// it will only log when it is computing the values
expect(spy).toHaveBeenCalledExactlyOnceWith(
"UrlParams: final set of url params\n",
"intent:",
"unknown",
"\nproperties:",
expect.any(Object),
"configuration:",
expect.any(Object),
"intentAndPlatformDerivedConfiguration:",
{},
);
}); });
}); });
}); });
+25 -107
View File
@@ -8,10 +8,7 @@ Please see LICENSE in the repository root for full details.
import { useMemo } from "react"; import { useMemo } from "react";
import { useLocation } from "react-router-dom"; import { useLocation } from "react-router-dom";
import { logger } from "matrix-js-sdk/lib/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { import { type RTCNotificationType } from "matrix-js-sdk/lib/matrixrtc";
type RTCCallIntent,
type RTCNotificationType,
} from "matrix-js-sdk/lib/matrixrtc";
import { pickBy } from "lodash-es"; import { pickBy } from "lodash-es";
import { Config } from "./config/Config"; import { Config } from "./config/Config";
@@ -29,9 +26,7 @@ export enum UserIntent {
StartNewCall = "start_call", StartNewCall = "start_call",
JoinExistingCall = "join_existing", JoinExistingCall = "join_existing",
StartNewCallDM = "start_call_dm", StartNewCallDM = "start_call_dm",
StartNewCallDMVoice = "start_call_dm_voice",
JoinExistingCallDM = "join_existing_dm", JoinExistingCallDM = "join_existing_dm",
JoinExistingCallDMVoice = "join_existing_dm_voice",
Unknown = "unknown", Unknown = "unknown",
} }
@@ -232,16 +227,6 @@ export interface UrlConfiguration {
* - auto-dismiss the call widget once the notification lifetime expires on the receivers side. * - auto-dismiss the call widget once the notification lifetime expires on the receivers side.
*/ */
waitForCallPickup: boolean; waitForCallPickup: boolean;
callIntent?: RTCCallIntent;
}
interface IntentAndPlatformDerivedConfiguration {
defaultAudioEnabled?: boolean;
defaultVideoEnabled?: boolean;
}
interface IntentAndPlatformDerivedConfiguration {
defaultAudioEnabled?: boolean;
defaultVideoEnabled?: boolean;
} }
// If you need to add a new flag to this interface, prefer a name that describes // If you need to add a new flag to this interface, prefer a name that describes
@@ -249,10 +234,7 @@ interface IntentAndPlatformDerivedConfiguration {
// the situations that call for this behavior ('isEmbedded'). This makes it // the situations that call for this behavior ('isEmbedded'). This makes it
// clearer what each flag means, and helps us avoid coupling Element Call's // clearer what each flag means, and helps us avoid coupling Element Call's
// behavior to the needs of specific consumers. // behavior to the needs of specific consumers.
export interface UrlParams export interface UrlParams extends UrlProperties, UrlConfiguration {}
extends UrlProperties,
UrlConfiguration,
IntentAndPlatformDerivedConfiguration {}
// This is here as a stopgap, but what would be far nicer is a function that // This is here as a stopgap, but what would be far nicer is a function that
// takes a UrlParams and returns a query string. That would enable us to // takes a UrlParams and returns a query string. That would enable us to
@@ -328,14 +310,8 @@ class ParamParser {
} }
} }
let urlParamCache: {
search?: string;
hash?: string;
params?: UrlParams;
} = {};
/** /**
* Gets the url params and loads them from a cache if already computed. * Gets the app parameters for the current URL.
* @param search The URL search string * @param search The URL search string
* @param hash The URL hash * @param hash The URL hash
* @returns The app parameters encoded in the URL * @returns The app parameters encoded in the URL
@@ -344,26 +320,6 @@ export const getUrlParams = (
search = window.location.search, search = window.location.search,
hash = window.location.hash, hash = window.location.hash,
): UrlParams => { ): UrlParams => {
if (
urlParamCache.search === search &&
urlParamCache.hash === hash &&
urlParamCache.params
) {
return urlParamCache.params;
}
const params = computeUrlParams(search, hash);
urlParamCache = { search, hash, params };
return params;
};
/**
* Gets the app parameters for the current URL.
* @param search The URL search string
* @param hash The URL hash
* @returns The app parameters encoded in the URL
*/
export const computeUrlParams = (search = "", hash = ""): UrlParams => {
const parser = new ParamParser(search, hash); const parser = new ParamParser(search, hash);
const fontScale = parseFloat(parser.getParam("fontScale") ?? ""); const fontScale = parseFloat(parser.getParam("fontScale") ?? "");
@@ -387,7 +343,8 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => {
? UserIntent.Unknown ? UserIntent.Unknown
: (parser.getEnumParam("intent", UserIntent) ?? UserIntent.Unknown); : (parser.getEnumParam("intent", UserIntent) ?? UserIntent.Unknown);
// Here we only use constants and `platform` to determine the intent preset. // Here we only use constants and `platform` to determine the intent preset.
let intentPreset: UrlConfiguration = { let intentPreset: UrlConfiguration;
const inAppDefault = {
confineToRoom: true, confineToRoom: true,
appPrompt: false, appPrompt: false,
preload: false, preload: false,
@@ -399,38 +356,37 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => {
controlledAudioDevices: platform === "desktop" ? false : true, controlledAudioDevices: platform === "desktop" ? false : true,
skipLobby: true, skipLobby: true,
returnToLobby: false, returnToLobby: false,
sendNotificationType: "notification", sendNotificationType: "notification" as RTCNotificationType,
autoLeaveWhenOthersLeft: false, autoLeaveWhenOthersLeft: false,
waitForCallPickup: false, waitForCallPickup: false,
}; };
switch (intent) { switch (intent) {
case UserIntent.StartNewCall: case UserIntent.StartNewCall:
intentPreset.skipLobby = false; intentPreset = {
intentPreset.callIntent = "video"; ...inAppDefault,
skipLobby: true,
};
break; break;
case UserIntent.JoinExistingCall: case UserIntent.JoinExistingCall:
// On desktop this will be overridden based on which button was used to join the call intentPreset = {
intentPreset.skipLobby = false; ...inAppDefault,
intentPreset.callIntent = "video"; skipLobby: false,
};
break; break;
case UserIntent.StartNewCallDMVoice:
intentPreset.callIntent = "audio";
// Fall through
case UserIntent.StartNewCallDM: case UserIntent.StartNewCallDM:
intentPreset.skipLobby = true; intentPreset = {
intentPreset.sendNotificationType = "ring"; ...inAppDefault,
intentPreset.autoLeaveWhenOthersLeft = true; skipLobby: true,
intentPreset.waitForCallPickup = true; autoLeaveWhenOthersLeft: true,
intentPreset.callIntent = intentPreset.callIntent ?? "video"; waitForCallPickup: true,
};
break; break;
case UserIntent.JoinExistingCallDMVoice:
intentPreset.callIntent = "audio";
// Fall through
case UserIntent.JoinExistingCallDM: case UserIntent.JoinExistingCallDM:
// On desktop this will be overridden based on which button was used to join the call intentPreset = {
intentPreset.skipLobby = true; ...inAppDefault,
intentPreset.autoLeaveWhenOthersLeft = true; skipLobby: true,
intentPreset.callIntent = intentPreset.callIntent ?? "video"; autoLeaveWhenOthersLeft: true,
};
break; break;
// Non widget usecase defaults // Non widget usecase defaults
default: default:
@@ -452,29 +408,6 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => {
}; };
} }
const intentAndPlatformDerivedConfiguration: IntentAndPlatformDerivedConfiguration =
{};
// Desktop also includes web. Its anything that is not mobile.
const desktopMobile = platform === "desktop" ? "desktop" : "mobile";
switch (desktopMobile) {
case "desktop":
case "mobile":
switch (intent) {
case UserIntent.StartNewCall:
case UserIntent.JoinExistingCall:
case UserIntent.StartNewCallDM:
case UserIntent.JoinExistingCallDM:
intentAndPlatformDerivedConfiguration.defaultAudioEnabled = true;
intentAndPlatformDerivedConfiguration.defaultVideoEnabled = true;
break;
case UserIntent.StartNewCallDMVoice:
case UserIntent.JoinExistingCallDMVoice:
intentAndPlatformDerivedConfiguration.defaultAudioEnabled = true;
intentAndPlatformDerivedConfiguration.defaultVideoEnabled = false;
break;
}
}
const properties: UrlProperties = { const properties: UrlProperties = {
widgetId, widgetId,
parentUrl, parentUrl,
@@ -527,25 +460,10 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => {
autoLeaveWhenOthersLeft: parser.getFlag("autoLeave"), autoLeaveWhenOthersLeft: parser.getFlag("autoLeave"),
}; };
// Log the final configuration for debugging purposes.
// This will only log when the cache is not yet set.
logger.info(
"UrlParams: final set of url params\n",
"intent:",
intent,
"\nproperties:",
properties,
"configuration:",
configuration,
"intentAndPlatformDerivedConfiguration:",
intentAndPlatformDerivedConfiguration,
);
return { return {
...properties, ...properties,
...intentPreset, ...intentPreset,
...pickBy(configuration, (v?: unknown) => v !== undefined), ...pickBy(configuration, (v?: unknown) => v !== undefined),
...intentAndPlatformDerivedConfiguration,
}; };
}; };
@@ -9,7 +9,7 @@ exports[`Can close reaction dialog 1`] = `
aria-disabled="false" aria-disabled="false"
aria-expanded="true" aria-expanded="true"
aria-haspopup="true" aria-haspopup="true"
aria-labelledby="«rbb»" aria-labelledby="«rb5»"
class="_button_vczzf_8 _has-icon_vczzf_57 _icon-only_vczzf_50" class="_button_vczzf_8 _has-icon_vczzf_57 _icon-only_vczzf_50"
data-kind="primary" data-kind="primary"
data-size="lg" data-size="lg"
-28
View File
@@ -9,7 +9,6 @@ import {
ConnectionState, ConnectionState,
type E2EEManagerOptions, type E2EEManagerOptions,
ExternalE2EEKeyProvider, ExternalE2EEKeyProvider,
type LocalTrackPublication,
LocalVideoTrack, LocalVideoTrack,
Room, Room,
type RoomOptions, type RoomOptions,
@@ -182,33 +181,6 @@ export function useLivekit(
sfuConfig, sfuConfig,
); );
// Log errors when local participant has issues publishing a track.
useEffect(() => {
const localTrackUnpublishedFn = (
publication: LocalTrackPublication,
): void => {
logger.info(
"Local track unpublished",
publication.trackName,
publication.trackInfo,
);
};
const mediaDevicesErrorFn = (error: Error): void => {
logger.warn("Media devices error when publishing a track", error);
};
room.localParticipant.on("localTrackUnpublished", localTrackUnpublishedFn);
room.localParticipant.on("mediaDevicesError", mediaDevicesErrorFn);
return (): void => {
room.localParticipant.off(
"localTrackUnpublished",
localTrackUnpublishedFn,
);
room.localParticipant.off("mediaDevicesError", mediaDevicesErrorFn);
};
}, [room.localParticipant]);
useEffect(() => { useEffect(() => {
// Sync the requested mute states with LiveKit's mute states. We do it this // Sync the requested mute states with LiveKit's mute states. We do it this
// way around rather than using LiveKit as the source of truth, so that the // way around rather than using LiveKit as the source of truth, so that the
-3
View File
@@ -22,13 +22,11 @@ export function RaisedHandIndicator({
miniature, miniature,
showTimer, showTimer,
onClick, onClick,
tabIndex,
}: { }: {
raisedHandTime?: Date; raisedHandTime?: Date;
miniature?: boolean; miniature?: boolean;
showTimer?: boolean; showTimer?: boolean;
onClick?: () => void; onClick?: () => void;
tabIndex?: number;
}): ReactNode { }): ReactNode {
const { t } = useTranslation(); const { t } = useTranslation();
const [raisedHandDuration, setRaisedHandDuration] = useState(""); const [raisedHandDuration, setRaisedHandDuration] = useState("");
@@ -96,7 +94,6 @@ export function RaisedHandIndicator({
background: "none", background: "none",
}} }}
onClick={clickCallback} onClick={clickCallback}
tabIndex={tabIndex}
> >
{content} {content}
</button> </button>
-11
View File
@@ -27,8 +27,6 @@ import rockSoundOgg from "../sound/reactions/rock.ogg?url";
import rockSoundMp3 from "../sound/reactions/rock.mp3?url"; import rockSoundMp3 from "../sound/reactions/rock.mp3?url";
import waveSoundOgg from "../sound/reactions/wave.ogg?url"; import waveSoundOgg from "../sound/reactions/wave.ogg?url";
import waveSoundMp3 from "../sound/reactions/wave.mp3?url"; import waveSoundMp3 from "../sound/reactions/wave.mp3?url";
import baduntssSoundOgg from "../sound/reactions/baduntss.ogg?url";
import baduntssSoundMp3 from "../sound/reactions/baduntss.mp3?url";
export const ElementCallReactionEventType = "io.element.call.reaction"; export const ElementCallReactionEventType = "io.element.call.reaction";
@@ -193,15 +191,6 @@ export const ReactionSet: ReactionOption[] = [
mp3: waveSoundMp3, mp3: waveSoundMp3,
}, },
}, },
{
emoji: "🥁",
name: "drum",
alias: ["joke"],
sound: {
ogg: baduntssSoundOgg,
mp3: baduntssSoundMp3,
},
},
]; ];
export interface RaisedHandInfo { export interface RaisedHandInfo {
+1
View File
@@ -34,6 +34,7 @@
.overlay[data-show="false"] { .overlay[data-show="false"] {
animation: fade-out 130ms forwards; animation: fade-out 130ms forwards;
content-visibility: hidden;
pointer-events: none; pointer-events: none;
} }
+1 -1
View File
@@ -20,7 +20,7 @@ interface Props {
export const EarpieceOverlay: FC<Props> = ({ show, onBackToVideoPressed }) => { export const EarpieceOverlay: FC<Props> = ({ show, onBackToVideoPressed }) => {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<div className={styles.overlay} data-show={show} aria-hidden={!show}> <div className={styles.overlay} data-show={show}>
<BigIcon className={styles.icon}> <BigIcon className={styles.icon}>
<VoiceCallIcon aria-hidden /> <VoiceCallIcon aria-hidden />
</BigIcon> </BigIcon>
+1 -11
View File
@@ -128,16 +128,6 @@ export const GroupCallView: FC<Props> = ({
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, []); }, []);
// Update our member event when our mute state changes.
useEffect(() => {
if (!isJoined) {
return;
}
void rtcSession.updateCallIntent(
muteStates.video.enabled ? "video" : "audio",
);
}, [rtcSession, isJoined, muteStates.video.enabled]);
useEffect(() => { useEffect(() => {
logger.info("[Lifecycle] GroupCallView Component mounted"); logger.info("[Lifecycle] GroupCallView Component mounted");
return (): void => { return (): void => {
@@ -436,7 +426,7 @@ export const GroupCallView: FC<Props> = ({
client={client} client={client}
matrixInfo={matrixInfo} matrixInfo={matrixInfo}
muteStates={muteStates} muteStates={muteStates}
onEnter={async () => enterRTCSessionOrError(rtcSession)} onEnter={() => void enterRTCSessionOrError(rtcSession)}
confineToRoom={confineToRoom} confineToRoom={confineToRoom}
hideHeader={header === HeaderStyle.None} hideHeader={header === HeaderStyle.None}
participantCount={participantCount} participantCount={participantCount}
+20 -52
View File
@@ -54,6 +54,7 @@ import { type HeaderStyle, useUrlParams } from "../UrlParams";
import { useCallViewKeyboardShortcuts } from "../useCallViewKeyboardShortcuts"; import { useCallViewKeyboardShortcuts } from "../useCallViewKeyboardShortcuts";
import { ElementWidgetActions, widget } from "../widget"; import { ElementWidgetActions, widget } from "../widget";
import styles from "./InCallView.module.css"; import styles from "./InCallView.module.css";
import overlayStyles from "../Overlay.module.css";
import { GridTile } from "../tile/GridTile"; import { GridTile } from "../tile/GridTile";
import { type OTelGroupCallMembership } from "../otel/OTelGroupCallMembership"; import { type OTelGroupCallMembership } from "../otel/OTelGroupCallMembership";
import { SettingsModal, defaultSettingsTab } from "../settings/SettingsModal"; import { SettingsModal, defaultSettingsTab } from "../settings/SettingsModal";
@@ -118,14 +119,12 @@ import { EarpieceOverlay } from "./EarpieceOverlay.tsx";
import { useAppBarHidden, useAppBarSecondaryButton } from "../AppBar.tsx"; import { useAppBarHidden, useAppBarSecondaryButton } from "../AppBar.tsx";
import { useBehavior } from "../useBehavior.ts"; import { useBehavior } from "../useBehavior.ts";
import { Toast } from "../Toast.tsx"; import { Toast } from "../Toast.tsx";
import overlayStyles from "../Overlay.module.css";
import { Avatar, Size as AvatarSize } from "../Avatar"; import { Avatar, Size as AvatarSize } from "../Avatar";
import waitingStyles from "./WaitingForJoin.module.css"; import waitingStyles from "./WaitingForJoin.module.css";
import { prefetchSounds } from "../soundUtils"; import { prefetchSounds } from "../soundUtils";
import { useAudioContext } from "../useAudioContext"; import { useAudioContext } from "../useAudioContext";
import ringtoneMp3 from "../sound/ringtone.mp3?url"; import ringtoneMp3 from "../sound/ringtone.mp3?url";
import ringtoneOgg from "../sound/ringtone.ogg?url"; import ringtoneOgg from "../sound/ringtone.ogg?url";
import { ObservableScope } from "../state/ObservableScope.ts";
const canScreenshare = "getDisplayMedia" in (navigator.mediaDevices ?? {}); const canScreenshare = "getDisplayMedia" in (navigator.mediaDevices ?? {});
@@ -145,13 +144,8 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
sfuConfig, sfuConfig,
props.e2eeSystem, props.e2eeSystem,
); );
const observableScope = useInitial(() => new ObservableScope()); const connStateObservable$ = useObservable(
const connStateBehavior$ = useObservable( (inputs$) => inputs$.pipe(map(([connState]) => connState)),
(inputs$) =>
observableScope.behavior(
inputs$.pipe(map(([connState]) => connState)),
connState,
),
[connState], [connState],
); );
const [vm, setVm] = useState<CallViewModel | null>(null); const [vm, setVm] = useState<CallViewModel | null>(null);
@@ -194,7 +188,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
waitForCallPickup: waitForCallPickup:
waitForCallPickup && sendNotificationType === "ring", waitForCallPickup && sendNotificationType === "ring",
}, },
connStateBehavior$, connStateObservable$,
reactionsReader.raisedHands$, reactionsReader.raisedHands$,
reactionsReader.reactions$, reactionsReader.reactions$,
); );
@@ -210,7 +204,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
livekitRoom, livekitRoom,
mediaDevices, mediaDevices,
props.e2eeSystem, props.e2eeSystem,
connStateBehavior$, connStateObservable$,
autoLeaveWhenOthersLeft, autoLeaveWhenOthersLeft,
sendNotificationType, sendNotificationType,
waitForCallPickup, waitForCallPickup,
@@ -647,38 +641,6 @@ export const InCallView: FC<InCallViewProps> = ({
} }
} }
// The reconnecting toast cannot be dismissed
const onDismissReconnectingToast = useCallback(() => {}, []);
// We need to use a non-modal toast to avoid trapping focus within the toast.
// However, a non-modal toast will not render any background overlay on its
// own, so we must render one manually.
const reconnectingToast = (
<>
<div
className={classNames(overlayStyles.bg, overlayStyles.animate)}
data-state={reconnecting ? "open" : "closed"}
/>
<Toast
onDismiss={onDismissReconnectingToast}
open={reconnecting}
modal={false}
>
{t("common.reconnecting")}
</Toast>
</>
);
const earpieceOverlay = (
<EarpieceOverlay
show={earpieceMode && !reconnecting}
onBackToVideoPressed={audioOutputSwitcher?.switch}
/>
);
// If the reconnecting toast or earpiece overlay obscures the media tiles, we
// need to remove them from the accessibility tree and block focus.
const contentObscured = reconnecting || earpieceMode;
const Tile = useMemo( const Tile = useMemo(
() => () =>
function Tile({ function Tile({
@@ -708,7 +670,6 @@ export const InCallView: FC<InCallViewProps> = ({
className={classNames(className, styles.tile)} className={classNames(className, styles.tile)}
style={style} style={style}
showSpeakingIndicators={showSpeakingIndicatorsValue} showSpeakingIndicators={showSpeakingIndicatorsValue}
focusable={!contentObscured}
/> />
) : ( ) : (
<SpotlightTile <SpotlightTile
@@ -719,13 +680,12 @@ export const InCallView: FC<InCallViewProps> = ({
targetWidth={targetWidth} targetWidth={targetWidth}
targetHeight={targetHeight} targetHeight={targetHeight}
showIndicators={showSpotlightIndicatorsValue} showIndicators={showSpotlightIndicatorsValue}
focusable={!contentObscured}
className={classNames(className, styles.tile)} className={classNames(className, styles.tile)}
style={style} style={style}
/> />
); );
}, },
[vm, openProfile, contentObscured], [vm, openProfile],
); );
const layouts = useMemo(() => { const layouts = useMemo(() => {
@@ -754,8 +714,6 @@ export const InCallView: FC<InCallViewProps> = ({
targetWidth={gridBounds.height} targetWidth={gridBounds.height}
targetHeight={gridBounds.width} targetHeight={gridBounds.width}
showIndicators={false} showIndicators={false}
focusable={!contentObscured}
aria-hidden={contentObscured}
/> />
); );
} }
@@ -773,7 +731,6 @@ export const InCallView: FC<InCallViewProps> = ({
model={layout} model={layout}
Layout={layers.fixed} Layout={layers.fixed}
Tile={Tile} Tile={Tile}
aria-hidden={contentObscured}
/> />
); );
const scrollingGrid = ( const scrollingGrid = (
@@ -783,7 +740,6 @@ export const InCallView: FC<InCallViewProps> = ({
model={layout} model={layout}
Layout={layers.scrolling} Layout={layers.scrolling}
Tile={Tile} Tile={Tile}
aria-hidden={contentObscured}
/> />
); );
// The grid tiles go *under* the spotlight in the portrait layout, but // The grid tiles go *under* the spotlight in the portrait layout, but
@@ -913,6 +869,9 @@ export const InCallView: FC<InCallViewProps> = ({
</div> </div>
); );
// The reconnecting toast cannot be dismissed
const onDismissReconnectingToast = useCallback(() => {}, []);
return ( return (
<div <div
className={styles.inRoom} className={styles.inRoom}
@@ -940,8 +899,17 @@ export const InCallView: FC<InCallViewProps> = ({
{renderContent()} {renderContent()}
<CallEventAudioRenderer vm={vm} muted={muteAllAudio} /> <CallEventAudioRenderer vm={vm} muted={muteAllAudio} />
<ReactionsAudioRenderer vm={vm} muted={muteAllAudio} /> <ReactionsAudioRenderer vm={vm} muted={muteAllAudio} />
{reconnectingToast} <Toast
{earpieceOverlay} onDismiss={onDismissReconnectingToast}
open={reconnecting}
portal={false}
>
{t("common.reconnecting")}
</Toast>
<EarpieceOverlay
show={earpieceMode && !reconnecting}
onBackToVideoPressed={audioOutputSwitcher?.switch}
/>
<ReactionsOverlay vm={vm} /> <ReactionsOverlay vm={vm} />
{waitingOverlay} {waitingOverlay}
{footer} {footer}
+4 -13
View File
@@ -57,7 +57,7 @@ interface Props {
client: MatrixClient; client: MatrixClient;
matrixInfo: MatrixInfo; matrixInfo: MatrixInfo;
muteStates: MuteStates; muteStates: MuteStates;
onEnter: () => Promise<void>; onEnter: () => void;
enterLabel?: JSX.Element | string; enterLabel?: JSX.Element | string;
confineToRoom: boolean; confineToRoom: boolean;
hideHeader: boolean; hideHeader: boolean;
@@ -193,14 +193,6 @@ export const LobbyView: FC<Props> = ({
useTrackProcessorSync(videoTrack); useTrackProcessorSync(videoTrack);
const [waitingToEnter, setWaitingToEnter] = useState(false);
const onEnterCall = useCallback(() => {
setWaitingToEnter(true);
void onEnter().finally(() => setWaitingToEnter(false));
}, [onEnter]);
const waiting = waitingForInvite || waitingToEnter;
// TODO: Unify this component with InCallView, so we can get slick joining // TODO: Unify this component with InCallView, so we can get slick joining
// animations and don't have to feel bad about reusing its CSS // animations and don't have to feel bad about reusing its CSS
return ( return (
@@ -230,12 +222,11 @@ export const LobbyView: FC<Props> = ({
> >
<Button <Button
className={classNames(styles.join, { className={classNames(styles.join, {
[styles.wait]: waiting, [styles.wait]: waitingForInvite,
})} })}
size={waiting ? "sm" : "lg"} size={waitingForInvite ? "sm" : "lg"}
disabled={waiting}
onClick={() => { onClick={() => {
if (!waiting) onEnterCall(); if (!waitingForInvite) onEnter();
}} }}
data-testid="lobby_joinCall" data-testid="lobby_joinCall"
> >
+2 -67
View File
@@ -8,7 +8,6 @@ Please see LICENSE in the repository root for full details.
import { import {
afterAll, afterAll,
afterEach, afterEach,
beforeEach,
describe, describe,
expect, expect,
it, it,
@@ -27,6 +26,7 @@ import { MediaDevicesContext } from "../MediaDevicesContext";
import { mockConfig } from "../utils/test"; import { mockConfig } from "../utils/test";
import { MediaDevices } from "../state/MediaDevices"; import { MediaDevices } from "../state/MediaDevices";
import { ObservableScope } from "../state/ObservableScope"; import { ObservableScope } from "../state/ObservableScope";
vi.mock("@livekit/components-core"); vi.mock("@livekit/components-core");
interface TestComponentProps { interface TestComponentProps {
@@ -110,10 +110,9 @@ function mockMediaDevices(
return new MediaDevices(scope); return new MediaDevices(scope);
} }
describe("useMuteStates VITE_PACKAGE='full' (SPA) mode", () => { describe("useMuteStates", () => {
afterEach(() => { afterEach(() => {
vi.clearAllMocks(); vi.clearAllMocks();
vi.stubEnv("VITE_PACKAGE", "full");
}); });
afterAll(() => { afterAll(() => {
@@ -257,67 +256,3 @@ describe("useMuteStates VITE_PACKAGE='full' (SPA) mode", () => {
expect(screen.getByTestId("video-enabled").textContent).toBe("true"); expect(screen.getByTestId("video-enabled").textContent).toBe("true");
}); });
}); });
describe("useMuteStates in VITE_PACKAGE='embedded' (widget) mode", () => {
beforeEach(() => {
vi.stubEnv("VITE_PACKAGE", "embedded");
});
it("uses defaults from config", () => {
mockConfig({
media_devices: {
enable_audio: false,
enable_video: false,
},
});
render(
<MemoryRouter>
<MediaDevicesContext value={mockMediaDevices()}>
<TestComponent />
</MediaDevicesContext>
</MemoryRouter>,
);
expect(screen.getByTestId("audio-enabled").textContent).toBe("false");
expect(screen.getByTestId("video-enabled").textContent).toBe("false");
});
it("skipLobby does not mute inputs", () => {
mockConfig();
render(
<MemoryRouter
initialEntries={[
"/room/?skipLobby=true&widgetId=1234&parentUrl=www.parent.org",
]}
>
<MediaDevicesContext value={mockMediaDevices()}>
<TestComponent />
</MediaDevicesContext>
</MemoryRouter>,
);
expect(screen.getByTestId("audio-enabled").textContent).toBe("true");
expect(screen.getByTestId("video-enabled").textContent).toBe("true");
});
it("url params win over config", () => {
// The config sets audio and video to disabled
mockConfig({ media_devices: { enable_audio: false, enable_video: false } });
render(
<MemoryRouter
initialEntries={[
// The Intent sets both audio and video enabled to true via the url param configuration
"/room/?intent=start_call_dm&widgetId=1234&parentUrl=www.parent.org",
]}
>
<MediaDevicesContext value={mockMediaDevices()}>
<TestComponent />
</MediaDevicesContext>
</MemoryRouter>,
);
// At the end we expect the url param to take precedence, resulting in true
expect(screen.getByTestId("audio-enabled").textContent).toBe("true");
expect(screen.getByTestId("video-enabled").textContent).toBe("true");
});
});
+5 -17
View File
@@ -81,15 +81,11 @@ function useMuteState(
export function useMuteStates(isJoined: boolean): MuteStates { export function useMuteStates(isJoined: boolean): MuteStates {
const devices = useMediaDevices(); const devices = useMediaDevices();
const { skipLobby, defaultAudioEnabled, defaultVideoEnabled } = const { skipLobby } = useUrlParams();
useUrlParams();
const audio = useMuteState( const audio = useMuteState(devices.audioInput, () => {
devices.audioInput, return Config.get().media_devices.enable_audio && !skipLobby && !isJoined;
() => });
(defaultAudioEnabled ?? Config.get().media_devices.enable_audio) &&
allowJoinUnmuted(skipLobby, isJoined),
);
useEffect(() => { useEffect(() => {
// If audio is enabled, we need to request the device names again, // If audio is enabled, we need to request the device names again,
// because iOS will not be able to switch to the correct device after un-muting. // because iOS will not be able to switch to the correct device after un-muting.
@@ -101,9 +97,7 @@ export function useMuteStates(isJoined: boolean): MuteStates {
const isEarpiece = useIsEarpiece(); const isEarpiece = useIsEarpiece();
const video = useMuteState( const video = useMuteState(
devices.videoInput, devices.videoInput,
() => () => Config.get().media_devices.enable_video && !skipLobby && !isJoined,
(defaultVideoEnabled ?? Config.get().media_devices.enable_video) &&
allowJoinUnmuted(skipLobby, isJoined),
isEarpiece, // Force video to be unavailable if using earpiece isEarpiece, // Force video to be unavailable if using earpiece
); );
@@ -170,9 +164,3 @@ export function useMuteStates(isJoined: boolean): MuteStates {
return useMemo(() => ({ audio, video }), [audio, video]); return useMemo(() => ({ audio, video }), [audio, video]);
} }
function allowJoinUnmuted(skipLobby: boolean, isJoined: boolean): boolean {
return (
(!skipLobby && !isJoined) || import.meta.env.VITE_PACKAGE === "embedded"
);
}
+1 -4
View File
@@ -151,10 +151,7 @@ export const RoomPage: FC = () => {
: E2eeType.NONE, : E2eeType.NONE,
}, },
}} }}
onEnter={async (): Promise<void> => { onEnter={(): void => knock?.()}
knock?.();
return Promise.resolve();
}}
enterLabel={label} enterLabel={label}
waitingForInvite={groupCallState.kind === "waitForInvite"} waitingForInvite={groupCallState.kind === "waitForInvite"}
confineToRoom={confineToRoom} confineToRoom={confineToRoom}
@@ -111,11 +111,6 @@ exports[`InCallView > rendering > renders 1`] = `
<div /> <div />
</div> </div>
<div <div
class="bg animate"
data-state="closed"
/>
<div
aria-hidden="true"
class="overlay" class="overlay"
data-show="false" data-show="false"
> >
+1 -3
View File
@@ -120,13 +120,11 @@ export async function enterRTCSession(
const { features, matrix_rtc_session: matrixRtcSessionConfig } = Config.get(); const { features, matrix_rtc_session: matrixRtcSessionConfig } = Config.get();
const useDeviceSessionMemberEvents = const useDeviceSessionMemberEvents =
features?.feature_use_device_session_member_events; features?.feature_use_device_session_member_events;
const { sendNotificationType: notificationType, callIntent } = getUrlParams();
rtcSession.joinRoomSession( rtcSession.joinRoomSession(
await makePreferredLivekitFoci(rtcSession, livekitAlias), await makePreferredLivekitFoci(rtcSession, livekitAlias),
makeActiveFocus(), makeActiveFocus(),
{ {
notificationType, notificationType: getUrlParams().sendNotificationType,
callIntent,
useNewMembershipManager, useNewMembershipManager,
manageMediaKeys: encryptMedia, manageMediaKeys: encryptMedia,
...(useDeviceSessionMemberEvents !== undefined && { ...(useDeviceSessionMemberEvents !== undefined && {
-1
View File
@@ -23,4 +23,3 @@ The following sound effects have been originally created by Element.
- `end_call` - `end_call`
- `reactions/rock` - `reactions/rock`
- `reactions/wave` - `reactions/wave`
- `reactions/baduntss`
Binary file not shown.
Binary file not shown.
+4 -41
View File
@@ -266,7 +266,7 @@ const mockLegacyRingEvent = {} as { event_id: string } & ICallNotifyContent;
interface CallViewModelInputs { interface CallViewModelInputs {
remoteParticipants$: Behavior<RemoteParticipant[]>; remoteParticipants$: Behavior<RemoteParticipant[]>;
rtcMembers$: Behavior<Partial<CallMembership>[]>; rtcMembers$: Behavior<Partial<CallMembership>[]>;
livekitConnectionState$: Behavior<ECConnectionState>; connectionState$: Observable<ECConnectionState>;
speaking: Map<Participant, Observable<boolean>>; speaking: Map<Participant, Observable<boolean>>;
mediaDevices: MediaDevices; mediaDevices: MediaDevices;
initialSyncState: SyncState; initialSyncState: SyncState;
@@ -276,9 +276,7 @@ function withCallViewModel(
{ {
remoteParticipants$ = constant([]), remoteParticipants$ = constant([]),
rtcMembers$ = constant([localRtcMember]), rtcMembers$ = constant([localRtcMember]),
livekitConnectionState$: connectionState$ = constant( connectionState$ = of(ConnectionState.Connected),
ConnectionState.Connected,
),
speaking = new Map(), speaking = new Map(),
mediaDevices = mockMediaDevices({}), mediaDevices = mockMediaDevices({}),
initialSyncState = SyncState.Syncing, initialSyncState = SyncState.Syncing,
@@ -386,7 +384,7 @@ test("participants are retained during a focus switch", () => {
b: [], b: [],
}), }),
rtcMembers$: constant([localRtcMember, aliceRtcMember, bobRtcMember]), rtcMembers$: constant([localRtcMember, aliceRtcMember, bobRtcMember]),
livekitConnectionState$: behavior(connectionInputMarbles, { connectionState$: behavior(connectionInputMarbles, {
c: ConnectionState.Connected, c: ConnectionState.Connected,
s: ECAddonConnectionState.ECSwitchingFocus, s: ECAddonConnectionState.ECSwitchingFocus,
}), }),
@@ -1253,41 +1251,6 @@ describe("waitForCallPickup$", () => {
}); });
}); });
test("regression test: does stop ringing in case livekitConnectionState$ emits after didSendCallNotification$ has already emitted", () => {
withTestScheduler(({ schedule, expectObservable, behavior }) => {
withCallViewModel(
{
livekitConnectionState$: behavior("d 9ms c", {
d: ConnectionState.Disconnected,
c: ConnectionState.Connected,
}),
},
(vm, rtcSession) => {
// Fire a call notification IMMEDIATELY (its important for this test, that this happens before the livekitConnectionState$ emits)
schedule("n", {
n: () => {
rtcSession.emit(
MatrixRTCSessionEvent.DidSendCallNotification,
mockRingEvent("$notif1", 30),
mockLegacyRingEvent,
);
},
});
expectObservable(vm.callPickupState$).toBe("a 9ms b 19ms c", {
a: "unknown",
b: "ringing",
c: "timeout",
});
},
{
waitForCallPickup: true,
encryptionSystem: { kind: E2eeType.PER_PARTICIPANT },
},
);
});
});
test("ringing -> success if someone joins before timeout", () => { test("ringing -> success if someone joins before timeout", () => {
withTestScheduler(({ behavior, schedule, expectObservable }) => { withTestScheduler(({ behavior, schedule, expectObservable }) => {
// Someone joins at 20ms (both LiveKit participant and MatrixRTC member) // Someone joins at 20ms (both LiveKit participant and MatrixRTC member)
@@ -1342,7 +1305,7 @@ describe("waitForCallPickup$", () => {
a: [localRtcMember], a: [localRtcMember],
b: [localRtcMember, aliceRtcMember], b: [localRtcMember, aliceRtcMember],
}), }),
livekitConnectionState$: connectionState$, connectionState$,
}, },
(vm, rtcSession) => { (vm, rtcSession) => {
// Notify at 5ms so we enter ringing, then get disconnected 5ms later // Notify at 5ms so we enter ringing, then get disconnected 5ms later
+31 -34
View File
@@ -880,37 +880,32 @@ export class CallViewModel extends ViewModel {
? this.allOthersLeft$ ? this.allOthersLeft$
: NEVER; : NEVER;
private readonly didSendCallNotification$ = fromEvent( /**
* Whenever the RTC session tells us that it intends to ring the remote
* participant's devices, this emits an Observable tracking the current state of
* that ringing process.
*/
private readonly ring$: Observable<
Observable<"ringing" | "timeout" | "decline">
> = (
fromEvent(
this.matrixRTCSession, this.matrixRTCSession,
MatrixRTCSessionEvent.DidSendCallNotification, MatrixRTCSessionEvent.DidSendCallNotification,
) as Observable< ) as Observable<
Parameters< Parameters<
MatrixRTCSessionEventHandlerMap[MatrixRTCSessionEvent.DidSendCallNotification] MatrixRTCSessionEventHandlerMap[MatrixRTCSessionEvent.DidSendCallNotification]
> >
>; >
/** ).pipe(
* Whenever the RTC session tells us that it intends to ring the remote
* participant's devices, this emits an Observable tracking the current state of
* that ringing process.
*/
// This is a behavior since we need to store the latest state for when we subscribe to this after `didSendCallNotification$`
// has already emitted but we still need the latest observable with a timeout timer that only gets created on after receiving `notificationEvent`.
// A behavior will emit the latest observable with the running timer to new subscribers.
// see also: callPickupState$ and in particular the line: `return this.ring$.pipe(mergeAll());` here we otherwise might get an EMPTY observable if
// `ring$` would not be a behavior.
private readonly ring$: Behavior<"ringing" | "timeout" | "decline" | null> =
this.scope.behavior(
this.didSendCallNotification$.pipe(
filter( filter(
([notificationEvent]) => ([notificationEvent]) => notificationEvent.notification_type === "ring",
notificationEvent.notification_type === "ring",
), ),
switchMap(([notificationEvent]) => { map(([notificationEvent]) => {
const lifetimeMs = notificationEvent?.lifetime ?? 0; const lifetimeMs = notificationEvent?.lifetime ?? 0;
return concat( return concat(
lifetimeMs === 0 lifetimeMs === 0
? // If no lifetime, skip the ring state ? // If no lifetime, skip the ring state
of(null) EMPTY
: // Ring until lifetime ms have passed : // Ring until lifetime ms have passed
timer(lifetimeMs).pipe( timer(lifetimeMs).pipe(
ignoreElements(), ignoreElements(),
@@ -919,7 +914,6 @@ export class CallViewModel extends ViewModel {
// The notification lifetime has timed out, meaning ringing has likely // The notification lifetime has timed out, meaning ringing has likely
// stopped on all receiving clients. // stopped on all receiving clients.
of("timeout" as const), of("timeout" as const),
// This makes sure we will not drop into the `endWith("decline" as const)` state
NEVER, NEVER,
).pipe( ).pipe(
takeUntil( takeUntil(
@@ -932,8 +926,7 @@ export class CallViewModel extends ViewModel {
([event]) => ([event]) =>
event.getType() === EventType.RTCDecline && event.getType() === EventType.RTCDecline &&
event.getRelation()?.rel_type === "m.reference" && event.getRelation()?.rel_type === "m.reference" &&
event.getRelation()?.event_id === event.getRelation()?.event_id === notificationEvent.event_id &&
notificationEvent.event_id &&
event.getSender() !== this.userId, event.getSender() !== this.userId,
), ),
), ),
@@ -941,8 +934,6 @@ export class CallViewModel extends ViewModel {
endWith("decline" as const), endWith("decline" as const),
); );
}), }),
),
null,
); );
/** /**
@@ -950,7 +941,7 @@ export class CallViewModel extends ViewModel {
*/ */
private readonly someoneElseJoined$ = this.memberships$.pipe( private readonly someoneElseJoined$ = this.memberships$.pipe(
map((ms) => ms.some((m) => m.sender !== this.userId)), map((ms) => ms.some((m) => m.sender !== this.userId)),
) as Behavior<boolean>; );
/** /**
* The current call pickup state of the call. * The current call pickup state of the call.
@@ -969,19 +960,25 @@ export class CallViewModel extends ViewModel {
? this.scope.behavior< ? this.scope.behavior<
"unknown" | "ringing" | "timeout" | "decline" | "success" "unknown" | "ringing" | "timeout" | "decline" | "success"
>( >(
combineLatest( combineLatest([
[this.livekitConnectionState$, this.someoneElseJoined$, this.ring$], this.livekitConnectionState$,
(livekitConnectionState, someoneElseJoined, ring) => { this.someoneElseJoined$,
]).pipe(
switchMap(([livekitConnectionState, someoneElseJoined]) => {
if (livekitConnectionState === ConnectionState.Disconnected) { if (livekitConnectionState === ConnectionState.Disconnected) {
// Do not ring until we're connected. // Do not ring until we're connected.
return "unknown" as const; return of("unknown" as const);
} else if (someoneElseJoined) { } else if (someoneElseJoined) {
return "success" as const; return of("success" as const);
} }
// Show the ringing state of the most recent ringing attempt. // Show the ringing state of the most recent ringing attempt.
// as long as we have not yet sent an RTC notification event, ring will be null -> callPickupState$ = unknown. return this.ring$.pipe(switchAll());
return ring ?? ("unknown" as const); }),
}, // The state starts as 'unknown' because we don't know if the RTC
// session will actually send a notify event yet. It will only be
// known once we send our own membership and see that we were the
// first one to join.
startWith("unknown" as const),
), ),
) )
: constant(null); : constant(null);
@@ -1693,7 +1690,7 @@ export class CallViewModel extends ViewModel {
private readonly livekitRoom: LivekitRoom, private readonly livekitRoom: LivekitRoom,
private readonly mediaDevices: MediaDevices, private readonly mediaDevices: MediaDevices,
private readonly options: CallViewModelOptions, private readonly options: CallViewModelOptions,
public readonly livekitConnectionState$: Behavior<ECConnectionState>, public readonly livekitConnectionState$: Observable<ECConnectionState>,
private readonly handsRaisedSubject$: Observable< private readonly handsRaisedSubject$: Observable<
Record<string, RaisedHandInfo> Record<string, RaisedHandInfo>
>, >,
-1
View File
@@ -64,7 +64,6 @@ test("GridTile is accessible", async () => {
targetWidth={300} targetWidth={300}
targetHeight={200} targetHeight={200}
showSpeakingIndicators showSpeakingIndicators
focusable={true}
/> />
</ReactionsSenderProvider>, </ReactionsSenderProvider>,
); );
+1 -11
View File
@@ -60,7 +60,6 @@ interface TileProps {
targetHeight: number; targetHeight: number;
displayName: string; displayName: string;
showSpeakingIndicators: boolean; showSpeakingIndicators: boolean;
focusable: boolean;
} }
interface UserMediaTileProps extends TileProps { interface UserMediaTileProps extends TileProps {
@@ -82,7 +81,6 @@ const UserMediaTile: FC<UserMediaTileProps> = ({
menuEnd, menuEnd,
className, className,
displayName, displayName,
focusable,
...props ...props
}) => { }) => {
const { toggleRaisedHand } = useReactionsSender(); const { toggleRaisedHand } = useReactionsSender();
@@ -164,7 +162,6 @@ const UserMediaTile: FC<UserMediaTileProps> = ({
/> />
} }
displayName={displayName} displayName={displayName}
focusable={focusable}
primaryButton={ primaryButton={
primaryButton ?? ( primaryButton ?? (
<Menu <Menu
@@ -172,10 +169,7 @@ const UserMediaTile: FC<UserMediaTileProps> = ({
onOpenChange={setMenuOpen} onOpenChange={setMenuOpen}
title={displayName} title={displayName}
trigger={ trigger={
<button <button aria-label={t("common.options")}>
aria-label={t("common.options")}
tabIndex={focusable ? undefined : -1}
>
<OverflowHorizontalIcon aria-hidden width={20} height={20} /> <OverflowHorizontalIcon aria-hidden width={20} height={20} />
</button> </button>
} }
@@ -214,7 +208,6 @@ const LocalUserMediaTile: FC<LocalUserMediaTileProps> = ({
ref, ref,
vm, vm,
onOpenProfile, onOpenProfile,
focusable,
...props ...props
}) => { }) => {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -243,7 +236,6 @@ const LocalUserMediaTile: FC<LocalUserMediaTileProps> = ({
className={styles.switchCamera} className={styles.switchCamera}
aria-label={t("switch_camera")} aria-label={t("switch_camera")}
onClick={switchCamera} onClick={switchCamera}
tabIndex={focusable ? undefined : -1}
> >
<SwitchCameraSolidIcon aria-hidden width={20} height={20} /> <SwitchCameraSolidIcon aria-hidden width={20} height={20} />
</button> </button>
@@ -266,7 +258,6 @@ const LocalUserMediaTile: FC<LocalUserMediaTileProps> = ({
/> />
) )
} }
focusable={focusable}
{...props} {...props}
/> />
); );
@@ -346,7 +337,6 @@ interface GridTileProps {
className?: string; className?: string;
style?: ComponentProps<typeof animated.div>["style"]; style?: ComponentProps<typeof animated.div>["style"];
showSpeakingIndicators: boolean; showSpeakingIndicators: boolean;
focusable: boolean;
} }
export const GridTile: FC<GridTileProps> = ({ export const GridTile: FC<GridTileProps> = ({
-1
View File
@@ -47,7 +47,6 @@ describe("MediaView", () => {
video: trackReference, video: trackReference,
member: undefined, member: undefined,
localParticipant: false, localParticipant: false,
focusable: true,
}; };
test("is accessible", async () => { test("is accessible", async () => {
-4
View File
@@ -38,7 +38,6 @@ interface Props extends ComponentProps<typeof animated.div> {
encryptionStatus: EncryptionStatus; encryptionStatus: EncryptionStatus;
nameTagLeadingIcon?: ReactNode; nameTagLeadingIcon?: ReactNode;
displayName: string; displayName: string;
focusable: boolean;
primaryButton?: ReactNode; primaryButton?: ReactNode;
raisedHandTime?: Date; raisedHandTime?: Date;
currentReaction?: ReactionOption; currentReaction?: ReactionOption;
@@ -62,7 +61,6 @@ export const MediaView: FC<Props> = ({
unencryptedWarning, unencryptedWarning,
nameTagLeadingIcon, nameTagLeadingIcon,
displayName, displayName,
focusable,
primaryButton, primaryButton,
encryptionStatus, encryptionStatus,
raisedHandTime, raisedHandTime,
@@ -116,7 +114,6 @@ export const MediaView: FC<Props> = ({
miniature={avatarSize < 96} miniature={avatarSize < 96}
showTimer={handRaiseTimerVisible} showTimer={handRaiseTimerVisible}
onClick={raisedHandOnClick} onClick={raisedHandOnClick}
tabIndex={focusable ? undefined : -1}
/> />
{currentReaction && ( {currentReaction && (
<ReactionIndicator <ReactionIndicator
@@ -167,7 +164,6 @@ export const MediaView: FC<Props> = ({
label={t("common.unencrypted")} label={t("common.unencrypted")}
placement="bottom" placement="bottom"
isTriggerInteractive={false} isTriggerInteractive={false}
nonInteractiveTriggerTabIndex={focusable ? undefined : -1}
> >
<ErrorSolidIcon <ErrorSolidIcon
width={20} width={20}
-1
View File
@@ -59,7 +59,6 @@ test("SpotlightTile is accessible", async () => {
expanded={false} expanded={false}
onToggleExpanded={toggleExpanded} onToggleExpanded={toggleExpanded}
showIndicators showIndicators
focusable={true}
/>, />,
); );
-11
View File
@@ -59,7 +59,6 @@ interface SpotlightItemBaseProps {
unencryptedWarning: boolean; unencryptedWarning: boolean;
encryptionStatus: EncryptionStatus; encryptionStatus: EncryptionStatus;
displayName: string; displayName: string;
focusable: boolean;
"aria-hidden"?: boolean; "aria-hidden"?: boolean;
localParticipant: boolean; localParticipant: boolean;
} }
@@ -113,7 +112,6 @@ interface SpotlightItemProps {
vm: MediaViewModel; vm: MediaViewModel;
targetWidth: number; targetWidth: number;
targetHeight: number; targetHeight: number;
focusable: boolean;
intersectionObserver$: Observable<IntersectionObserver>; intersectionObserver$: Observable<IntersectionObserver>;
/** /**
* Whether this item should act as a scroll snapping point. * Whether this item should act as a scroll snapping point.
@@ -127,7 +125,6 @@ const SpotlightItem: FC<SpotlightItemProps> = ({
vm, vm,
targetWidth, targetWidth,
targetHeight, targetHeight,
focusable,
intersectionObserver$, intersectionObserver$,
snap, snap,
"aria-hidden": ariaHidden, "aria-hidden": ariaHidden,
@@ -166,7 +163,6 @@ const SpotlightItem: FC<SpotlightItemProps> = ({
member: vm.member, member: vm.member,
unencryptedWarning, unencryptedWarning,
displayName, displayName,
focusable,
encryptionStatus, encryptionStatus,
"aria-hidden": ariaHidden, "aria-hidden": ariaHidden,
localParticipant: vm.local, localParticipant: vm.local,
@@ -189,7 +185,6 @@ interface Props {
targetWidth: number; targetWidth: number;
targetHeight: number; targetHeight: number;
showIndicators: boolean; showIndicators: boolean;
focusable: boolean;
className?: string; className?: string;
style?: ComponentProps<typeof animated.div>["style"]; style?: ComponentProps<typeof animated.div>["style"];
} }
@@ -202,7 +197,6 @@ export const SpotlightTile: FC<Props> = ({
targetWidth, targetWidth,
targetHeight, targetHeight,
showIndicators, showIndicators,
focusable = true,
className, className,
style, style,
}) => { }) => {
@@ -299,7 +293,6 @@ export const SpotlightTile: FC<Props> = ({
className={classNames(styles.advance, styles.back)} className={classNames(styles.advance, styles.back)}
aria-label={t("common.back")} aria-label={t("common.back")}
onClick={onBackClick} onClick={onBackClick}
tabIndex={focusable ? undefined : -1}
> >
<ChevronLeftIcon aria-hidden width={24} height={24} /> <ChevronLeftIcon aria-hidden width={24} height={24} />
</button> </button>
@@ -311,7 +304,6 @@ export const SpotlightTile: FC<Props> = ({
vm={vm} vm={vm}
targetWidth={targetWidth} targetWidth={targetWidth}
targetHeight={targetHeight} targetHeight={targetHeight}
focusable={focusable}
intersectionObserver$={intersectionObserver$} intersectionObserver$={intersectionObserver$}
// This is how we get the container to scroll to the right media // This is how we get the container to scroll to the right media
// when the previous/next buttons are clicked: we temporarily // when the previous/next buttons are clicked: we temporarily
@@ -327,7 +319,6 @@ export const SpotlightTile: FC<Props> = ({
className={classNames(styles.expand)} className={classNames(styles.expand)}
aria-label={"maximise"} aria-label={"maximise"}
onClick={onToggleFullscreen} onClick={onToggleFullscreen}
tabIndex={focusable ? undefined : -1}
> >
<FullScreenIcon aria-hidden width={20} height={20} /> <FullScreenIcon aria-hidden width={20} height={20} />
</button> </button>
@@ -339,7 +330,6 @@ export const SpotlightTile: FC<Props> = ({
expanded ? t("video_tile.collapse") : t("video_tile.expand") expanded ? t("video_tile.collapse") : t("video_tile.expand")
} }
onClick={onToggleExpanded} onClick={onToggleExpanded}
tabIndex={focusable ? undefined : -1}
> >
<ToggleExpandIcon aria-hidden width={20} height={20} /> <ToggleExpandIcon aria-hidden width={20} height={20} />
</button> </button>
@@ -351,7 +341,6 @@ export const SpotlightTile: FC<Props> = ({
className={classNames(styles.advance, styles.next)} className={classNames(styles.advance, styles.next)}
aria-label={t("common.next")} aria-label={t("common.next")}
onClick={onNextClick} onClick={onNextClick}
tabIndex={focusable ? undefined : -1}
> >
<ChevronRightIcon aria-hidden width={24} height={24} /> <ChevronRightIcon aria-hidden width={24} height={24} />
</button> </button>
+1 -2
View File
@@ -39,7 +39,6 @@ import {
localRtcMember, localRtcMember,
} from "./test-fixtures"; } from "./test-fixtures";
import { type RaisedHandInfo, type ReactionInfo } from "../reactions"; import { type RaisedHandInfo, type ReactionInfo } from "../reactions";
import { constant } from "../state/Behavior";
export function getBasicRTCSession( export function getBasicRTCSession(
members: RoomMember[], members: RoomMember[],
@@ -155,7 +154,7 @@ export function getBasicCallViewModelEnvironment(
encryptionSystem: { kind: E2eeType.PER_PARTICIPANT }, encryptionSystem: { kind: E2eeType.PER_PARTICIPANT },
...callViewModelOptions, ...callViewModelOptions,
}, },
constant(ConnectionState.Connected), of(ConnectionState.Connected),
handRaisedSubject$, handRaisedSubject$,
reactionsSubject$, reactionsSubject$,
); );
-2
View File
@@ -360,8 +360,6 @@ export class MockRTCSession extends TypedEventEmitter<
return this; return this;
} }
public updateCallIntent = vitest.fn();
private _membershipStatus = Status.Connected; private _membershipStatus = Status.Connected;
public get membershipStatus(): Status { public get membershipStatus(): Status {
return this._membershipStatus; return this._membershipStatus;
+38 -30
View File
@@ -2793,10 +2793,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@matrix-org/matrix-sdk-crypto-wasm@npm:^15.3.0": "@matrix-org/matrix-sdk-crypto-wasm@npm:^15.1.0":
version: 15.3.0 version: 15.1.0
resolution: "@matrix-org/matrix-sdk-crypto-wasm@npm:15.3.0" resolution: "@matrix-org/matrix-sdk-crypto-wasm@npm:15.1.0"
checksum: 10c0/45628f36b7b0e54a8777ae67a7233dbdf3e3cf14e0d95d21f62f89a7ea7e3f907232f1eb7b1262193b1e227759fad47af829dcccc103ded89011f13c66f01d76 checksum: 10c0/19edc6d0045ff49fad8d77b6e561cee994f7513f8c18a7176ae2d3f0116c1a91980e02d10300b09c2b72dea4da4a8c3392f2bf1752057f2d6b53030a056d76d8
languageName: node languageName: node
linkType: hard linkType: hard
@@ -5290,6 +5290,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/retry@npm:0.12.0":
version: 0.12.0
resolution: "@types/retry@npm:0.12.0"
checksum: 10c0/7c5c9086369826f569b83a4683661557cab1361bac0897a1cefa1a915ff739acd10ca0d62b01071046fe3f5a3f7f2aec80785fe283b75602dc6726781ea3e328
languageName: node
linkType: hard
"@types/sdp-transform@npm:^2.4.5": "@types/sdp-transform@npm:^2.4.5":
version: 2.4.10 version: 2.4.10
resolution: "@types/sdp-transform@npm:2.4.10" resolution: "@types/sdp-transform@npm:2.4.10"
@@ -9521,13 +9528,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"is-network-error@npm:^1.1.0":
version: 1.3.0
resolution: "is-network-error@npm:1.3.0"
checksum: 10c0/3e85a69e957988db66d5af5412efdd531a5a63e150d1bdd5647cfd4dc54fd89b1dbdd472621f8915233c3176ba1e6922afa8a51a9e363ba4693edf96a294f898
languageName: node
linkType: hard
"is-number-object@npm:^1.1.1": "is-number-object@npm:^1.1.1":
version: 1.1.1 version: 1.1.1
resolution: "is-number-object@npm:1.1.1" resolution: "is-number-object@npm:1.1.1"
@@ -10065,8 +10065,8 @@ __metadata:
linkType: hard linkType: hard
"livekit-client@npm:^2.13.0": "livekit-client@npm:^2.13.0":
version: 2.15.7 version: 2.15.6
resolution: "livekit-client@npm:2.15.7" resolution: "livekit-client@npm:2.15.6"
dependencies: dependencies:
"@livekit/mutex": "npm:1.1.1" "@livekit/mutex": "npm:1.1.1"
"@livekit/protocol": "npm:1.39.3" "@livekit/protocol": "npm:1.39.3"
@@ -10079,7 +10079,7 @@ __metadata:
webrtc-adapter: "npm:^9.0.1" webrtc-adapter: "npm:^9.0.1"
peerDependencies: peerDependencies:
"@types/dom-mediacapture-record": ^1 "@types/dom-mediacapture-record": ^1
checksum: 10c0/17ea084565a4fef31038af4ce1aa6951125dc80b78d6d320789d67bfc544d95b6b661032848221758c9ece6dab6ab0e867da683759f11b0bc65a1d94ab27d185 checksum: 10c0/f1ab6cdf2b85647036e9de906734c1394dac497da0bd879a29d0c587c437ada262021478fcef24df99b3489a39d97fe67ab33de0785ed0a63335da2fef577192
languageName: node languageName: node
linkType: hard linkType: hard
@@ -10298,11 +10298,11 @@ __metadata:
linkType: hard linkType: hard
"matrix-js-sdk@github:matrix-org/matrix-js-sdk#head=develop": "matrix-js-sdk@github:matrix-org/matrix-js-sdk#head=develop":
version: 38.3.0 version: 37.13.0
resolution: "matrix-js-sdk@https://github.com/matrix-org/matrix-js-sdk.git#commit=41d70d0b5d3f0eba92686f8089cb329d875b26b5" resolution: "matrix-js-sdk@https://github.com/matrix-org/matrix-js-sdk.git#commit=2f1d654f14be8dd03896e9e76f12017b6f9eec1c"
dependencies: dependencies:
"@babel/runtime": "npm:^7.12.5" "@babel/runtime": "npm:^7.12.5"
"@matrix-org/matrix-sdk-crypto-wasm": "npm:^15.3.0" "@matrix-org/matrix-sdk-crypto-wasm": "npm:^15.1.0"
another-json: "npm:^0.2.0" another-json: "npm:^0.2.0"
bs58: "npm:^6.0.0" bs58: "npm:^6.0.0"
content-type: "npm:^1.0.4" content-type: "npm:^1.0.4"
@@ -10311,11 +10311,11 @@ __metadata:
matrix-events-sdk: "npm:0.0.1" matrix-events-sdk: "npm:0.0.1"
matrix-widget-api: "npm:^1.10.0" matrix-widget-api: "npm:^1.10.0"
oidc-client-ts: "npm:^3.0.1" oidc-client-ts: "npm:^3.0.1"
p-retry: "npm:7" p-retry: "npm:4"
sdp-transform: "npm:^2.14.1" sdp-transform: "npm:^2.14.1"
unhomoglyph: "npm:^1.0.6" unhomoglyph: "npm:^1.0.6"
uuid: "npm:13" uuid: "npm:11"
checksum: 10c0/b48528fec573f3e14d1297f360a56d52d7f313da0d4cf82ab51e4c29798b86995b8a6bd72409779746e7bcf02949bc2788bffa9aba276bfb1a76dbcbe89900a0 checksum: 10c0/ecd019c677c272c5598617dcde407dbe4b1b11460863b2a577e33f3fd8732c9d9073ec0221b471ec1eb24e2839eec20728db7f92c9348be83126547286e50805
languageName: node languageName: node
linkType: hard linkType: hard
@@ -10922,12 +10922,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"p-retry@npm:7": "p-retry@npm:4":
version: 7.0.0 version: 4.6.2
resolution: "p-retry@npm:7.0.0" resolution: "p-retry@npm:4.6.2"
dependencies: dependencies:
is-network-error: "npm:^1.1.0" "@types/retry": "npm:0.12.0"
checksum: 10c0/3c090ac72bbe00fd2f062ee6178c44f7302f298936ab2290a458575e73650e7834b556beb2b09fa9fbebedab2ec3358cb474c09710cf828972b670c3c0cb89e4 retry: "npm:^0.13.1"
checksum: 10c0/d58512f120f1590cfedb4c2e0c42cb3fa66f3cea8a4646632fcb834c56055bb7a6f138aa57b20cc236fb207c9d694e362e0b5c2b14d9b062f67e8925580c73b0
languageName: node languageName: node
linkType: hard linkType: hard
@@ -12229,6 +12230,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"retry@npm:^0.13.1":
version: 0.13.1
resolution: "retry@npm:0.13.1"
checksum: 10c0/9ae822ee19db2163497e074ea919780b1efa00431d197c7afdb950e42bf109196774b92a49fc9821f0b8b328a98eea6017410bfc5e8a0fc19c85c6d11adb3772
languageName: node
linkType: hard
"reusify@npm:^1.0.4": "reusify@npm:^1.0.4":
version: 1.1.0 version: 1.1.0
resolution: "reusify@npm:1.1.0" resolution: "reusify@npm:1.1.0"
@@ -13758,12 +13766,12 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"uuid@npm:13": "uuid@npm:11":
version: 13.0.0 version: 11.0.5
resolution: "uuid@npm:13.0.0" resolution: "uuid@npm:11.0.5"
bin: bin:
uuid: dist-node/bin/uuid uuid: dist/esm/bin/uuid
checksum: 10c0/950e4c18d57fef6c69675344f5700a08af21e26b9eff2bf2180427564297368c538ea11ac9fb2e6528b17fc3966a9fd2c5049361b0b63c7d654f3c550c9b3d67 checksum: 10c0/6f59f0c605e02c14515401084ca124b9cb462b4dcac866916a49862bcf831874508a308588c23a7718269226ad11a92da29b39d761ad2b86e736623e3a33b6e7
languageName: node languageName: node
linkType: hard linkType: hard