javascript - BigVideo.js URL redirect at end of playback -


i have implemented background video on page using bigvideo based off video.js

when div clicked, video plays in background. cannot life of me figure out how redirect url when video done playing. code using:

link play video:

<a href="vids/gem.mp4" class="home_g"></a> 

code redirect when ended:

<script type="text/javascript"> _v_("home_g").ready(function(){     this.addevent("ended", function(){         {window.location = "www.google.com"}     }); }); 

any appreciated. here full test site: test site

after trying few days work correctly, i've resorted making redirect based on time of video if else has same problem. if has answer make work correctly great, if not else did:

<script type="text/javascript">    redirecttime = "107000";    redirecturl = "index.htm";    function timedredirect() {    settimeout("location.href = redirecturl;",redirecttime);    } </script>  <a href="vids/gem.mp4" class="home_g" onclick="javascript:timedredirect()"></a> 

try this:

var bv = new $.bigvideo();  bv.init();   bv.getplayer().on("ended", function () {     // code after video has finished playing }); 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -