2
votes

So maybe someone has experience with advanced audio handling in mobile browsers!

I have problems in setting the current time of the audio player. On desktop browsers and iOS it all works perfect. I set the current time to my next sprite and then play until current time reaches the end of my sprite.

On android I set the current time and after the first timeupdate-event gets fired the current time of my audioplayer is about 15-20 sec later!!! So my sprite will not be played because my sprites are only 8 sec long.

I really need that sprite handling, because on mobile browsers we can only access one player and I dont wanna waste time in creating and audio element, downloading the source and set the src. This takes to much time...

I will also be very happe if there is another solution. Someone tried to have the audio player and stream audio in that from an server??

1

1 Answers

2
votes

If anybody is interested, I have a solution!

The fault was to export the audio file (mp3 for android browser) with Bit Rate Mode Variable. Firstly I choose variable bit rate mode, beacause I have a lot of empty space between my sprites and with this option I can save filesize! Though the codecs for android browsers can handle those variable data, but when I try to set an explicit time to my file it sets maybe 10-12 sec earlier or later. It depends on how you accidently strike a variable datablock or not.

To not get in trouble with variable data blocks, I exported my mp3 as Preset Bit Rate Mode with a Medium quality (145-185 kbps). My file is about 30% greater than the Variable Bit Rate Mode, but it WORKS NOW!!