I am currently working on developing a simple Vaadin component, similar to a Button, that will respond to both press and release events. Specifically, upon pressing the button, it should begin recording sound from the microphone, and upon release, it should upload the recorded data to the backend. I believe using the Upload Vaadin component for uploading is a suitable choice. While I have found examples demonstrating how to record and play back the data on a webpage, I am struggling to figure out how to integrate this with the Upload component. Additionally, I am uncertain about the compatibility of creating a component for Vaadin 14 + Lit in future LTS releases. Any guidance on getting started with developing my component would be greatly appreciated.
I came across an npm package for sound recording: link
And for creating a Lit-component: link
Alternatively, are there other options available, such as a custom StreamResource that could directly send the recorded data from the browser to the backend without relying on the Upload class?