Skip to content

Conversation

@ipavlidakis
Copy link
Contributor

🔗 Issue Links

Provide all JIRA tickets and/or GitHub issues related to this PR, if applicable.

🎯 Goal

Describe why we are making this change.

📝 Summary

Provide bullet points with the most important changes in the codebase.

🛠 Implementation

Provide a detailed description of the implementation and explain your decisions if you find them relevant.

TODO

  • Remove the SDP munging once StereoPlayout negotiation is enabled on backend.

🎨 Showcase

Add relevant screenshots and/or videos/gifs to easily see what this PR changes, if applicable.

Before After
img img

🧪 Manual Testing Notes

Explain how this change can be tested manually, if applicable.

☑️ 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)

🎁 Meme

Provide a funny gif or image that relates to your work on this pull request. (Optional)

@ipavlidakis ipavlidakis self-assigned this Nov 11, 2025
@ipavlidakis ipavlidakis added the enhancement New feature or request label Nov 11, 2025
@github-actions
Copy link

1 Message
📖 Skipping Danger since the Pull Request is classed as Draft/Work In Progress

Generated by 🚫 Danger

@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/stereo-playout-3 branch from e2db509 to e2b021e Compare November 13, 2025 17:26
@github-actions
Copy link

Public Interface

- public struct AudioSessionConfiguration: ReflectiveStringConvertible, Equatable, Sendable  
+ public struct AudioSessionConfiguration: CustomStringConvertible, Equatable, Sendable  
-   public static func ==(lhs: Self,rhs: Self)-> Bool
+   public var description: String
+   
+ 
+   public static func ==(lhs: Self,rhs: Self)-> Bool

@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamVideo 8.77 MB 8.98 MB +211 KB 🟢
StreamVideoSwiftUI 2.4 MB 2.38 MB -16 KB 🚀
StreamVideoUIKit 2.52 MB 2.5 MB -16 KB 🚀
StreamWebRTC 11.01 MB 11.01 MB 0 KB 🟢

@Stream-SDK-Bot
Copy link
Collaborator

StreamVideo XCSize

Object Diff (bytes)
RTCAudioStore+State.o +36817
AudioDeviceModule.o +36301
BatteryStore.o +16735
RTCAudioStore+Action.o +15286
ApplicationLifecycleVideoMuteAdapter.o -13118
Show 91 more objects
Object Diff (bytes)
RTCAudioStore.o -12561
StreamCallAudioRecorder.o +11299
CallParticipant.o +11138
RTCAudioSessionPublisher.o +9563
DisposableBag.o +9421
RTCAudioStore+AVAudioSessionReducer.o +8485
PeerConnectionFactory.o +7985
RTCAudioStore+StereoPlayoutEffect.o +7734
WebRTCStatsCollecting.o -7389
RTCAudioStore+AudioDeviceModuleMiddleware.o +7270
StreamCallAudioRecorder+AVAudioRecorderMiddleware.o +5454
RTCAudioStore+InterruptionEffect.o -5207
RTCAudioStore+DefaultReducer.o +4562
RTCAudioSessionReducer.o -4269
StereoEnableVisitor.o +4254
CallKitService.o +3927
RTCAudioStore+InterruptionsMiddleware.o +3764
RTCAudioStore+Coordinator.o +3455
RTCAudioStore+RouteChangeEffect.o +3304
RTCAudioStore+RestartAudioSession.o -3257
WebRTCCoordinator+Joining.o +3212
Logger.o -2980
Call.o +2886
AudioEngineLevelNodeAdapter.o +2805
RTCAudioStore+AVAudioSessionConfigurationValidator.o +2478
CallAudioSession.o +2466
StoreEffect.o +1970
RTCAudioStore+WebRTCAudioSessionReducer.o +1937
RTCAudioStore+CallKitReducer.o +1710
SignalServerEvent.o -1608
Models.o +1552
RTCPeerConnectionCoordinator.o +1401
CallKitPushNotificationAdapter.o +1376
RTCAudioDeviceModuleControlling.o +1290
UpdateCallResponse.o +1163
CallKitAudioSessionReducer.o -1159
RTCAudioStoreAction+AudioSession.o -1078
NoiseCancellationSettingsRequest.o +1004
MicrophoneManager.o +947
RTCAudioStore+Namespace.o +823
RTCAudioStoreAction.o -782
Encodable+Retroactive.o +756
RTCAudioStoreAction+CallKit.o -660
CallController.o +589
WebRTCStateAdapter.o +587
StoreCoordinator.o +582
AudioSessionConfiguration.o +509
ReflectiveStringConvertible.o +506
Logger+ThrowingExecution.o +496
AVAudioSessionRouteDescription+Convenience.o -460
CallTimeline.o +448
StreamDeviceOrientationAdapter.o -436
StreamCallAudioRecorder+CategoryMiddleware.o -410
PermissionsStore.o +392
MediaAdapter.o -392
LivestreamAudioSessionPolicy.o +380
StreamCallAudioRecorder+InterruptionMiddleware.o -372
CallSettings.o +371
DefaultRTCMediaConstraints.o +369
Call+Stage.o +366
ICEConnectionStateAdapter.o -336
LayoutSettings.o +328
DefaultAPI.o -320
Protobuf+SelectiveEncodable.o +316
Store.o +295
RTCAudioStoreAction+Generic.o -263
CallModerationBlurEvent.o -242
StoreLogger.o +223
BatteryStore+ObservationMiddleware.o -220
BatteryStore+State.o -182
StreamCallAudioRecorder+ShouldRecordMiddleware.o -176
UserEventPayload.o +168
StoreTask.o +166
CallParticipant+Convenience.o +144
RTCAudioStoreMiddleware.o -138
RTCAudioStoreReducer.o -134
Reducer.o +131
Foundation.tbd +124
WebRTCAuthenticator.o -120
CameraInterruptionsHandler.o -116
AudioProcessingStore.o +106
AVFAudio.tbd +88
CallReactionEvent.o +76
PermissionStore+DefaultReducer.o +68
SwiftProtobuf.o +68
LocalAudioMediaAdapter.o +62
BroadcastBufferReader.o -52
StreamCallAudioRecorder+Namespace.o +49
Middleware.o -46
StreamRTCPeerConnection.o +44
HTTPClient.o -42

