<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<video id="myVideo" style="max-height: 100%; width: 100%" autoplay src="1.mp4"/>
</body>
</html>
<script>
const video = document.getElementById("myVideo");
const videos = ["1.mp4", "2.mp4"];
let index = 0;
video.addEventListener("ended", function() {
index++;
if (index == videos.length) {
index = 0;
}
video.src = videos[index];
video.play();
});
</script>
谷歌浏览器处理
"C:\Users\Administrator\AppData\Local\Google Chrome\Chromebin\chromeX.exe" --autoplay-policy=no-user-gesture-required --kiosk file:///C:/media/video.html