Search code examples
just-audio

Shouldn't setClip function return a new file using just_audio package?


In my app, I allow users to edit their audio recording and I use just_audio to do this. When the audio is clipped from 30 seconds to 20 seconds I realized that only the duration of the audio changed but the file length did not change so the audio isn't edited as intended because when the clipped audio is sent to the server, it still remains as the original unedited file. Is that how the clip feature was intended to work or I am not doing something right ?


Solution

  • just_audio is just an audio player, so it doesn't do file editing and file writing. ClippingAudioSource is equivalent to ClippingMediaSource in ExoPlayer and it is intended only for selecting a clip to play during playback, without modifying the original.