0

I have a audio tag in my page, I bind an event handle to the ended event:

    $('#audio').bind('ended', function() {
        console.log('ended');//I can see this
        $('#audio')[0].play();// but it could not play again
    });

at first I play it:

$('#audio')[0].play()

the problem is, it can be played, and in the play end,I also coulds see the console info, but it can not be play again,how can I solve this problem?

hh54188
  • 14,887
  • 32
  • 113
  • 184
  • Can you setup jsfiddle.net of your code? Is this any particular browser or all browsers? Is #audio the actual Audio element or a container, maybe ended event is bubbling up to a div called #audio? – Neil Jun 27 '12 at 08:53
  • Have you tried pure Javascript - eg: http://stackoverflow.com/questions/3273552/html-5-audio-looping – Neil Jun 27 '12 at 08:56

0 Answers0