forked from livekit/client-sdk-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
merge #1
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
merge #1
Conversation
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
**Audio Engine Availability Control:** * Added `AudioEngineAvailability` struct and related conversion extensions in `AudioEngineAvailability.swift` to represent and manage input/output availability for the audio engine. * Introduced `setEngineAvailability(_:)` and `engineAvailability` API to `AudioManager`, providing high-priority control over the engine's running state. * Updated publishing logic in `LocalParticipant` to only wait for audio frames if input is available, respecting the new availability controls. **Testing and Documentation:** * Added `AudioEngineAvailabilityTests` to verify that the audio engine stops and resumes correctly when availability is toggled, ensuring robust behavior. * Added a helper sleep extension to `LKTestCase` to support async test scenarios. **Dependency Updates:** * Updated `LiveKitWebRTC` dependency to version `137.7151.08` in `LiveKitClient.podspec`, `Package.swift`, and `[email protected]` to support the new audio engine availability features. [[1]](diffhunk://#diff-cd792874225249a1976737e2b629c17cc7c8bb8de175a12d6b93a4e49b33dedbL17-R17) [[2]](diffhunk://#diff-f913940c58e8744a2af1c68b909bb6383e49007e6c5a12fb03104a9006ae677eL22-R22) [[3]](diffhunk://#diff-8e7a2b05a09a07931d721896a66b6648bf9cc39fa80e2b4f65f3cdd6c8e553abL23-R23) Other minor changes include internal test updates to use `ObjCBool` for engine state properties.
Resolves #757 - Adds cancellation to reconnect, making sure that it cannot continue after `disconnect()` and bring the room back to life -⚠️ Optionally, we can introduce a breaking `.disconnecting` state to prevent new tasks from being started (vs cancelling ongoing tasks - a little _less elegant_) - Theoretically it should not affect other state transitions, as `disconnect()` is basically "destructive" - the only valid path leads to `.disconnected` during `cleanup()`, however that's not statically enforced in any way - On the other hand, it does not provide any added value for other parts of the SDK, just covering this tiny time window
Move audio recording perms checks from SDK to WebRTC. Patch: webrtc-sdk/webrtc#200 A simple way to test this would be trying to enable mic while in a phone call. AVAudioSession activation fail will be detected in the lib, and report error instead of crashing.
- Adds data channel encryption based on livekit/client-sdk-js#1595 - Adds `currentKey` state to `BaseKeyProvider` - It was missing comparing to other platforms, and we cannot explicitly default to `0` - Adds some integration tests, as most of the _crypto_ stuff is tested by webrtc - Existing hi-level tests e.g. data streams will get a `sharedKey` by default 🎉 ### Migration/deprecations - Replace `E2EEOptions` with `EncryptionOptions` (1:1) - Add `EncryptionType` parameter to `Room/ParticipantDelegate` methods --------- Co-authored-by: Hiroshi Horie <[email protected]>
Mirrors Android setup for easier/more consistent tracking. Keeps the generated files, you don't need to install anything in order to build...
I didn't get the feedback on the actual runtime errors yet, but I believe it's still worth merging - as a decent technical change (removing `Unsafe...`). I don't see any obvious mistakes in the existing code either.
This reverts commit 9b567f8.
So that it can be resolved by SPM for a fresh build.
Discovered while moving tests: - `OutgoingStreamManagerTests` - `ByteStreamInfoTests`
Problem The testSerialRunnerCancel() test was failing with the counter ending up negative (-1, -8, etc.) instead of the expected 0, indicating a race condition. Root Cause The condition !Task.isCancelled was causing cancelled tasks to skip waiting for the previous task to complete. This broke the serial execution guarantee, allowing multiple blocks to run concurrently and causing unsynchronized access to the shared counter. Fix Removed the !Task.isCancelled condition to ensure all tasks wait for the previous task, even when cancelled. This maintains the serial ordering guarantee that the actor is designed to provide. --------- Co-authored-by: Błażej Pankowski <[email protected]>
Let's try to separate on-device tests from the core suite (with proper retry, timeout, etc.).
Turns out that the configuration closure: - must be run _before_ any logs (expected) - this is kinda fixable - may run once per process, so will break for anyone using the same framework... and we cannot do any default setup If we need the flexibility anyway, maybe it's better to drop the `swift-logging` right now... My assupmtions: - we use pure OSLog by default (info or warning) - we can easily enable rtc internal logs via the same channel - we can easily provide our custom implementation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
merge upper stream branch