Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7504365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:33:01+00:00 2026-05-29T21:33:01+00:00

I just want to play several audio files sequentially using HTML5 Audio function. At

  • 0

I just want to play several audio files sequentially using HTML5 Audio function. At the end of each play, the “ended” event fires to load next audio. But in Safari 5.1 for desktop (on Mac), i found the “ended” event only fired at the end of the first play. After loading and playing the second audio, the “ended” event didn’t fire again even when the audio play did finished (I tracked this by “timeupdate” event). Even when I manually played any other audio files, the “ended” event didn’t fire again. But in Chrome and mobile safari, this problem seems not existed and the audio player can play from the first audio to the last audio continuously. Is this the bug of Safari 5.1 for Mac OS X? (I didn’t test it in Windows)

Currently, I can only use “timeupdate” event to check if the play ended or not.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:33:01+00:00Added an answer on May 29, 2026 at 9:33 pm

    Yes this is an annoying bug. You can work around this by changing the id of the audio element for each file. Here is some sample code to get an idea:

    <div id="audioDiv">
     <audio id="audio0" src="">
      <h1>Your browser does not support the audio tag.</h1>
     </audio>
    </div>
    
    <script>
    var audioCounter = 0;
    
    function next() {
     audioCounter++;
     document.getElementById('audioDiv').innerHTML = '<audio id="audio' + audioCounter + '" src="file.mp3"></audio>';
     document.getElementById('audio' + audioCounter).addEventListener('ended', next, false);
     document.getElementById('audio' + audioCounter).play();
     }
    
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just have an XP machine, and i want to play around using CC.NET.
Does NSBeep() exist on the iPhone? I just want to play a short error
I have an animation and I want it to play it just only once.
I just want a quick way (and preferably not using a while loop)of createing
I just want to see what files were modded/added/deleted between 2 arbitrary revisions. How
I just want to play a very simple, straight forward note by giving my
I'll be using a datePicker several places in my app. I don't want to
I want to play the video file and it's like http://test.XXXX.com/myfile.wmv am using Video
Specifically, I just want to record something, reverse it, and play it back. I've
I have a store and I want to play a sound just after receiving

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.