How to add a 2 minute limit and only add the ability to add audio and save to mp3 without video?
Hi @marcin18481 and welcome to the forum.
What have you tried so far? Can you share some code so we can help you better. Could you explain in greater detail what you are trying to achieve, as I didn't quite understand. Are you looking to convert a video to MP3? What do you mean by 2 minute limit?
I would like it to be possible to set a recording time limit after which the recording ends. Add the functionality of recording only sound and exporting it to mp3 format.
I don't have the code, I'm just starting to dig into the code.
Here's a very rough guide to setting the time limit:
setTimeout
). Increment the callback by 1 second and display this to the user based on the timeout you need (if 2 minutes, store limit
as 120000 and decrement from this).dayjs
to format the amount of time remaining.setTimeout
, once you get down to 0 from the 120000 timeout, cancel the recording and continue to do everything you'd normally do on the manual press of a buttonI hope this gives you a rough idea of how to implement this. Feel free to jump back in once you have some code or have tried something and I'd be happy to guide you :)