I am using a javascript shim called audio.js to deliver HTML5 sound with flash backup. I work now in all modern browsers, both Android and iOs, but there is one problem that I just can’t fix, and that in Firefox or Android, when I use the callback launched at the end of the track, I can’t play audio . The file is stuck at the end of playback.
The project is a slide show whose logic depends on callbacks that start when each track ends. This is how I try to use the callback:
audio.trackEnded=function() {
}
and here is a bit from the audio.js API:
trackEnded: function(e) {
this.skipTo.apply(this, [0]);
if (!this.settings.loop) this.pause.apply(this);
this.settings.trackEnded.apply(this);
}
API, , reset . , , , , trackEnded, , , , , . , currentTime = 0; .
, -:
http://www.jontakiff.com/audio-playback/skeleton.html
, , .
: API audio.js: http://kolber.github.com/audiojs/docs/