简体   繁体   中英

Does iPad clear any earlier buffered audio, once i play a new audio?

I am trying to load and play few audio files in sequential order one by one, after user interaction (since only one audio file can be played at a time on iPad). I load all the audio files on user interaction and store them in different audio objects. While playing these files, any file played previously can play again. In this scenario, audio is not getting buffered again when I call play on that object. Is it a known fact the iPad clears all the buffered audio when it tries to play a new audio file?

I suggest looking at using a sound "sprite", essentially loading one sound file that contains all your audio (with gaps inbetween each) and jumping to particular points in that file. If you believe it is un-buffering after finishing you can always keep it playing a silent track within this sprite so you are continuously jumping around the one buffered track.

Zynga Jukebox is an easy to use open-source JavaScript API for handling this, which allows you to specify at what time slots each "track" is and play each track on-demand.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM