File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Sources/LiveKitComponents/UI/Visualizer Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public struct AgentBarAudioVisualizer: View {
75
75
public let barMinOpacity : Double
76
76
public let isCentered : Bool
77
77
78
- public let agentState : AgentState
78
+ private let agentState : AgentState
79
79
80
80
@StateObject private var audioProcessor : AudioProcessor
81
81
@@ -120,15 +120,16 @@ public struct AgentBarAudioVisualizer: View {
120
120
animationTask = Task {
121
121
while !Task. isCancelled {
122
122
try ? await Task . sleep ( nanoseconds: UInt64 ( duration * Double( NSEC_PER_SEC) ) )
123
- withAnimation { animationPhase += 1 }
123
+ withAnimation ( . easeInOut ) { animationPhase += 1 }
124
124
}
125
125
}
126
126
}
127
127
. onDisappear {
128
128
animationTask? . cancel ( )
129
129
}
130
+ . animation ( . easeOut, value: agentState)
130
131
. onChange ( of: agentState) { _ in
131
- withAnimation { animationPhase = 0 }
132
+ animationPhase = 0
132
133
}
133
134
}
134
135
}
You can’t perform that action at this time.
0 commit comments