Bugs: iOS Media Control Widget

One of my thorough beta testers for my iOS version on Test Flight has identified some apparent bugs in the media control widget and how it controls (not always correctly) the audio playback for our iOS version of our app. Here’s what he wrote:

• I selected “streaming” as the method of listening, and put my phone on airplane mode to see what happens when there is no internet connection. I get an error message in mixed language; okay, I realize that part of it is coming from the system os.
But if I now switch to a different chapter and click “play” on the sound controls, it does not give an error message, it just plays the audio for the chapter I was on before I put the phone into airplane mode.

Then I turned my wifi and mobile data back on, and went to a different book, Eph 6. Now when I click play it plays chapter one of Ephesians!

I changed chapters a few times after that, and it was playing the selected chapter again.

• I switched to “download audio files” and downloaded three chapters of Ephesians, then turned on airplane mode. Now if I try to play a chapter that has not been downloaded, I get an appropriate error message, just in the local language.

However, if I open the audio control from the iPhone widget that appears when I swipe up from the bottom or on the lock screen, and switch to a different chapter, it does not tell me that the audio for that chapter doesn’t exist, it just plays the next chapter in the book that does exist.
• After the above experience, I tested the widget with wifi on and automatic download on. There is still a disconnect between the chapter that is being played and the one displayed in the title of the audio player.

I have been able to reproduce these same issues along with some related ones and I think the key observation is that there is disconnect between the chapter that is being played and the one displayed in the title of the audio player especially when you attempt to switch to chapters (via the media control widget) for which audio is not available (because you don’t have wifi/data access to download/stream). The widget does change chapters but attempts to play audio, can’t find it but in some cases plays different audio…when you go back into the app, you see that the text is at one chapter (based on how many times you changed the chapter via the media control widget.

On a related note, I noticed that when you advance forward to new books via the audio control widget (for example moving from Ephesians 6 to Philippians 1), the app passes over an introduction that has no audio, which is fine. However if you attempt to move backwards from Philippians 1 from the audio control widget, the audio stops playing. If you push play again and try to move backwards again, you get a “Not Playing” title in place of Philippians 1. When you go back to the home screen, you get a crash notification (which maybe only would happen since I’m testing via Test Flight)?