Results 1 to 2 of 2

Thread: HTML5 audio issues with audio.js

  1. #1
    Join Date
    Nov 2006

    HTML5 audio issues with audio.js

    I am using a javascript library called audio.js to serve HTML5 audio with a flash fallback. I have it working now in all modern browsers and Android and iOs, but there's one issue I just can't seem to fix, and that is that in Firefox or Android, when I use the callback fired on track ending, I cannot replay the audio. The file is stuck at the end of playback.

    The project is a slideshow whose logic depends on the callbacks fired when each track ends. Here's how I'm trying to use the callback:

    audio.trackEnded=function() {
        // operate on the DOM
    and here's the bit from the audio.js API:

    trackEnded: function(e) {
          this.skipTo.apply(this, [0]);
          if (!this.settings.loop) this.pause.apply(this);
    I have not had any luck delving into the API to try to figure out how to reset the audio file. All I know is that no matter what I put in the trackEnded function, in the browsers that need the flash the file freezes at the end, and when I remove that function, the audio resets just fine. And trying to operate on the audio element itself, by setting currentTime = 0; breaks the whole thing.

    Here's a demo of the audio freezing, which you can see after clicking into the slideshow:


    Any insight into how I might go about solving this would be super appreciated.

    Here's a link to the audio.js API: http://kolber.github.com/audiojs/docs/


  2. #2
    Join Date
    Nov 2006

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center