Reputation: 19
I made this html code to simulate a Windows 95 Startup sequence. Here it is:
<!DOCTYPE html>
<html style="background-color: #000000">
<head>
<title>Windows 95 Startup</title>
</head>
<body>
<script src="https://code.jquery.com/jquery-2.1.0.js"></script>
<script>
var startup = function () {
$("body").append('<center><img src="https://springsadvertiser.co.za/wp-content/uploads/sites/28/2016/01/win95-hero.jpg"></center><video controls autoplay><source src="https://www.winhistory.de/more/winstart/down/o95.wav" type="audio/wav"></video>');
};
setTimeout(startup, 10000);
</script>
</body>
</html>
Why won't the video element auto-play, and how do I fix it to auto-play without being muted?
Upvotes: 1
Views: 56
Reputation: 26
Unfortunately for you, a video on autoplay has to be muted. You can mute the audio using the muted keyword as <video controls muted autoplay><source src="https://www.winhistory.de/more/winstart/down/o95.wav" type="audio/wav"></video>
. But, I doubt this is what you want to do.
Edit: This is due to Autoplay Policy Changes.
Upvotes: 1