YZarytskyi / react-voice-visualizer

React library for audio recording and visualization using the Web Audio API
https://www.npmjs.com/package/react-voice-visualizer
MIT License
112 stars 22 forks source link

Progress Indicator Animation #16

Closed rezvani2647 closed 2 months ago

rezvani2647 commented 3 months ago

Describe the bug I'm not sure how to use preloaded audio blob. but after I set the blob with setPreloadedAudioBlob method. I could not find a method for just playing the blob. so I used the audioRef from useVoiceVisualizer and try to do audioRef.current?.play(). the voice played ok. but progress indicator dose not animate to the end as sound was playing.

Great Library by the way, thank you in advanced.

Expected behavior I wish we have a play method that can sync the Progress bar with the audio.

Screenshots Screenshot 2024-08-18 at 15 33 42

Package info (please complete the following information):

Additional context default ui buttons works fine, but i need a solution for designing my own how can I play the audio like so I can play the audio and animate the indicators at the same time.

YZarytskyi commented 3 months ago

Hey, you should use togglePauseResume function