-
Notifications
You must be signed in to change notification settings - Fork 28
[Fix]CallSettings rapid updates #913
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
Conversation
Public Interface- public final class CallSettings: ObservableObject, Sendable, Equatable, ReflectiveStringConvertible
+ public final class CallSettings: ObservableObject, Sendable, Equatable, CustomStringConvertible
-
+ public var description: String
-
+
- public convenience init(_ response: CallSettingsResponse,file: StaticString = #file,function: StaticString = #function,line: UInt = #line)
+
- public init(audioOn: Bool = true,videoOn: Bool = true,speakerOn: Bool = true,audioOutputOn: Bool = true,cameraPosition: CameraPosition = .front,file: StaticString = #file,function: StaticString = #function,line: UInt = #line)
+ public convenience init(_ response: CallSettingsResponse,file: StaticString = #file,function: StaticString = #function,line: UInt = #line)
-
+ public init(audioOn: Bool = true,videoOn: Bool = true,speakerOn: Bool = true,audioOutputOn: Bool = true,cameraPosition: CameraPosition = .front,file: StaticString = #file,function: StaticString = #function,line: UInt = #line)
-
+
- public static func ==(lhs: CallSettings,rhs: CallSettings)-> Bool
+
+ public static func ==(lhs: CallSettings,rhs: CallSettings)-> Bool
public struct LogSubsystem: OptionSet, CustomStringConvertible, Sendable
- public var description: String
+ public static let audioRecording
-
+ public var description: String
-
+
- public init(rawValue: Int)
+
+ public init(rawValue: Int)
open class StreamCallAudioRecorder: @unchecked Sendable
- open private lazy var metersPublisher: AnyPublisher<Float, Never>
+ @Published open private var meters: Float
-
+ @Published open private var isRecording: Bool
-
+
- public init(filename: String)
+
-
+ public convenience init()
-
+
- open func startRecording(ignoreActiveCall: Bool = false)async
+
- open func stopRecording()async
+ open func startRecording(ignoreActiveCall: Bool = false)
+ open func stopRecording() |
SDK Size
|
Create Store component and reuse
fe52a50
to
05ea240
Compare
@@ -119,10 +119,6 @@ extension WebRTCCoordinator.StateMachine.Stage { | |||
|
|||
try Task.checkCancellation() | |||
|
|||
await observeCallSettingsUpdates() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method was here to forward CallSettings to the publisher
PeerConnection. However, because it was relying on the Combine chain for updates, it was always a time-fracture behind.
Now, we are removing this and moving the publiher
peerconnection update directly on the WebRTCStateAdapter
next to when it updates its own CallSettings.
/// Observes updates to the `callSettings` and ensures that any changes are | ||
/// reflected in the publisher. This ensures that updates to audio, video, and | ||
/// audio output settings are applied correctly during a WebRTC session. | ||
private func observeCallSettingsUpdates() async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I haven't seen a replacement for this? How do we listen to updates now?
Update changelog Fix compilation error
5b8fb49
to
bb4ac08
Compare
|
🔗 Issue Links
Resolves https://linear.app/stream/issue/IOS-916/videoproximity-doesnt-stop-local-video-and-its-visible-on-remote
🎯 Goal
This revisions provides improvements in situations that causing CallSettings to update rapidly. With the updates, we can now ensure serial updates for those rapid changes.
🛠 Implementation
WebRTCStateAdapter
now handlesCallSettings
updates as enqueued operations. In that way every update request will be passed the current CallSettings at the moment and is expected to return the update it needs. In this way we provide step by step updates in CallSettings rather than complete replacements.🧪 Manual Testing Notes
☑️ Contributor Checklist