Open source video conferencing app powered by LiveKit. Built with Django and React.
🩹(backend) allow enforcing WSS protocol to resolve browser compatibility
lebaudantoine162896c93cf2
diff --git a/docs/installation.md b/docs/installation.mdindex 03c0b8a7..d1fc87e0 100644--- a/docs/installation.md+++ b/docs/installation.md@@ -336,6 +336,7 @@ These are the environmental options available on meet backend.| LIVEKIT_API_SECRET | LiveKit API secret | || LIVEKIT_API_URL | LiveKit API URL | || LIVEKIT_VERIFY_SSL | Verify SSL for LiveKit connections | true |+| LIVEKIT_FORCE_WSS_PROTOCOL | Enables WSS protocol conversion for legacy browser compatibility (Firefox <124, Chrome <125, Edge <125) where HTTPS URLs fail in WebSocket() constructor. | false || RESOURCE_DEFAULT_ACCESS_LEVEL | Default resource access level for rooms | public || ALLOW_UNREGISTERED_ROOMS | Allow usage of unregistered rooms | true || RECORDING_ENABLE | Record meeting option | false |diff --git a/src/backend/core/api/__init__.py b/src/backend/core/api/__init__.pyindex beb0ec3b..5e400ca0 100644--- a/src/backend/core/api/__init__.py+++ b/src/backend/core/api/__init__.py@@ -52,6 +52,7 @@ def get_frontend_configuration(request):},"livekit": {"url": settings.LIVEKIT_CONFIGURATION["url"],+ "force_wss_protocol": settings.LIVEKIT_FORCE_WSS_PROTOCOL,"enable_firefox_proxy_workaround": settings.LIVEKIT_ENABLE_FIREFOX_PROXY_WORKAROUND,},}diff --git a/src/backend/meet/settings.py b/src/backend/meet/settings.pyindex f3ad1648..a7f4af11 100755--- a/src/backend/meet/settings.py+++ b/src/backend/meet/settings.py@@ -492,6 +492,9 @@ class Base(Configuration):),"url": values.Value(environ_name="LIVEKIT_API_URL", environ_prefix=None),}+ LIVEKIT_FORCE_WSS_PROTOCOL = values.BooleanValue(+ False, environ_name="LIVEKIT_FORCE_WSS_PROTOCOL", environ_prefix=None+ )LIVEKIT_ENABLE_FIREFOX_PROXY_WORKAROUND = values.BooleanValue(environ_name="LIVEKIT_ENABLE_FIREFOX_PROXY_WORKAROUND",environ_prefix=None,diff --git a/src/frontend/src/api/useConfig.ts b/src/frontend/src/api/useConfig.tsindex 887c6223..3dc4feb5 100644--- a/src/frontend/src/api/useConfig.ts+++ b/src/frontend/src/api/useConfig.ts@@ -39,6 +39,7 @@ export interface ApiConfig {manifest_link?: stringlivekit: {url: string+ force_wss_protocol: booleanenable_firefox_proxy_workaround: boolean}}diff --git a/src/frontend/src/features/rooms/components/Conference.tsx b/src/frontend/src/features/rooms/components/Conference.tsxindex 4e71df70..824f91eb 100644--- a/src/frontend/src/features/rooms/components/Conference.tsx+++ b/src/frontend/src/features/rooms/components/Conference.tsx@@ -162,6 +162,20 @@ export const Conference = ({kind: null,})+ /*+ * Ensure stable WebSocket connection URL. This is critical for legacy browser compatibility+ * (Firefox <124, Chrome <125, Edge <125) where HTTPS URLs in WebSocket() constructor+ * may fail - the force_wss_protocol flag allows explicit WSS protocol conversion+ */+ const serverUrl = useMemo(() => {+ const livekit_url = apiConfig?.livekit.url+ if (!livekit_url) return+ if (apiConfig?.livekit.force_wss_protocol) {+ return livekit_url.replace('https://', 'wss://')+ }+ return livekit_url+ }, [apiConfig?.livekit])+const { t } = useTranslation('rooms')if (isCreateError) {// this error screen should be replaced by a proper waiting room for anonymous user.@@ -185,7 +199,7 @@ export const Conference = ({<Screen header={false} footer={false}><LiveKitRoomroom={room}- serverUrl={apiConfig?.livekit.url}+ serverUrl={serverUrl}token={data?.livekit?.token}connect={isConnectionWarmedUp}audio={userConfig.audioEnabled}diff --git a/src/helm/env.d/dev-keycloak/values.meet.yaml.gotmpl b/src/helm/env.d/dev-keycloak/values.meet.yaml.gotmplindex 3febd59c..bc1a9e31 100644--- a/src/helm/env.d/dev-keycloak/values.meet.yaml.gotmpl+++ b/src/helm/env.d/dev-keycloak/values.meet.yaml.gotmpl@@ -49,6 +49,7 @@ backend:{{- end }}{{- end }}LIVEKIT_API_URL: https://livekit.127.0.0.1.nip.io/+ LIVEKIT_FORCE_WSS_PROTOCOL: TrueLIVEKIT_ENABLE_FIREFOX_PROXY_WORKAROUND: TrueALLOW_UNREGISTERED_ROOMS: FalseFRONTEND_SILENCE_LIVEKIT_DEBUG: False