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.

🎨 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 4, 2025
@ipavlidakis ipavlidakis requested a review from a team as a code owner November 4, 2025 09:05
@ipavlidakis ipavlidakis added the enhancement New feature or request label Nov 4, 2025
@ipavlidakis ipavlidakis changed the base branch from develop to enhancement/hifi/feature-implementation November 4, 2025 09:05
let answer = try await createAnswer()
try await setLocalDescription(answer)
var answer = try await createAnswer()
if mungeSubscriberStereo {
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to test with RTMP tracks, to make sure we don't have the same issue as before.

.sink { [weak self] in self?.isStereoPlayoutEnabledSubject.send($0) }
.store(in: disposableBag)

source
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: the spacing here is inconsistent - initially there's a new row and then not

.sink { [weak self] in self?.isVoiceProcessingEnabledSubject.send($0) }
.store(in: disposableBag)
source
.isVoiceProcessingAGCEnabledPublisher()
Copy link
Contributor

Choose a reason for hiding this comment

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

what does AGC mean?

// Adds ".allowBluetoothHFP" if present, permitting audio playback through
// Bluetooth devices.
if contains(.allowBluetoothHFP) {
options.append(".allowBluetoothHFP")
Copy link
Contributor

Choose a reason for hiding this comment

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

why are these passed as strings? Easy to make a typo.

self.isExternal = Self.externalPorts.contains(source.portType)
self.isSpeaker = source.portType == .builtInSpeaker
self.isReceiver = source.portType == .builtInReceiver
self.channels = source.channels?.endIndex ?? 0
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't it be 1 by default?

private let source: RTCAudioSession

init(_ source: AudioSessionProtocol) {
init(_ source: RTCAudioSession) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we introduced the protocol for testing. Would this make things more difficult to test?

@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/stereo-playout-implementation branch from 7a64a7a to 99d52bd Compare November 5, 2025 17:18
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

1 Error
🚫 Please use more than one word.
99d52bd
2 Warnings
⚠️ Please be sure to complete the Contributor Checklist in the Pull Request description
⚠️ Big PR

Generated by 🚫 Danger

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Public Interface

+ public final class RTCAudioStore: @unchecked Sendable  
+ 
+   public var state: Namespace.State
+   
+ 
+   public func publisher(_ keyPath: KeyPath<Namespace.State, V>)-> AnyPublisher<V, Never>

+ extension RTCAudioStore: InjectionKey  
+ 
+   public nonisolated static var currentValue: RTCAudioStore

+ public enum Namespace: StoreNamespace



 public class Call: @unchecked Sendable, WSEventsSubscriber  
-   public func enableClientCapabilities(_ capabilities: Set<ClientCapability>)async 
+   public func updateStereoPlayoutEnforcementOnExternalDevices(_ isEnforced: Bool)async 
-   public func disableClientCapabilities(_ capabilities: Set<ClientCapability>)async 
+   public func enableClientCapabilities(_ capabilities: Set<ClientCapability>)async 
-   public func kickUser(userId: String,block: Bool? = nil)async throws -> KickUserResponse
+   public func disableClientCapabilities(_ capabilities: Set<ClientCapability>)async 
+   public func kickUser(userId: String,block: Bool? = nil)async throws -> KickUserResponse

@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamVideo 8.77 MB 8.83 MB +64 KB 🟢
StreamVideoSwiftUI 2.4 MB 2.36 MB -40 KB 🚀
StreamVideoUIKit 2.52 MB 2.48 MB -39 KB 🚀
StreamWebRTC 11.01 MB 11.01 MB +1 KB 🟢

@Stream-SDK-Bot
Copy link
Collaborator

StreamVideo XCSize

Object Diff (bytes)
RTCAudioStore+State.o +63100
AudioDeviceModule.o +22407
BatteryStore.o -20440
Encodable+Retroactive.o -20308
RTCAudioStore+Action.o +14456
Show 97 more objects
Object Diff (bytes)
RTCAudioStore.o -12339
CallModerationWarningEvent.o -11309
CallModerationBlurEvent.o -11138
PeerConnectionFactory.o +9290
DisposableBag.o +9097
WebRTCStatsCollecting.o -7997
AudioProcessingStore.o +7421
RTCAudioStore+RouteChangeMiddleware.o +7253
RTCAudioStore+AudioDeviceModuleMiddleware.o +6961
RTCAudioStore+RouteChangeEffect.o -6888
StreamCallAudioRecorder.o +6301
StreamCallAudioRecorder+AVAudioRecorderMiddleware.o +5663
RTCAudioStore+HiFiMiddleware.o +5503
RTCAudioStore+AVAudioSessionReducer.o +5320
RTCAudioSessionPublisher.o +5319
BatteryStore+ObservationMiddleware.o -5257
RTCAudioStore+InterruptionEffect.o -5207
BatteryStore+State.o -5141
ApplicationLifecycleVideoMuteAdapter.o -4694
CallAudioSession.o -4301
RTCAudioSessionReducer.o -4269
CallKitService.o +3983
RTCAudioStore+DefaultReducer.o +3762
RTCAudioStore+InterruptionsMiddleware.o +3532
CallParticipant.o +3530
RTCAudioStore+RestartAudioSession.o -3257
Logger.o -2980
Call.o +2880
RTCAudioStore+Coordinator.o +2859
AudioEngineLevelNodeAdapter.o +2805
RTCAudioStore+AVAudioSessionConfigurationValidator.o +2478
RTCAudioStore+WebRTCAudioSessionReducer.o +1905
RTCAudioStore+CallKitReducer.o +1662
BatteryStore+DefaultReducer.o -1627
Models.o +1576
RTCAudioStore+Namespace.o +1307
ICEAdapter.o -1168
CallKitAudioSessionReducer.o -1159
VideoEvent.o -1134
RTCAudioStore+StereoReducer.o +1080
RTCAudioStoreAction+AudioSession.o -1078
RTCAudioDeviceModuleControlling.o +1061
MicrophoneManager.o +947
BatteryStore+Action.o -919
RTCAudioStoreAction.o -782
Store.o +758
WebRTCCoordinator.o +692
RTCAudioStoreAction+CallKit.o -660
CallController.o +643
IdleTimerAdapter.o +604
WebRTCTrace.o -600
Protobuf+SelectiveEncodable.o -596
StoreCoordinator.o +582
BatteryStore+Namespace.o -574
UpdateCallResponse.o +540
RTCAudioSession+AudioSessionProtocol.o -496
Logger+ThrowingExecution.o +496
AVAudioSessionRouteDescription+Convenience.o -460
PermissionsStore.o +456
CallTimeline.o +448
StreamDeviceOrientationAdapter.o -436
StreamCallAudioRecorder+CategoryMiddleware.o -410
SwiftProtobuf.o -404
StreamCallAudioRecorder+InterruptionMiddleware.o -372
CallSettings.o +371
Call+Stage.o +366
LayoutSettings.o +342
DefaultAPI.o -320
ICEConnectionStateAdapter.o -316
RTCAudioStoreAction+Generic.o -263
StreamVideo.o -259
DefaultRTCMediaConstraints.o +241
OwnCapabilitiesAudioSessionPolicy.o -216
AudioSessionConfiguration.o +210
StreamCallAudioRecorder+ShouldRecordMiddleware.o -176
RTCPeerConnectionCoordinator.o -174
UserEventPayload.o +168
StoreTask.o +166
CallParticipant+Convenience.o +144
WebRTCStateAdapter.o -141
RTCAudioStoreMiddleware.o -138
RTCAudioStoreReducer.o -134
WebRTCAuthenticator.o -120
CameraInterruptionsHandler.o -116
NoiseCancellationSettingsRequest.o -96
ThermalStateObserver.o +96
ReflectiveStringConvertible.o -92
AVFAudio.tbd +88
CallKitPushNotificationAdapter.o -84
StoreLogger.o +76
CallReactionEvent.o +76
LocalAudioMediaAdapter.o +74
RawJSON.o -68
Foundation.tbd +64
BroadcastBufferReader.o -52
Reducer.o -52
HTTPClient.o -42

@Stream-SDK-Bot
Copy link
Collaborator

StreamVideoSwiftUI XCSize

Object Diff (bytes)
ModerationBlurViewModifier.o -13625
ModerationWarningViewModifier.o -6793
CallControlsView.o -520
ViewFactory.o -472
VideoView_iOS13.o -252
CallViewModel.o -175
CallContainer.o -134
StreamVideo.tbd -68
ToastView.o +60

@ipavlidakis ipavlidakis force-pushed the enhancement/hifi/feature-implementation branch from ad2ecd8 to ebfedd9 Compare November 11, 2025 14:51
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