Dev Week 13

pixel art of violet's profile picture

This week was all about refactoring, and fixing that pesky problem where playback position wouldn't work on iOS/Safari!

As a side note, I've tried my hand at some pixel art (see featured image above).

I wanted to give iOS users a way to reload their last playback position when returning to the app via a button. Due to the way browsers work and iOS/Safari in particular, I had to create some workarounds to be able to detect when the audio had loaded enough to see if it was possible to programmatically change the playback position. Then the button would become pressable. However, in the process, I found that the button was unnecessary, because if we programmatically changed the playback position once this event was detected, it worked on iOS too!

I also updated it so that it will show the episode information and picture on the playback info section! See image:

Right now it's hard-coded to "Security Now!" and their podcast logo as a proof of concept, but the episode information shows the current episode number and title. This should work on Android devices as well since it uses the browser-based API.

Sadly, iOS has other issues which I and many other people struggle with. It is common that if you are listening/watching to something in Safari, which then backgrounds when you leave the app, if you pause, wait a few seconds, and then try to play again, it will often completely forget what you were listening to. To add insult to injury, your play button will now start random music from your (formerly iTunes) Music app! As a developer, it seems there's nothing that can be done about this. People complain about it as recently as iOS 17 which is the current or most recent previous iOS, and I'm experiencing the issue on iOS 16. If you can find an app which doesn't have this problem, please let me know and I'll try to figure out their secret sauce incantation that they use to ask iOS pretty please to nicely not wipe your current playback information when you pause for two seconds.

This week I also did some refactoring into more custom hooks, making each part of the code self-contained and understandable. While it might not be apparent as an end-user, it certainly makes the application much more scalable for adding more features.

I also received my first request for additional podcasts!! This will probably become my primary next goal. I'm not quite sure what this will look like yet, but this will require some reworking to ensure that the application supports multiple podcasts. I will most likely also need to write another program (or make my current podcast generator program more generic) for being able to produce more podcast metadata files.

Thank you for joining us this week! See you next week!

Posted in Dev

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.