Prateek Dhantole
Prateek Dhantole

Reputation: 11

In html page video tag is not playing on page load

Here is my code of video tag but it is not working properly on page load, should i need any preloader to autoplay the video on page load`

<video id="video_player"  width="100%" autoplay="1">
    <source src="video/banner-video1.mp4" type="video/mp4">
</video>

Upvotes: 1

Views: 378

Answers (1)

Luk&#225;š Irs&#225;k
Luk&#225;š Irs&#225;k

Reputation: 1132

If you just want to autoplay video:

<video id="video_player"  width="100%" autoplay>
    <source src="video/banner-video1.mp4" type="video/mp4">
</video>

Here is more about it: https://www.w3schools.com/tags/att_video_autoplay.asp

Upvotes: 2

Related Questions