搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

When you will implement the HTML5 video loop attribute?

  • 3 个回答
  • 472 人有此问题
  • 38 次查看
  • 最后回复者为 rthawkcom

more options

I know there is an add-on "Media Loop" for Firefox that implements the loop attribute for HTML5 videos/audios, but I don't want to force every visitor of my site to install it.

I know there is an add-on "Media Loop" for Firefox that implements the loop attribute for HTML5 videos/audios, but I don't want to force every visitor of my site to install it.

所有回复 (3)

more options

A quick Jquery solution

  • $("#yourID").bind('ended', function(){
  • this.play();
  • });

由TimVs.be于修改

more options

or just add to the video tag: onended="this.play()" No need for Jquery!

more options

Just how do you add it to the video tag!? Next time, post a working example.

document.getElementById('video').addEventListener("ended", function(){this.play();});