autoplay property
Gets or sets a value that indicates whether to start playing the media automatically.
![]() ![]() |
Syntax
HRESULT value = object.put_autoplay( v);HRESULT value = object.get_autoplay(* p);
Property values
Type: VARIANT_BOOL
VARIANT_FALSE (false)
-
Default. The media is paused until IHTMLMediaElement::play is called.
VARIANT_TRUE (true)
-
The media is played after it buffers enough data.
Standards information
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.8.9.7
Remarks
You can use the IHTMLMediaElement::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).
See also
Build date: 11/12/2012

