tara123
tara123

Reputation: 75

Video.js Redirect to URL Once Video Has Ended

I tried searching all over and couldn't find an answer.

this code doesn't work on latest version video.js

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

Thanks!

Upvotes: 0

Views: 1838

Answers (1)

misterben
misterben

Reputation: 7821

videojs("example_video_1").on("ended", function() {
  window.location = "http://www.google.com";
});

Upvotes: 1

Related Questions