diff --git a/.changes/vision-26 b/.changes/vision-26 new file mode 100644 index 000000000..50e270457 --- /dev/null +++ b/.changes/vision-26 @@ -0,0 +1 @@ +minor type="changed" "Changed minimal supported visionOS version to 26 due to WebRTC dependencies" diff --git a/.changes/webrtc-m144 b/.changes/webrtc-m144 new file mode 100644 index 000000000..cdaa12646 --- /dev/null +++ b/.changes/webrtc-m144 @@ -0,0 +1 @@ +minor type="changed" "Update WebRTC to m144" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ce9ef699e..349e4bc13 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -51,9 +51,6 @@ jobs: - os: macos-15 xcode: 16.4 platform: "macOS,variant=Mac Catalyst" - - os: macos-15 - xcode: 16.4 - platform: "visionOS Simulator,name=Apple Vision Pro,OS=2.5" - os: macos-15 xcode: 16.4 platform: "tvOS Simulator,name=Apple TV,OS=18.5" diff --git a/LiveKitClient.podspec b/LiveKitClient.podspec index d381008db..d731224a4 100644 --- a/LiveKitClient.podspec +++ b/LiveKitClient.podspec @@ -14,7 +14,7 @@ Pod::Spec.new do |spec| spec.source_files = "Sources/**/*" - spec.dependency("LiveKitWebRTC", "= 137.7151.12") + spec.dependency("LiveKitWebRTC", "= 144.7559.01") spec.dependency("LiveKitUniFFI", "= 0.0.5") spec.dependency("SwiftProtobuf") spec.dependency("DequeModule", "= 1.1.4") diff --git a/Package.swift b/Package.swift index cd784b550..64ebe29fe 100644 --- a/Package.swift +++ b/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // LK-Prefixed Dynamic WebRTC XCFramework - .package(url: "https://github.com/livekit/webrtc-xcframework.git", exact: "137.7151.12"), + .package(url: "https://github.com/livekit/webrtc-xcframework.git", exact: "144.7559.01"), .package(url: "https://github.com/livekit/livekit-uniffi-xcframework.git", exact: "0.0.5"), .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.31.0"), .package(url: "https://github.com/apple/swift-collections.git", "1.1.0" ..< "1.3.0"), diff --git a/Package@swift-6.0.swift b/Package@swift-6.0.swift index 58f5a646e..debe7873a 100644 --- a/Package@swift-6.0.swift +++ b/Package@swift-6.0.swift @@ -9,7 +9,6 @@ let package = Package( .iOS(.v13), .macOS(.v10_15), .macCatalyst(.v14), - .visionOS(.v2), .tvOS(.v17), ], products: [ @@ -20,7 +19,7 @@ let package = Package( ], dependencies: [ // LK-Prefixed Dynamic WebRTC XCFramework - .package(url: "https://github.com/livekit/webrtc-xcframework.git", exact: "137.7151.12"), + .package(url: "https://github.com/livekit/webrtc-xcframework.git", exact: "144.7559.01"), .package(url: "https://github.com/livekit/livekit-uniffi-xcframework.git", exact: "0.0.5"), .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.31.0"), .package(url: "https://github.com/apple/swift-collections.git", "1.1.0" ..< "1.3.0"), diff --git a/Package@swift-6.2.swift b/Package@swift-6.2.swift new file mode 100644 index 000000000..a3797d98f --- /dev/null +++ b/Package@swift-6.2.swift @@ -0,0 +1,88 @@ +// swift-tools-version:6.2 +// (Xcode26.0+) + +import PackageDescription + +let package = Package( + name: "LiveKit", + platforms: [ + .iOS(.v13), + .macOS(.v10_15), + .macCatalyst(.v14), + .tvOS(.v17), + .visionOS(.v26), + ], + products: [ + .library( + name: "LiveKit", + targets: ["LiveKit"] + ), + ], + dependencies: [ + // LK-Prefixed Dynamic WebRTC XCFramework + .package(url: "https://github.com/livekit/webrtc-xcframework.git", exact: "144.7559.01"), + .package(url: "https://github.com/livekit/livekit-uniffi-xcframework.git", exact: "0.0.5"), + .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.31.0"), + .package(url: "https://github.com/apple/swift-collections.git", "1.1.0" ..< "1.3.0"), + // Only used for DocC generation + .package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.3.0"), + ], + targets: [ + .target( + name: "LKObjCHelpers", + publicHeadersPath: "include" + ), + .target( + name: "LiveKit", + dependencies: [ + .product(name: "LiveKitWebRTC", package: "webrtc-xcframework"), + .product(name: "LiveKitUniFFI", package: "livekit-uniffi-xcframework"), + .product(name: "SwiftProtobuf", package: "swift-protobuf"), + .product(name: "DequeModule", package: "swift-collections"), + .product(name: "OrderedCollections", package: "swift-collections"), + "LKObjCHelpers", + ], + exclude: [ + "Broadcast/NOTICE", + ], + resources: [ + .process("PrivacyInfo.xcprivacy"), + ], + swiftSettings: [ + .enableExperimentalFeature("AccessLevelOnImport"), + ] + ), + .target( + name: "LiveKitTestSupport", + dependencies: [ + "LiveKit", + ], + path: "Tests/LiveKitTestSupport" + ), + .testTarget( + name: "LiveKitCoreTests", + dependencies: [ + "LiveKit", + "LiveKitTestSupport", + ] + ), + .testTarget( + name: "LiveKitAudioTests", + dependencies: [ + "LiveKit", + "LiveKitTestSupport", + ] + ), + .testTarget( + name: "LiveKitObjCTests", + dependencies: [ + "LiveKit", + "LiveKitTestSupport", + ] + ), + ], + swiftLanguageModes: [ + .v5, // opt-out from dynamic actor isolation checks + .v6, + ] +) diff --git a/Sources/LiveKit/Core/RTC.swift b/Sources/LiveKit/Core/RTC.swift index 8e306e176..b843c44a3 100644 --- a/Sources/LiveKit/Core/RTC.swift +++ b/Sources/LiveKit/Core/RTC.swift @@ -96,6 +96,9 @@ actor RTC { Room.log("Initializing PeerConnectionFactory...") + // Enable DTLS during ICE handshake for faster connection setup. + LKRTCPeerConnectionFactory.configureFieldTrials("WebRTC-IceHandshakeDtls/Enabled/") + return LKRTCPeerConnectionFactory(audioDeviceModuleType: admType.toRTCType(), bypassVoiceProcessing: bypassVoiceProcessing, encoderFactory: encoderFactory, diff --git a/Sources/LiveKit/Types/DegradationPreference.swift b/Sources/LiveKit/Types/DegradationPreference.swift index 3440360d7..20fd271f4 100644 --- a/Sources/LiveKit/Types/DegradationPreference.swift +++ b/Sources/LiveKit/Types/DegradationPreference.swift @@ -20,21 +20,25 @@ internal import LiveKitWebRTC public enum DegradationPreference: Int, Sendable { /// The SDK will decide which preference is suitable or will use WebRTC's default implementation. case auto + @available(*, deprecated, renamed: "maintainFramerateAndResolution") case disabled /// Prefer to maintain FPS rather than resolution. case maintainFramerate /// Prefer to maintain resolution rather than FPS. case maintainResolution case balanced + /// Prefer to maintain both FPS and resolution. + case maintainFramerateAndResolution } extension DegradationPreference { func toRTCType() -> LKRTCDegradationPreference? { switch self { case .auto: nil - case .disabled: .disabled + case .disabled: .maintainFramerateAndResolution case .maintainFramerate: .maintainFramerate case .maintainResolution: .maintainResolution + case .maintainFramerateAndResolution: .maintainFramerateAndResolution case .balanced: .balanced } } diff --git a/Tests/LiveKitCoreTests/RegionManagerTests.swift b/Tests/LiveKitCoreTests/RegionManagerTests.swift index 174b9625d..739498449 100644 --- a/Tests/LiveKitCoreTests/RegionManagerTests.swift +++ b/Tests/LiveKitCoreTests/RegionManagerTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif import XCTest class RegionManagerTests: XCTestCase {