vvvirani / flutter_audio_trimmer

Trimming an audio file means cutting a portion of the audio from the beginning or end of the file or removing some part from the middle.
MIT License
1 stars 2 forks source link

AudioFileType.mp3 not working #3

Open KY-Jung opened 5 months ago

KY-Jung commented 5 months ago

Hi, I'm a flutter developer.

I want to create audio file changer which does trim. With flutter audio trimmer, mp3 is not allowed in android environment. Like following code, when m4a is used, it will succeed.

File? trimmedAudioFile = await FlutterAudioTrimmer.trim(
  inputFile: file,
  outputDirectory: directory,
  fileName: DateTime.now().millisecondsSinceEpoch.toString(),
  //fileType: Platform.isAndroid ? AudioFileType.mp3 : AudioFileType.m4a, 
  fileType: AudioFileType.m4a,
  time: AudioTrimTime(
    start: const Duration(seconds: 1),
    end: const Duration(seconds: 2),
  ),
);
vvvirani commented 5 months ago

Hello @KY-Jung

Yes, currently I am working on it. Please give me some time. I will update you