From 11bdec81bf22abf0db2f03e2b5c82ca60a91a1b4 Mon Sep 17 00:00:00 2001 From: mattherzog Date: Sun, 29 Sep 2024 11:59:59 -0500 Subject: [PATCH] Improves bar visualizer animations and adds initializing state (#987) Co-authored-by: lukasIO --- .changeset/ninety-cheetahs-tickle.md | 5 +++++ packages/react/src/components/participant/BarVisualizer.tsx | 3 ++- .../participant/animationSequences/connectingSequence.ts | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/ninety-cheetahs-tickle.md diff --git a/.changeset/ninety-cheetahs-tickle.md b/.changeset/ninety-cheetahs-tickle.md new file mode 100644 index 000000000..d958b703c --- /dev/null +++ b/.changeset/ninety-cheetahs-tickle.md @@ -0,0 +1,5 @@ +--- +"@livekit/components-react": patch +--- + +Improve bar visualizer animations and add initializing state diff --git a/packages/react/src/components/participant/BarVisualizer.tsx b/packages/react/src/components/participant/BarVisualizer.tsx index 142cc2bf6..a4e002c88 100644 --- a/packages/react/src/components/participant/BarVisualizer.tsx +++ b/packages/react/src/components/participant/BarVisualizer.tsx @@ -30,7 +30,8 @@ export interface BarVisualizerProps extends React.HTMLProps { } const sequencerIntervals = new Map([ - ['connecting', 25 * 15], + ['connecting', 2000], + ['initializing', 2000], ['listening', 500], ['thinking', 150], ]); diff --git a/packages/react/src/components/participant/animationSequences/connectingSequence.ts b/packages/react/src/components/participant/animationSequences/connectingSequence.ts index a1fd0ec56..bea65b620 100644 --- a/packages/react/src/components/participant/animationSequences/connectingSequence.ts +++ b/packages/react/src/components/participant/animationSequences/connectingSequence.ts @@ -1,7 +1,7 @@ export const generateConnectingSequenceBar = (columns: number): number[][] => { const seq = []; - for (let x = 0; x <= columns; x++) { + for (let x = 0; x < columns; x++) { seq.push([x, columns - 1 - x]); }