My Music Player App only works when it wants to

I'm developing an app that uses TaifunPlayer, SliderTools, DriveFile, and FirebaseDB to play songs contained in the Firebase database. Unfortunately, it only works at random times. I'm using a pretty crappy LG phone for this (as it's the only working one in my house and the app doesn't work on iOS) and I'm also using Legacy Connection. Sometimes it's giving Error 701 (aka it can't play the drive file links), sometimes it just freezes and stops working. Sometimes the music does actually play but using the seek bar just makes it freeze. It never works at its max potential. I'm thinking it just because the phone is so bad and I'm planning on using a friend's samsung phone instead. In the meantime, though, I cannot figure out how to fix this.

Relevant pictures:


image
image
image

You probably need to give the player some "time" to load the source before trying to play (start). Use a clock timer for this. The time interval you set needs to be long enough to connect to and download the file.

How do I know how long that time is?

Also for some reason I'm getting this error whenever I skip to my 3rd and 4th track
image

to set the ThumbPosition to Label5.Text is probably not what you want?
Unbenannt2

Taifun

You may have to do some testing, start at 250ms, and increase until you get compliance.

by trial and error... start with 5000ms and in case that works use 4000ms etc.
Taifun

2 Likes

tysm, just one more thing...whenever I try to seek the slider it just goes back to 0 and starts playing the song again

:question:

I actually don't even know where to start here. So here is just one aspect:
Streaming music files does not work on Android 6+ (Doze mode) on most devices if the device is in idle mode / background (neither with the TaifunPlayer nor with the Player component). You have to use a Foreground service.

did you end up fixing the issue? if so id love it if you could send an import link as I quite like the idea and might add upon it in my own time.