Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

When you will implement the HTML5 video loop attribute?

  • 3 trả lời
  • 472 gặp vấn đề này
  • 135 lượt xem
  • Trả lời mới nhất được viết bởi rthawkcom
  • Đã lưu trữ

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.

Tất cả các câu trả lời (3)

A quick Jquery solution

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

Được chỉnh sửa bởi TimVs.be vào

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

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

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