Skip to content
Merged
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 .changes/vision-26
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
minor type="changed" "Changed minimal supported visionOS version to 26 due to WebRTC dependencies"
1 change: 1 addition & 0 deletions .changes/webrtc-m144
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
minor type="changed" "Update WebRTC to m144"
3 changes: 0 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion LiveKitClient.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
3 changes: 1 addition & 2 deletions Package@swift-6.0.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ let package = Package(
.iOS(.v13),
.macOS(.v10_15),
.macCatalyst(.v14),
.visionOS(.v2),
.tvOS(.v17),
],
products: [
Expand All @@ -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"),
Expand Down
88 changes: 88 additions & 0 deletions Package@swift-6.2.swift

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is to support visionOS v26, I hope we'll drop Swift 5.9 soon https://developer.apple.com/news/upcoming-requirements/?id=02032026a

Original file line number Diff line number Diff line change
@@ -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,
]
)
3 changes: 3 additions & 0 deletions Sources/LiveKit/Core/RTC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ actor RTC {

Room.log("Initializing PeerConnectionFactory...")

// Enable DTLS during ICE handshake for faster connection setup.
LKRTCPeerConnectionFactory.configureFieldTrials("WebRTC-IceHandshakeDtls/Enabled/")

@pblazej pblazej Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's a bit awkward (static), mostly due to multiple [init] paths in PC, but I think we can live with that.


return LKRTCPeerConnectionFactory(audioDeviceModuleType: admType.toRTCType(),
bypassVoiceProcessing: bypassVoiceProcessing,
encoderFactory: encoderFactory,
Expand Down
6 changes: 5 additions & 1 deletion Sources/LiveKit/Types/DegradationPreference.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")

@pblazej pblazej Feb 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed from the header

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
}
}
Expand Down
2 changes: 2 additions & 0 deletions Tests/LiveKitCoreTests/RegionManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
*/

@testable import LiveKit
#if canImport(LiveKitTestSupport)
import LiveKitTestSupport
#endif
import XCTest

class RegionManagerTests: XCTestCase {
Expand Down
Loading