I’ve already solved a lot of tricky problems with my app due to the great contributions from this community. Thank you all! One of the very first challenges I attempted to tackle was a countdown timer for workouts, and after thinking I had it solved, I see I haven’t.
For this timer, I needed to be able to have an audio file (or files) play in-sync with the timer to cue users on the “Start”, “Half-way Mark”, “1-Minute Remaining” and “End” of their workouts. My creative hack was to leverage my own take on the genius timer creation from @Victor , where I was using the “Play” and “Pause” buttons in the audio player component to control the various “countdown seconds”, “paused”, “date & time” and other variables needed to pull this off. With a little nudge in the right direction from Victor and lot of creative thinking, I figured it out, and was very pleased with myself. (Image 1)
Unfortunately, due to what APPEAR to be unpredictable delays with database record processing in Adalo, the timing sync between the audio file and the countdown timer is not reliable. The remaining time in the countdown timer and the remaining time in the audio file is often off by as much as 7-10 seconds. A very frustrating discovery that meant I had to abandon it. As a result, I elected to go with a heavily stylized instance of the audio player alone (without countdown timer) to realize this functionality. It’s TECHNICALLY a 100% viable solution, but AESTHETICALLY not what I want. The “time remaining” is just so small. (Image 2)
Soooo… does anyone have any creative workarounds I’m missing? Big, bold “Time Remaining” in the audio player above the progress bar would probably be good enough for me. Being able to control the color and text in the player would be nice, but it seems that’s not possible.
In lieu of that, I’d be very open to paying for an audio player/countdown timer customized to my needs. Adalo’s audio player is great, but doesn’t have the countdown component I need. Some of the countdown timers out there are great, but lack the audio cues I need.
In my opinion only custom component will help in this case. You may try to post the request for such component here: Jobs / Freelance - Adalo
I tried something similar to your task long time ago and based on my experience it is almost impossible to sync timer & audio - most probably due to delays in the commands’ execution.
Thanks Victor. I’ve gotten REALLY close (consistently within 1 second) using a combination of trial and error, and contributions from you and @Flawless. I’ll try to share my homework once I’ve settled on the final deployment of this.
From my point of view, the main issue with syncing countdown timer & audioplayer is that such solution is unreliable. It may work at a certain point of time, but there no reliable direct sync (and basically you need to use calculated assumptions when you need to start/stop audio).
If something happens (for instance, audioplayer will start playing later because file download took longer, or timer starts later because of device load, or something else) - all breaks down.
I’ve spent quite a bit of time experimenting
So in my opinion this could work for POC, but not for a commercial app. But this is my personal point of view
Hmmm. You may be right @Victor. I tried my test again today, and it’s nowhere near as accurate as it was the last time I used it.
I wonder if there may be a way to call up very short, individual audio files for my “Halfway”, “1 Min Remaining” etc. audio cues. That way, even if the timer isn’t 100% accurate, it’d be less of an issue, as it doesn’t need to be in-sync with a longer audio file. It just needs to call up those files when needed.
I’m imagining visibility toggles for audio player components that autoplay small, individual files. Possibly utilizing Pragmaflow’s timer component to address visibility? I’m still thinking through it, but if you have any ideas I’m open to them.