Why won't my HTML5 audio loop?

后端 未结 2 1456
长发绾君心
长发绾君心 2020-12-10 09:43

The site is up at: http://ajf.me/stuff/eva at the time of writing. The source code is this:





        
2条回答
  •  伪装坚强ぢ
    2020-12-10 10:15

    You can just do this

    The attributes do not need to have anything else.


    EDIT

    According to this, Firefox doesn't like loop. It suggests a js solution:

    document.getElementById('audio_2').addEventListener('ended', function(){
        this.currentTime = 0;
    }, false);
    

    http://forestmist.org/2010/04/html5-audio-loops/


    EDIT

    HTML5 audio loop now works with firefox. Confirmed in version 26.0 (might have been earlier)

提交回复
热议问题