Open
Conversation
Mirror native preconnect timing into JS and cover the recorder flow with tests so early-recording behavior is easier to validate on iOS.
|
Author
|
@davidliu can you review this 🙌 |
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
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.
Summary
Add an iOS-only public API for explicitly starting and stopping local microphone recording before publish/connect. The native bridge now emits
LK_AUDIO_RECORDING_STATE, giving apps a concrete recording boundary they can use for "talk now" UX instead of inferring readiness from earlier setup.Changes
JS API surface
AudioSession.startLocalRecording()andAudioSession.stopLocalRecording()LK_AUDIO_RECORDING_STATEin the JS native event registryiOS bridge and recording control
startLocalRecordingandstopLocalRecordingthroughLivekitReactNativeModulelocal_recording_start_requested,local_recording_started,local_recording_start_failed, andlocal_recording_stoppedLKAudioProcessingManagerwrappers that start and stop recording through WebRTC'saudioDeviceModuleCleanup
NSLogoutput fromAudioSinkRendererTesting & Validation
yarn test src/audio/AudioSession.test.ts --runInBand./node_modules/.bin/tsc --noemit -p tsconfig.build.json./node_modules/.bin/eslint src/audio/AudioSession.ts src/audio/AudioSession.test.ts src/audio/MediaRecorder.ts src/events/EventEmitter.ts --max-warnings 0yarn preparexcodebuild -project ios/LivekitReactNative.xcodeproj -scheme LivekitReactNative -configuration Debug -sdk iphonesimulator build CODE_SIGNING_ALLOWED=NONotes for Reviewers
feat: preconnect audio buffer) by exposing a product-facing recording boundary rather than relying on earlier recorder setup state.