Gets or sets a value that indicates whether to start playing the media automatically.
HRESULT IHTMLMediaElement::get_autoplay(VARIANT_BOOL *p);HRESULT IHTMLMediaElement::put_autoplay(VARIANT_BOOL v);
- Pointer to a variable of type VARIANT_BOOL that receives one of the values listed in Possible Values.
- VARIANT_BOOL that specifies one of the values listed in Possible Values.
VARIANT_FALSE Default. The media is paused until play is called. VARIANT_TRUE The media is played after it buffers enough data.
Returns S_OK if successful, or an error value otherwise.
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).