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

autoplay property

Gets or sets a value that indicates whether to start playing the media automatically.

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

Syntax

object.put_autoplay( autoplaystate);object.get_autoplay(* autoplaystate);

Property values

Type: VARIANT_BOOL

FALSE (false)

Default. The media is paused until play is called.

TRUE (true)

The media is played after it buffers enough data.

Standards information

Remarks

You can use the autoplay attribute rather than script to force the audio or video to play. The presence of the autoplay attribute, regardless of assigned value, in either the audio or video element equals true (for example, <audio autoplay=""> 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> 


See also

autobuffer

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.