
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
Play infinitely looping video on-load in HTML5
The <video> tag specifies video. Currently, there are 3 supported video formats for the <video> element that are MP4, WebM, and Ogg. Autoplay is used to start the video when the video and page loads.
The loop attribute is a boolean attribute. When present, it specifies that the video will start over again, every time it is finished.
The loop attribute should do it.
<video width="600" height="500" autoplay loop> <source src="movie.mp4" type="video/mp4" /> <source src="movie.ogg" type="video/ogg" /> Your browser does not support the video element. </video>
If you have a problem with the loop attribute, listen to the videoEnd event. After that call the play() method when it fires.
- Related Articles
- Play local (hard-drive) video file with HTML5 video tag?
- Play video on canvas and preserve the last frame/image on HTML5 Canvas
- HTML DOM Video play( ) Method
- HTML5 inline video on iPhone vs iPad/Browser
- HTML DOM Video load( ) Method
- HTML5 Audio to Play Randomly
- How to use JavaScript to play a video on Mouse Hover and pause on Mouseout?
- HTML5 video not working with jquery bxSlider plugin on iPad
- Commonly used Video formats while using HTML5 video
- HTML5 video not playing in Firefox
- HTML5 video full preload in JavaScript
- Play a video in reverse mode using Python OpenCv
- How to play YouTube video in my Android Application?
- How to play audio and video file in iOS?
- How to play HTML5 Audio Randomly

Advertisements