Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions env.d/development/common.dist
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ OIDC_RS_CLIENT_SECRET=ThisIsAnExampleKeyForDevPurposeOnly
LIVEKIT_API_SECRET=secret
LIVEKIT_API_KEY=devkey
LIVEKIT_API_URL=http://127.0.0.1.nip.io:7880
LIVEKIT_INTERNAL_URL=http://livekit:7880
LIVEKIT_VERIFY_SSL=False
ALLOW_UNREGISTERED_ROOMS=False

Expand Down
6 changes: 5 additions & 1 deletion src/backend/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ def create_livekit_client(custom_configuration=None):
custom_session = aiohttp.ClientSession(connector=connector)

# Use default configuration if none provided
configuration = custom_configuration or settings.LIVEKIT_CONFIGURATION
configuration = {
**(custom_configuration or settings.LIVEKIT_CONFIGURATION),
"url": settings.LIVEKIT_INTERNAL_URL
or (custom_configuration or settings.LIVEKIT_CONFIGURATION)["url"],
}
Comment on lines +215 to +219
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s a bit hard to follow, something like this might be clearer with an explicit comment:

Suggested change
configuration = {
**(custom_configuration or settings.LIVEKIT_CONFIGURATION),
"url": settings.LIVEKIT_INTERNAL_URL
or (custom_configuration or settings.LIVEKIT_CONFIGURATION)["url"],
}
configuration = custom_configuration or settings.LIVEKIT_CONFIGURATION
# ... clear commment it's necessary for the docker compose stack
if settings.LIVEKIT_INTERNAL_URL is not None:
configuration["url"] = settings.LIVEKIT_INTERNAL_URL


return LiveKitAPI(session=custom_session, **configuration)

Expand Down
5 changes: 5 additions & 0 deletions src/backend/meet/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,11 @@ class Base(Configuration):
),
"url": values.Value(environ_name="LIVEKIT_API_URL", environ_prefix=None),
}
# Internal URL for server-to-server LiveKit API calls (e.g. container-to-container).
# Defaults to LIVEKIT_API_URL when not set.
LIVEKIT_INTERNAL_URL = values.Value(
"", environ_name="LIVEKIT_INTERNAL_URL", environ_prefix=None
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default shoud be None, not ""

)
LIVEKIT_FORCE_WSS_PROTOCOL = values.BooleanValue(
False, environ_name="LIVEKIT_FORCE_WSS_PROTOCOL", environ_prefix=None
)
Expand Down
Loading