我在玩HTML5视频,在网络活动中看到,每当视频循环时,它都会显示状态(已取消)。
我使用的属性是
preload="none"
autoplay
和
loop
以下是一些示例HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>fadeIn demo</title>
<style>
.video-container {
display: none;
}
span {
display: none;
}
</style>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<div style="text-align:center">
<div class="still-container">
<img src="https://s3.amazonaws.com/collectememe/storage/video_still/4101688e-14fa-4018-b296-1514dc0d202f.jpeg" width="560">
</div>
<div class="video-container">
<video id="video1" width="560" preload="none" autoplay loop poster="test.jpeg">
<source src="https://s3.amazonaws.com/collectememe/storage/video/4101688e-14fa-4018-b296-1514dc0d202f.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
</div>
</div>
<script>
var video = document.getElementById("video1");
$( ".still-container" ).click(function() {
$(".still-container").hide();
$( ".video-container" ).fadeIn( 1000, function() {
});
return false;
});
</script>
</body>
</html>