I am currently working on a rather important ReactJS web project consisting of editing audio files. However, I'm encountering a rather complex problem and I must admit that I've been struggling for several days 😅
So, basically, I use WaveSurfer-JS to display an audio track on my site. To edit it, I use what are called Regions plugins that allow the user to select a specific area on the audio track. The idea is that the user can select an area of the audio track and by clicking a button, all other parts of the audio that are outside the selected region are "deleted", or only the audio of the selected part is kept in a variable for example, the type of which I don't know yet. Obviously, I have no idea how to achieve this kind of functionality aha (I just managed to integrate the area selection functionality but as for keeping only the selected audio, I have no idea)!
To better understand my need, I invite you to look the image below in which I show being able to select an area of the audio track and being able to click the button to keep only that area and maybe delete the rest (the selected zone is in black and the button is called "je veux cette partie") 🙂
I am aware that the problem seems quite complex so I won't be surprised if there is no answer under this post, but I still count on those who have already used WaveSurfer-JS with ReactJS to try to help me 😆
Have a nice evening or day!
image to better understand my need
EDIT I found a solution : https://stackoverflow.com/a/24552520/11816999