redirecting the page after a video plays using an html5 video player

前端 未结 3 1591
夕颜
夕颜 2020-12-20 05:48

I am making a video reel (a portfolio) website, using wordpress as my backend, and the videojs html5 video player with each video in a different post. I want the videos to p

相关标签:
3条回答
  • 2020-12-20 06:13

    you need to call a function on ended... or the relocation just there...

    That's it.

    0 讨论(0)
  • 2020-12-20 06:21

    Ended up using the following code:

    $(document).ready(function(){
        var sStr = "<?php echo get_permalink(get_adjacent_post(true,'',true)); ?>";
        $(".video-js").bind('ended', function(){
                    window.location = sStr;
        });
    });
    
    0 讨论(0)
  • 2020-12-20 06:24

    It looks like there is an ended event that you can hook up to.

    0 讨论(0)
提交回复
热议问题