Running audio in background while still offline - podcast episode cover

Running audio in background while still offline

Mar 17, 20253 minSeason 5Ep. 8
--:--
--:--
Download Metacast podcast app
Listen to this episode in Metacast mobile app
Don't just listen to podcasts. Learn from them with transcripts, summaries, and chapters for every episode. Skim, search, and bookmark insights. Learn more

Episode description

In a web application what are the ways one can use custom audio file for notification on user devices while the user is offline.

Running audio in background while still offline

Transcript

Narrator

You're listening to the Call Kent podcast where Kent C. Dodds answers questions and gives insights to software engineers like you. Now let's hear the call.

Mohammad

Hey, Kent. My name is Mohammad Azim. Greetings, first of all. I was building a prayer time application, and I came around the situation where I have to do a prayer call on the user end device. So is there any way that I can run audio files in background of web application by using some service worker while the user is still offline And the and the precise timing precise timing of the prayer call is essential for this. So thanks in anticipation.

Narrator

And that was the call. Here's what Kent had to say.

Kent

Hey, Mohammad Amzim. Thank you for the question. I unfortunately don't have a ton of experience with this specifically, so I'm not gonna be able to give you a lot of help, but I can give you some direction on what I would try if I had this sort of use case. Really, the first thing I would do is ask AI to give me some specific things that I can look up. Even just asking AI, is this a thing that can be done?

Can be a really useful question, and I'm pretty sure that the answer is yes. You should be able to cache audio files in the service worker, and then serve those from the service worker as well. So I think that you're on the right track to give this a shot, And then hopefully, AI can help you make that happen. Of course, like, you could code it up the way that we used to back in the good old days before AI, where you're looking up the documentation on MDN and that sort of thing. But I think that AI will get you there a lot faster.

So give that a try. I hope that it's helpful to you, and I hope you have a nice day.

Narrator

This has been the Call Kent podcast. Learn more about Kent at Kent C Dodds dot com and get your own questions answered at KentCDodds.com/calls.

Transcript source: Provided by creator in RSS feed: download file
For the best experience, listen in Metacast app for iOS or Android