-
Dear community, I would like to add a progress ticker that calls a custom function every second and passes in the current playtime of the episode. How can I do that? My understanding is that there are no less than 3 layers (!) handling the audio. just audio is the player <-> wrapped by audio service for background playback <-> audio bloc What is the function then of audio bloc? I have set up android studio with flutter/dart and can run the App on a virtual device. This is what I considered so far:
I would appreciate if someone could just give me a short list of steps that I need to do. I come from java/kotlin development for Android. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
Hi @Ra-Na, The role of the BLoCs is to handle communication between the UI and lower service layers, this is why I pause the ticker when the app goes into the background as there is no UI to update (and pausing it might save a bit of battery). I'm not sure if your progress ticker needs to tick all the time or just when an episode is playing, but there are a couple of ways you could do this.
|
Beta Was this translation helpful? Give feedback.
-
Hello Ben, since a week now I am meditating over your code. It works like a charm. I have compared to some other open source podcast players for mobile devices, and it is most clean while including anything one may need. Thus I stick with it, although I am new to flutter/dart. But it requires a lot of effort to fully understand the flow of data. The code may benefit from a refactoring and a more detailed documentation. This might help to acquire more developers. Anyway, to the point: I think the easiest way to include my function into the code is in Full disclosure: I am implementing a listener that skips ads, similar to SponsorBlock on Youtube. I have implemented the other missing pieces, namely a web service to report and look up ad segments and automatic detection of common text snippets in different audio files. The integration with a PodCatcher seems to be the hardest part. I know that ad blocking is a controversial subject and understand and respect that others may disagree. For me, this project is mostly educational, but if something useful comes out, even better. Have a nice day, Rainer |
Beta Was this translation helpful? Give feedback.
-
Hi @Ra-Na, Thank you for the feedback. I'm always looking to improve documentation. Are there any particular areas you think need refactoring and what type of documentation do you think would improve the project - more code comments, more overall code about the architecture for example? You could hook into the I hope you have a lot of fun developing your project. |
Beta Was this translation helpful? Give feedback.
-
Hello! Just wanted to inform you that I achieved what I wanted, but learned afterwards that ads are dynamically added to podcasts. A static timestamp is useless, one needs a dynamic ad detection. It is really hard to get this done. There is a discord channel where developers discuss this, but it seems pretty hopeless for now. The head of the "movement" is this guy: https://github.com/ajayyy, if you are interested. Have a nice day, Rainer |
Beta Was this translation helpful? Give feedback.
-
Hi. Yea, Dynamic Ad Insertion (DAI) is frustrating! It pushes timestamps out often rendering chapters and especially transcripts somewhat useless as they end up out of sync. More recently, disgruntled users who are annoyed by the adds are complaining to podcast developers and leaving poor app reviews as they think the apps are putting these adds in to make money, and don't realise they come from the hosting and ad companies. Personally, I don't have any issue with advertising, but I find the lazy and poor implementations of ads frustrating. It could be done so much better. |
Beta Was this translation helpful? Give feedback.
Thank you very much. I will try the second approach.