To initiate automatic playback of a video, utilize the autoplay attribute:
<video width=”320″ height=”240″ autoplay> <source src=”movie.mp4″ type=”video/mp4″> <source src=”movie.ogg” type=”video/ogg”> Your browser does not support the video tag. </video> |
Note that in Chromium browsers, autoplay is generally restricted. However, muted autoplay is consistently permitted. |
In Chromium browsers, autoplay is typically restricted, but muted autoplay is always allowed.
<video width=”320″ height=”240″ autoplay muted> <source src=”movie.mp4″ type=”video/mp4″> <source src=”movie.ogg” type=”video/ogg”> Your browser does not support the video tag. </video> |