MDN self-hosted library · e01.org

HTMLMediaElement: autoplay property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<video id="video" controls>
  <source
    src="https://player.vimeo.com/external/250688977.sd.mp4?s=d14b1f1a971dde13c79d6e436b88a6a928dfe26b&profile_id=165" />
</video>
js
// Disable autoplay (recommended)
// false is the default value
document.querySelector("#video").autoplay = false;