@Stream-SDK-Bot
Copy link
Collaborator

StreamVideoSwiftUI XCSize

Object Diff (bytes)
CallControlsView.o -520
ModerationWarningViewModifier.o -332
CallContainer.o +272
CallViewModel.o -175
ToastView.o +60

@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/stereo-playout-3 branch from 86c4c5f to 3b8bd28 Compare November 19, 2025 09:52
@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/feature-implementation branch from ebfedd9 to 6b6c886 Compare November 20, 2025 01:46
@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/stereo-playout-3 branch from 3885f72 to 275c58d Compare November 20, 2025 01:47

static var proximityPolicies: Set<ProximityPolicyDebugConfiguration> = {
[.speaker, .video]
[]
Copy link
Contributor

Choose a reason for hiding this comment

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

is this affecting stereo?

/// Category options for playback.
static let playback: AVAudioSession.CategoryOptions = []

#if !canImport(AVFoundation, _version: 2360.61.4.11)
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a bit ugly, and potentially error prone, can we have another way?

static let playback: AVAudioSession.CategoryOptions = []

#if !canImport(AVFoundation, _version: 2360.61.4.11)
public static let allowBluetoothHFP = Self.allowBluetooth
Copy link
Contributor

Choose a reason for hiding this comment

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

I read this about HFP: "if your app is for high-quality audio (music, streaming, etc.), HFP is undesirable because it degrades audio quality."
Will it have impact on audio quality?

options.append(".duckOthers")
}

#if canImport(AVFoundation, _version: 2360.61.4.11)
Copy link
Contributor

Choose a reason for hiding this comment

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

same thing here

mode: .voiceChat,
options: [
.allowBluetooth,
.allowBluetoothHFP,
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be default?

self.routeSharingPolicy = source.routeSharingPolicy
self.availableModes = source.availableModes
self.preferredInput = source.preferredInput.map { .init($0) } ?? nil
if #available(iOS 17.2, *) { self.renderingMode = "\(source.renderingMode)" }
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 test this stuff on older iOS versions

shouldRecord: false,
isRecording: false,
isMicrophoneMuted: false,
isMicrophoneMuted: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we change this?

_ = audioDeviceModule
PeerConnectionFactoryStorage.shared.store(self, for: audioProcessingModule)
// Remove caching
// PeerConnectionFactoryStorage.shared.store(self, for: audioProcessingModule)
Copy link
Contributor

Choose a reason for hiding this comment

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

should we delete this instead?

try await setLocalDescription(answer)
var answer = try await createAnswer()
if mungeSubscriberStereo {
let munger = SDPParser()
Copy link
Contributor

Choose a reason for hiding this comment

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

when's this going to be enabled on the backend so we can remove this code?

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