Android Question ExoPlayer - How to resume if source unknown

Herbert32

Active Member
Licensed User
Longtime User
Hi again all out there :)

if i add some sources to a sourcesList and one of them cannot be played i just receive a Message in my Debugging-Log:

Error: com.google.android.exoplayer2.source.ExtractorMediaSource$UnrecognizedInputFormatException: None of the available extractors (MatroskaExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream.

And the player stays on the end of the last playable file...

How can i bring ExoPlayer to ignore the files, which he cannot play and resume playing with the next file?

Best regards
Herbert
 

Herbert32

Active Member
Licensed User
Longtime User
Good morning Erel,

i tried to handle the error-event but i don't know how to skip to the next file and restart the paused player.


B4X:
Sub Player_Error (Message As String)
   
    Log("Error: " & Message)
    player1.Play

End Sub

I have not found any sources to solve this.
My base for starting has been your sample so i founf that the Error-Message in my Log came from there.

Sorry but I'm not very experienced to B4A as this is my first real-life-project...

Best regards
Herbert
 
Upvote 0

Herbert32

Active Member
Licensed User
Longtime User
Yes, your linked Post seem to be the right direction...

But at calling PlayerEx.CurrentWindowIndex i receive following error-message :-(

B4X:
Cannot get methods of class: com.google.android.exoplayer2.SimpleExoPlayer, disabling cache.
 
Upvote 0

Herbert32

Active Member
Licensed User
Longtime User
yes it crashes

attached you will find the simple and small code from which i'm shocked that i'm unable to solve by myself :-(

And btw. i am unable to clear my log-window - it clears tempraryly but after restarting, all the old messages are again in the log-window - also after restarting b4a...
 

Attachments

  • Error.jpg
    Error.jpg
    168.1 KB · Views: 441
  • errorexport.zip
    9 KB · Views: 301
  • Libraries.jpg
    Libraries.jpg
    161.1 KB · Views: 447
Upvote 0

Herbert32

Active Member
Licensed User
Longtime User
it seems that if i'm not able to solve by myself in such a incredible small piece of code, it's better not to use this and research for something different which can be used
 
Upvote 0
Top