Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

loop property

Gets or sets a flag to specify whether playback should restart after it completes. Playback restarts when this flag is present on an element, or set to true on an object. Playback doesn't restart when this flag is absent from an element, or set to false on an object.

HTML5 A vocabulary and associated APIs for HTML and XHTML, Section Explorer 9




      * loopFlag);

Property values

Type: boolean

In a video or audio element, this attribute is true by its presence, false by its absence.

Standards information


The presence of the loop attribute, regardless of assigned value, in either the audio or video element equals true (for example, <audio loop=""> is true).


<!DOCTYPE html>
    <title>Simple Video flags example</title>
      <!-- Uncomment the following tag when developing on a local or intranet computer -->
      <!-- <meta http-equiv='X-UA-Compatible' content="IE=edge" /> -->
<video id="video1" controls autoplay loop >HTML5 video is not supported
  <source src="video.mp4" />



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.