Redirect 视频完成后重定向

Redirect 视频完成后重定向,redirect,mediaelement.js,Redirect,Mediaelement.js,我是mediaelements.js的新手 在我的视频结束时,我希望用户被重定向到另一个页面 我试过类似的东西 <script> $(function(){ $('audio,video').mediaelementplayer({ success: function(player, node) { window.location = "http://google.com"; })

我是mediaelements.js的新手

在我的视频结束时,我希望用户被重定向到另一个页面

我试过类似的东西

<script>
$(function(){
        $('audio,video').mediaelementplayer({
            success: function(player, node) {
                window.location = "http://google.com";
                });
            }
        });
    });


</script>

$(函数(){
$(“音频、视频”).mediaelementplayer({
成功:功能(播放器、节点){
window.location=”http://google.com";
});
}
});
});

但我一点也没有成功,也许有人会有一个想法,这对我来说很有用player1'是视频的id

<script>
new MediaElement('player1', {

success: function (mediaElement, domObject) { 

// add event listener
mediaElement.addEventListener('ended', function(e) {

       //Do Stuff here
       //alert("sometext"); 
       window.location = "http://google.com";

        }, false);
    },
});
</script>

新MediaElement('player1'{
成功:函数(mediaElement,domObject){
//添加事件侦听器
mediaElement.addEventListener('ended',函数(e){
//在这里做事
//警报(“sometext”);
window.location=”http://google.com";
},假);
},
});

我发布的代码是针对媒体元素播放器的。我看你正在使用你发布的链接中的video.js播放器。我不确定那会怎样,但我确实发现了这个

谢谢ShockTower,你会有一个有功能版本的url吗?因为我无法使用我当前的url是Advanced thank you in AdvanceUps,我尝试了错误的js库,请原谅我工作得很好,非常感谢,请原谅我的愚蠢