ffi: Expose a check for LiveKit RTC support.

This commit is contained in:
Doug
2025-06-04 14:05:01 +01:00
committed by Damir Jelić
parent ea28234d95
commit bdb640a126
2 changed files with 15 additions and 1 deletions
+1
View File
@@ -39,6 +39,7 @@ Breaking changes:
- `RoomInfo` replaces its field `is_tombstoned: bool` with `tombstone: Option<RoomTombstoneInfo>`,
containing the data needed to implement the room migration UI, a message and the replacement room id.
([#5027](https://github.com/matrix-org/matrix-rust-sdk/pull/5027))
- `Client::reset_server_capabilities` has been renamed to `Client::reset_server_info`.
Additions:
+14 -1
View File
@@ -19,7 +19,10 @@ use matrix_sdk::{
},
ruma::{
api::client::{
discovery::get_authorization_server_metadata::msc2965::Prompt as RumaOidcPrompt,
discovery::{
discover_homeserver::RtcFocusInfo,
get_authorization_server_metadata::msc2965::Prompt as RumaOidcPrompt,
},
push::{EmailPusherData, PusherIds, PusherInit, PusherKind as RumaPusherKind},
room::{create_room, Visibility},
session::get_login_types,
@@ -1489,6 +1492,16 @@ impl Client {
Ok(self.inner.server_versions().await?.contains(&ruma::api::MatrixVersion::V1_13))
}
/// Checks if the server supports the LiveKit RTC focus for placing calls.
pub async fn is_livekit_rtc_supported(&self) -> Result<bool, ClientError> {
Ok(self
.inner
.rtc_foci()
.await?
.iter()
.any(|focus| matches!(focus, RtcFocusInfo::LiveKit(_))))
}
/// Subscribe to changes in the media preview configuration.
pub async fn subscribe_to_media_preview_config(
&self,