Hi!
I have been happy using TaifunPlayer for some time so thank you for the extension. Though while testing slightly modified version for Android 11+ I got this error. It works most of the time and it is not easy to reproduce the error.
To do what?
Please explain exactly what this is all about. (I actually thought I was pretty familiar with (audio) player extensions after more than 10 years.)
Hi Anke,
Thanks for looking into this.
These particular blocks calculate audio duration of an mp3 file. The duration value of TaifunPlayer is 0 after source is set. Only when playing starts then duration is set after some time.
I am developing an mp3 player app with special features like auto-play at particular time, auto-play to finish at particular time, countdown etc. For this to work I need to know mp3 duration before actually playing it. Therefore I save current volume to a temporary variable, set volume to 0, start playing, get duration, stop and restore original volume.
I agree that the infinite while loop waiting for duration to become available is not a clean solution. I could rewrite it with a separate timer but there probably are better options.
Thanks