-
Notifications
You must be signed in to change notification settings - Fork 230
WebRTC m144 #911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
WebRTC m144 #911
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b1abd69
refactor: deprecate disabled degradation pref
pblazej 5436258
build: update WebRTC to 144 and add Swift 6.2 package
pblazej 992dbcb
ci: remove visionOS Simulator from the CI test matrix
pblazej ffd8a14
fix: add conditional import for LiveKitTestSupport to improve build c…
pblazej 663a11a
build: update webrtc pre-release version
pblazej 45ce816
Merge branch 'main' into blaze/webrtc-m144
pblazej 03edad9
warp: pass value from sdk
pblazej 9103a15
Merge branch 'main' into blaze/webrtc-m144
pblazej 79fe355
deps: update to final version
pblazej 665c607
changes
pblazej File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| minor type="changed" "Update WebRTC to m144" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, | ||
| ] | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,6 +96,9 @@ actor RTC { | |
|
|
||
| Room.log("Initializing PeerConnectionFactory...") | ||
|
|
||
| // Enable DTLS during ICE handshake for faster connection setup. | ||
| LKRTCPeerConnectionFactory.configureFieldTrials("WebRTC-IceHandshakeDtls/Enabled/") | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a bit awkward (static), mostly due to multiple |
||
|
|
||
| return LKRTCPeerConnectionFactory(audioDeviceModuleType: admType.toRTCType(), | ||
| bypassVoiceProcessing: bypassVoiceProcessing, | ||
| encoderFactory: encoderFactory, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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") | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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