我想出了重定向部分(我认为......见下文),但问题是当我返回带有嵌入视频的页面时,它会立即将我传送到重定向页面。所以我想如果我可以在重定向发生之前让视频卸载或重置到视频的开头,那么我会解决这个问题。
想法?
<div class="video"><iframe src="https://player.vimeo.com/video/253989945?byline=false&playsinline=0&portrait=false&title=false" frameborder="0" allow="autoplay; fullscreen" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>
<script src="https://player.vimeo.com/api/player.js"></script>
<script>
var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
player.getEnded().then(function(ended) {
// `ended` indicates whether the video has ended
window.location.replace("http://www.google.com/");
});
</script>
aluckdog
相关分类