New way to configure livekit
This commit is contained in:
@@ -26,7 +26,7 @@ pub(crate) async fn well_known_client(
|
|||||||
// Add RTC transport configuration if available (MSC4143 / Element Call)
|
// Add RTC transport configuration if available (MSC4143 / Element Call)
|
||||||
// Element Call has evolved through several versions with different field
|
// Element Call has evolved through several versions with different field
|
||||||
// expectations
|
// expectations
|
||||||
let rtc_foci = services
|
let mut rtc_foci: Vec<_> = services
|
||||||
.server
|
.server
|
||||||
.config
|
.config
|
||||||
.well_known
|
.well_known
|
||||||
@@ -51,6 +51,10 @@ pub(crate) async fn well_known_client(
|
|||||||
})
|
})
|
||||||
.inspect_err(inspect_log)?;
|
.inspect_err(inspect_log)?;
|
||||||
|
|
||||||
|
if let Some(livekit_url) = &services.config.well_known.livekit_url {
|
||||||
|
rtc_foci.push(RtcFocusInfo::livekit(livekit_url.clone()));
|
||||||
|
}
|
||||||
|
|
||||||
Ok(discover_homeserver::Response {
|
Ok(discover_homeserver::Response {
|
||||||
rtc_foci,
|
rtc_foci,
|
||||||
..discover_homeserver::Response::new(homeserver)
|
..discover_homeserver::Response::new(homeserver)
|
||||||
|
|||||||
@@ -2363,14 +2363,26 @@ pub struct WellKnownConfig {
|
|||||||
/// example "@admin:example.com"
|
/// example "@admin:example.com"
|
||||||
pub support_mxid: Option<OwnedUserId>,
|
pub support_mxid: Option<OwnedUserId>,
|
||||||
|
|
||||||
/// Element Call / MatrixRTC configuration (MSC4143).
|
/// LiveKit JWT endpoint.
|
||||||
/// Configures the LiveKit SFU server for voice/video calls.
|
/// Required for Element Call / MatrixRTC (MSC4143).
|
||||||
///
|
|
||||||
/// Requires a LiveKit server with JWT authentication.
|
|
||||||
/// The `livekit_service_url` should point to your LiveKit JWT endpoint.
|
|
||||||
///
|
///
|
||||||
/// Note: You must also set `client` above to your homeserver URL.
|
/// Note: You must also set `client` above to your homeserver URL.
|
||||||
///
|
///
|
||||||
|
/// default: ""
|
||||||
|
#[serde(default)]
|
||||||
|
pub livekit_url: Option<String>,
|
||||||
|
|
||||||
|
/// Custom MatrixRTC transports.
|
||||||
|
///
|
||||||
|
/// If you're looking to setup Element Call / MatrixRTC with Livekit,
|
||||||
|
/// you should not use this option and instead set `livekit_url`.
|
||||||
|
/// This is only required if you want to configure a non-livekit MatrixRTC
|
||||||
|
/// transport. There are no known client implementations that support any
|
||||||
|
/// other transport types.
|
||||||
|
///
|
||||||
|
/// This option was previously the only way to configure a Livekit
|
||||||
|
/// transport. It has been superseded by `livekit_url`.
|
||||||
|
///
|
||||||
/// Example:
|
/// Example:
|
||||||
/// ```toml
|
/// ```toml
|
||||||
/// [global.well_known]
|
/// [global.well_known]
|
||||||
|
|||||||
@@ -2017,14 +2017,24 @@
|
|||||||
#
|
#
|
||||||
#support_mxid =
|
#support_mxid =
|
||||||
|
|
||||||
# Element Call / MatrixRTC configuration (MSC4143).
|
# LiveKit JWT endpoint.
|
||||||
# Configures the LiveKit SFU server for voice/video calls.
|
# Required for Element Call / MatrixRTC (MSC4143).
|
||||||
#
|
|
||||||
# Requires a LiveKit server with JWT authentication.
|
|
||||||
# The `livekit_service_url` should point to your LiveKit JWT endpoint.
|
|
||||||
#
|
#
|
||||||
# Note: You must also set `client` above to your homeserver URL.
|
# Note: You must also set `client` above to your homeserver URL.
|
||||||
#
|
#
|
||||||
|
#livekit_url = ""
|
||||||
|
|
||||||
|
# Custom MatrixRTC transports.
|
||||||
|
#
|
||||||
|
# If you're looking to setup Element Call / MatrixRTC with Livekit,
|
||||||
|
# you should not use this option and instead set `livekit_url`.
|
||||||
|
# This is only required if you want to configure a non-livekit MatrixRTC
|
||||||
|
# transport. There are no known client implementations that support any
|
||||||
|
# other transport types.
|
||||||
|
#
|
||||||
|
# This option was previously the only way to configure a Livekit
|
||||||
|
# transport. It has been superseded by `livekit_url`.
|
||||||
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# ```toml
|
# ```toml
|
||||||
# [global.well_known]
|
# [global.well_known]
|
||||||
|
|||||||
Reference in New Issue
Block a user