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="https://codecademy-content.s3.amazonaws.com/courses/Semantic+HTML/dog+video.mp4" 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
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 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>
var video = document.getElementById("myvideo");
video.muted = false;
video.muted = true;