UnrecognizedInputFormatException: None of the available extractors Flutter-AssetsAudioPlayer

Viewed 437

Flutter Version 1.20.2

Flutter-AssetsAudioPlayer Version 2.0.10

Platform : Android

Description of the Problem

I came across this exception when i opend a song from local storage , the song starts to play but i am unable to opean other songs after this on the audioPlayerClient object .

E/ExoPlayerImplInternal(12453): Source error
E/ExoPlayerImplInternal(12453):   com.google.android.exoplayer2.source.UnrecognizedInputFormatException: None of the available extractors (MatroskaExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor, AmrExtractor, Ac4Extractor, FlacExtractor) could read the stream.
E/ExoPlayerImplInternal(12453):       at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractorHolder.selectExtractor(ProgressiveMediaPeriod.java:1090)
E/ExoPlayerImplInternal(12453):       at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:969)
E/ExoPlayerImplInternal(12453):       at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:391)
E/ExoPlayerImplInternal(12453):       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
E/ExoPlayerImplInternal(12453):       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
E/ExoPlayerImplInternal(12453):       at java.lang.Thread.run(Thread.java:764)
I/ExoPlayerImpl(12453): Release 970166c [ExoPlayerLib/2.11.4] [potter_n, Moto G (5) Plus, motorola, 27] [goog.exo.core]
V/MediaPlayer(12453): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false

when song which caused the exception ends i get this

W/MediaPlayer(12453): mediaplayer went away with unhandled events

Small code to reproduce

try {
  //Singleton pattern to get AudioPlayerClient audioPlayerClient
  AudioPlayerClient.getAudioPlayerClient().open(
  Audio.file(widget.songInfo.filePath),
  );
  //this is the filePath
  // storage/emulated/0/New Folder/Selena Gomez & Marshmello  - Wolves (DawnFoxes.com).mp3
} 
catch (e) {
  print(e);
}

Other songs are played fine, this song is the one which is creating the problem

0 Answers
Related