mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-10-31 08:15:07 +00:00
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:
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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/**",
|
||||
|
||||
Reference in New Issue
Block a user