页面入场视频播放完成后衔接循环视频播放实现方式
<div class="video">
<video src="//cdn.xxx.com/123.mp4" class="videos" id="startVideo" autoplay muted preload></video>
<video src="//cdn.xxx.com/456.mp4" class="videos" id="endVideo" autoplay muted preload loop></video>
</div>
<script>
$(function() {
var startVideo = document.getElementById("startVideo");
var endVideo = document.getElementById("endVideo");
startVideo.addEventListener("timeupdate", function(e) {
if (startVideo.currentTime.toFixed(2) >= startVideo.duration) {
$("#startVideo").hide();
$("#endVideo").show();
endVideo.play();
}
});
});
</script>