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 4.8.9.6Internet Explorer 9

Syntax

object.put_loop(boolean

       loopFlag);object.get_loop(boolean

      * loopFlag);

Property values

Type: boolean

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

Standards information

Remarks

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).

Examples


<!DOCTYPE html>
<html>
  <head>
    <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" /> -->
</head>
<body>
<video id="video1" controls autoplay loop >HTML5 video is not supported
  <source src="video.mp4" />
</video>
   
</body>
</html> 


 

 

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.