Help with my application (ExoPlayer)

Hello. I want to ask your advice. My application is using ExoPlayer. It plays audio from my server, but in case my server goes down, there are links to an alternate server. The question is as follows - if the player cannot play audio from the first link (the server is offline or server is overloaded), then the “OnPlayerError” block is triggered and the audio from the second source starts playing, but before this block is triggered, it takes 10-15 seconds, which is a very long time for my application. I would be very grateful if someone could suggest a way to reduce this time to at least 2 seconds.

Exoplayer takes a lot of time to load online music and it doesnt work in background.You can download the required audio and play the audio using exoplayer,It will work more effieciently while using slider in music player and if your audio is of less size.By the way what type of app are you making?

The download speed of the player suits me absolutely. I have a lot of audio files in the application (about 700), but all of them are not large, so the player loads the files themselves instantly. I don’t want to download files in advance because it’s about 500 megabytes.
(“Музыкальная викторина”, you can find it in google play(its music quiz))

I don’t mean to say to download all music but the exoplayer works well if music is small.You can use another music player extension, Taifun Player then
If music player OnPlay Error Then Stop Exoplayer And implement taifun player. Taifun Player Blocks are the same as exoplayer. This might work.

I recommend you to use some other player, maybe some paid ones
bcoz that inbuilt exo player have some issues

Taifunn player does not have a block “onplay eror” (perhaps you have a newer version, if so, tell me where to download it).

See There : App Inventor Extensions: Audio Player | Pura Vida Apps