Repository navigation
Conversation
|
@mtb24 is attempting to deploy a commit to the LiveKit Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: c6e2251 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
I support the intention of this PR, but I'm unsure this is the right design solution for users of reduced motion.
I believe we could design a general purpose solution across all audio visualizers. What do you think if we allowed |
Hi Thomas, I understand and agree with your concern. The explicit text would communicate that more clearly. I propose starting paused when the reduced-motion preference is enabled, showing the current state as text, for example: “Listening,” “Thinking,” or “Speaking”, and maybe offering a Play/Pause animation control, which would only affect the visualizer. Audio and the conversation would continue normally. A shared approach across the visualizers makes sense. My thinking is a shared motion preference hook and composable state/control UI, so consuming apps can place the controls where desired without each visualizer needing to roll its own behavior. Would that be acceptable?
|
|
yes, that would be great |
Problem and behavior
Audio visualizers continue moving when the browser requests reduced motion. This revision covers Bar, Grid, Radial, Wave, and Aura with a shared text-state and playback-control approach.
useAgentAudioVisualizerMotionwithAgentAudioVisualizerToggleto put Play/Pause controls where they want them. The visualizer takes a controlledpausedprop; without one, it follows the browser preference.AgentAudioVisualizerState, custom paused content, and button labels support localization and custom presentation.Example composition:
The built-in animation and audio-analysis hooks are unmounted while paused. Motion animations and shader frame requests are cleaned up when playback stops. The grid retains hidden sizing cells to avoid changing height; custom grid children remain hidden for sizing and need to control any animations they own separately.
Storybook review
Each existing visualizer story file now has a ReducedMotion story. No microphone, room connection, or credentials are required.
prefers-reduced-motion: reducewithout reloading. The visualization stops, text state appears, and the button reads Play animation.The earlier wave-only static silhouettes have been replaced by this text alternative.
Paused text, explicit playback, and browser-setting instruction
Validation
Browser measurements