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.
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.
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.