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

No way to reset #10

Closed Johnrobmiller closed 5 months ago

Johnrobmiller commented 7 months ago

Looking for a way to reset everything. Read through the docs, found nothing. Setting recordedBlob to null and audioSrc to '' does nothing. There ought to be a way to reset these things. If there is, it should be more clearly documented.

Johnrobmiller commented 7 months ago

I'm seeing a method called "clearCanvas". Is this the intended method? It says it clears the canvas, but makes no mention of recordedBlob or audioSrc and only claims to clear the canvas. Therefore, it is implied that it will not reset audioSrc. However, when I tested it out, it seems to reset audioSrc.

In my opinion, this function ought to be renamed to better reflect its actual behavior