Skip to content

Conversation

@ipavlidakis
Copy link
Contributor

@ipavlidakis ipavlidakis commented Oct 16, 2025

Depends on #976

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero ⚠️ policy (required)
  • This change should receive manual QA
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (tutorial, CMS)

@ipavlidakis ipavlidakis self-assigned this Oct 16, 2025
@ipavlidakis ipavlidakis added the enhancement New feature or request label Oct 16, 2025
@ipavlidakis ipavlidakis changed the base branch from develop to enhancement/hifi/implement-store-coordinator October 16, 2025 10:31
@github-actions
Copy link

github-actions bot commented Oct 16, 2025

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/implement-store-coordinator branch from 85513ae to e2789fd Compare October 16, 2025 14:21
@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/implement-rtcaudio-store-as-store branch from 6d4ad42 to 7ae8feb Compare October 16, 2025 14:27
@ipavlidakis ipavlidakis changed the title Enhancement/hifi/implement rtcaudio store as store [Enhancement|HiFi]Implement RTCAudioStore as Store Oct 16, 2025
@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/implement-store-coordinator branch from e2789fd to 855a425 Compare October 16, 2025 14:43
@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/implement-rtcaudio-store-as-store branch 3 times, most recently from d27ed23 to d80c8a6 Compare October 16, 2025 22:25
@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/implement-store-coordinator branch from 855a425 to 1f26c8c Compare October 17, 2025 11:38
@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/implement-rtcaudio-store-as-store branch from 9f33fc8 to 31d363b Compare October 17, 2025 11:39
Base automatically changed from enhancement/hifi/implement-store-coordinator to enhancement/hifi/feature-implementation October 20, 2025 08:44
@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/implement-rtcaudio-store-as-store branch from 31d363b to c5130b0 Compare October 20, 2025 08:45
@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/feature-implementation branch from eb2eb3b to 283a24a Compare October 20, 2025 13:50
@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/implement-rtcaudio-store-as-store branch from c5130b0 to b5b810e Compare October 20, 2025 13:50
@ipavlidakis ipavlidakis marked this pull request as ready for review October 20, 2025 19:10
@ipavlidakis ipavlidakis requested a review from a team as a code owner October 20, 2025 19:10
} else if let audioRecorder = try? AVAudioRecorder.build() {
mode = .audioRecorder(audioRecorder)
} else {
mode = .invalid
Copy link
Contributor

Choose a reason for hiding this comment

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

how can we end up here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the audioRecorder fail to get created

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, that's clear, I meant how can that happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The AVAudioRecorder initializer is failable, so if for some reason that fails, we can end up there. It seems that the main reasons for it to fail is to pass an invalid configuration (we are using the same configuration since forever)


/// Abstraction over the WebRTC audio session that lets the store coordinate
/// audio behaviour without tying tests to the concrete implementation.
protocol AudioSessionProtocol: AnyObject {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we're abstracting too much of WebRTC? Might be harder to keep up with newer versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

WebRTC attempts to make as minimum changes to platform specific as possible (especially on Audio for iOS). This abstraction is mostly abstracting things common to AVAudioSession and RTCAudioSession. It won't pose a problem when updating for sure.

@sonarqubecloud
Copy link

if let mixer = inputTap, mixer.engine != nil {
mixer.removeTap(onBus: 0)
}
subject?.send(-160)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use the new constant here

@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/implement-rtcaudio-store-as-store branch from 5fc3b4c to a4cd163 Compare October 31, 2025 14:50
@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamVideo 8.77 MB 8.79 MB +20 KB 🟢
StreamVideoSwiftUI 2.36 MB 2.36 MB 0 KB 🟢
StreamVideoUIKit 2.48 MB 2.48 MB 0 KB 🟢
StreamWebRTC 11.01 MB 11.01 MB 0 KB 🟢

@github-actions
Copy link

Public Interface

🚀 No changes affecting the public interface.

@Stream-SDK-Bot
Copy link
Collaborator

StreamVideo XCSize

Object Diff (bytes)
RTCAudioStore+State.o +27082
BatteryStore.o -20440
AudioDeviceModule.o +14335
RTCAudioStore+Action.o +12115
CallModerationWarningEvent.o -11309
Show 88 more objects
Object Diff (bytes)
CallModerationBlurEvent.o -11138
DisposableBag.o +9097
WebRTCStatsCollecting.o -8938
CallAudioSession.o -7521
RTCAudioStore+AudioDeviceModuleMiddleware.o +7177
RTCAudioStore+AVAudioSessionReducer.o +6928
RTCAudioStore+RouteChangeEffect.o -6888
StreamCallAudioRecorder.o +6081
RTCAudioStore.o -5763
StreamCallAudioRecorder+AVAudioRecorderMiddleware.o +5663
RTCAudioSessionPublisher.o +5319
BatteryStore+ObservationMiddleware.o -5257
RTCAudioStore+InterruptionEffect.o -5207
BatteryStore+State.o -5141
RTCAudioStore+RouteChangeMiddleware.o +5000
PeerConnectionFactory.o +4779
ApplicationLifecycleVideoMuteAdapter.o -4328
RTCAudioSessionReducer.o -4269
CallKitService.o +3991
RTCAudioStore+InterruptionsMiddleware.o +3704
CallParticipant.o +3530
RTCAudioStore+RestartAudioSession.o -3257
RTCAudioStore+DefaultReducer.o +3186
Logger.o -2980
RTCAudioStore+Coordinator.o +2971
AudioEngineLevelNodeAdapter.o +2813
Call.o +2660
RTCAudioStore+AVAudioSessionConfigurationValidator.o +2478
RTCAudioStore+WebRTCAudioSessionReducer.o +1849
BatteryStore+DefaultReducer.o -1627
RTCAudioStore+CallKitReducer.o +1618
Models.o +1576
RTCAudioStore+Namespace.o +1249
WebRTCStateAdapter.o -1183
ICEAdapter.o -1168
CallKitAudioSessionReducer.o -1159
VideoEvent.o -1134
RTCAudioStoreAction+AudioSession.o -1078
MicrophoneManager.o +947
BatteryStore+Action.o -919
RTCAudioStoreAction.o -782
NoiseCancellationSettingsRequest.o -772
RTCAudioStoreAction+CallKit.o -660
IdleTimerAdapter.o +604
WebRTCTrace.o -600
StoreCoordinator.o +582
BatteryStore+Namespace.o -574
UpdateCallResponse.o +536
CallController.o +497
Logger+ThrowingExecution.o +496
RTCAudioDeviceModuleControlling.o +487
PermissionsStore.o +462
AVAudioSessionRouteDescription+Convenience.o -460
StreamCallAudioRecorder+CategoryMiddleware.o -418
CallTimeline.o +408
StreamCallAudioRecorder+InterruptionMiddleware.o -372
CallSettings.o +371
Call+Stage.o +366
ICEConnectionStateAdapter.o -316
Encodable+Retroactive.o +308
RTCAudioStoreAction+Generic.o -263
StreamVideo.o -259
Store.o +205
Protobuf+SelectiveEncodable.o +200
StreamCallAudioRecorder+ShouldRecordMiddleware.o -192
UserEventPayload.o +168
StoreTask.o +166
RTCPeerConnectionCoordinator.o -158
CallParticipant+Convenience.o +144
RTCAudioStoreMiddleware.o -138
RTCAudioStoreReducer.o -134
WebRTCAuthenticator.o -120
CameraInterruptionsHandler.o -116
ThermalStateObserver.o +96
ReflectiveStringConvertible.o -92
AVFAudio.tbd +88
CallKitPushNotificationAdapter.o -84
CallReactionEvent.o +76
StoreLogger.o +76
LocalAudioMediaAdapter.o +74
RawJSON.o -68
WebRTCCoordinator+Blocked.o -68
Foundation.tbd +64
SwiftProtobuf.o +60
AudioProcessingStore.o +54
BroadcastBufferReader.o -52
Reducer.o -52
HTTPClient.o -42

@Stream-SDK-Bot
Copy link
Collaborator

StreamVideoSwiftUI XCSize

Object Diff (bytes)
CallControlsView.o -520
CallViewModel.o -175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants