How can you record audio directly in the browser?
Using the MediaRecorder API.
This API allows you to request access to the device microphone to record audio.
Let me show you how it can be done in my latest video.
It showcases SvelteKit why? Because it is simple!!
youtu.be/ZnAzBOzAnRM
In the video, I'll quickly show you how to use the MediaRecorder API within a SvelteKit app, but you should notice that it is just Javascript!..
So you can apply it to any project.
I also show you how to capture the audio blob to send it to the server.