fix(calls): ship LiveKit fallback in Element Call config

Well-known fetch fails CORS on IPv4 (Wix redirect), so the embedded
widget needs the JWT service URL in its own config.json.
This commit is contained in:
Sedat Qaja
2026-10-21 18:37:21 +02:00
parent 11e3f90c81
commit 04ccaf3e78
2 changed files with 22 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
{
"matrix_rtc_session": {
"wait_for_key_rotation_ms": 5000,
"delayed_leave_event_restart_ms": 4000,
"delayed_leave_event_delay_ms": 18000
},
"livekit": {
"livekit_service_url": "https://matrix.healthchat.ch/livekit-jwt-service"
}
}
+12
View File
@@ -728,6 +728,18 @@ export default (env: string, argv: Record<string, any>): webpack.Configuration =
context: path.join(getPackageRoot("@element-hq/element-call-embedded"), "dist"),
to: path.join(__dirname, "webapp", "widgets", "element-call"),
},
// HealthChat: overwrite the embedded Element Call config with one that carries a
// LiveKit fallback. Element Call fetches https://healthchat.ch/.well-known/matrix/client
// itself from the widget origin; over IPv4 that host is served by Wix, which answers
// a 301 to matrix.healthchat.ch without an Access-Control-Allow-Origin header, so
// the fetch fails CORS on IPv4-only networks and Element Call falls back to this
// file. Without the livekit block it errors with MISSING_MATRIX_RTC_TRANSPORT.
// Keep the matrix_rtc_session timers in sync with what the package ships.
{
from: "res/element-call-config.json",
to: path.join(__dirname, "webapp", "widgets", "element-call", "config.json"),
force: true,
},
// Mobile guide assets
{
from: "assets/**",