Lorti / vue-dictaphone

🎙️ Vue.js dictaphone component to record audio from the user
MIT License
24 stars 8 forks source link

Please allow passing canvas styles for spectrum analyser #9

Closed santhoshtr closed 4 years ago

santhoshtr commented 4 years ago

It will be helpful to customize the spectrum analyser using passed styles. For example setting the fillstyle will help setting a desired color to match the background of application. This may be additional properties for the SpectrumAnalyser component along with width height properties.

Setting them to canvas should be easy with its context api

canvasContext.strokeStyle = passedStryle
canvasContext.filStyle = '#fff'
Lorti commented 4 years ago

Hi @santhoshtr, do you want to open a pull request for this feature?

You could change the SpectrumAnalyser.vue component, so that it accepts a custom rendering function as property. This way you could do whatever you’d like with the calculated points.

Lorti commented 4 years ago

Thanks! https://www.npmjs.com/package/vue-dictaphone/v/1.3.0