Expose isLiveKitRTCSupported on the ClientProxy. (#4238)

This commit is contained in:
Doug
2025-06-23 11:21:36 +01:00
committed by GitHub
parent 5579f97886
commit 5b3e045e3c
8 changed files with 83 additions and 37 deletions
@@ -97,6 +97,7 @@ extension ClientProxyMock {
userIdentityForReturnValue = .success(UserIdentityProxyMock(configuration: .init()))
underlyingIsReportRoomSupported = true
underlyingIsLiveKitRTCSupported = true
underlyingTimelineMediaVisibilityPublisher = CurrentValueSubject<TimelineMediaVisibility, Never>(configuration.timelineMediaVisibility).asCurrentValuePublisher()
underlyingHideInviteAvatarsPublisher = CurrentValueSubject<Bool, Never>(configuration.hideInviteAvatars).asCurrentValuePublisher()
@@ -2330,6 +2330,23 @@ class ClientProxyMock: ClientProxyProtocol, @unchecked Sendable {
}
var underlyingIsReportRoomSupported: Bool!
var isReportRoomSupportedClosure: (() async -> Bool)?
var isLiveKitRTCSupportedCallsCount = 0
var isLiveKitRTCSupportedCalled: Bool {
return isLiveKitRTCSupportedCallsCount > 0
}
var isLiveKitRTCSupported: Bool {
get async {
isLiveKitRTCSupportedCallsCount += 1
if let isLiveKitRTCSupportedClosure = isLiveKitRTCSupportedClosure {
return await isLiveKitRTCSupportedClosure()
} else {
return underlyingIsLiveKitRTCSupported
}
}
}
var underlyingIsLiveKitRTCSupported: Bool!
var isLiveKitRTCSupportedClosure: (() async -> Bool)?
//MARK: - isOnlyDeviceLeft