Autoplay video attribute not working

I was playing around with the element of html, and I noticed that it autoplay doesn’t actually work. This is the code:

<video src="" autoplay controls >

and this is the link to the lesson:

I’ve tried loop and controls, and they both work fine. Am I doing something wrong here?
Thank you for your help in advance


In some browsers (e.g. Chrome 70.0) autoplay doesn’t work if no muted attribute is present. -MDN

Autoplay will work on Chrome if the video is muted, you can just add the word muted after autoplay

Autoplay Policy Changes - Google


I am using edge but its still not working.

Hi and welcome!

Would you mind showing us your code? If you decide to do so, remember posting code like this.

Although able to autoplay videos in html but unable to unmute the video. Below is the code:

<meta charset="UTF-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<video id="myvideo" src="vid.mp4" controls muted autoplay loop width="400"></video>


    function toggleMute() 


        var video = document.getElementById("myvideo");

        if (video.muted) 


            video.muted = false;





            video.muted = true;




    $(document).ready(function () 


        setTimeout(toggleMute, 3000);