Advertisement
Guest User

Untitled

a guest
May 24th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. /**
  2. * Callback for when a video finishes
  3. */
  4. function afterVideoFinished(player, callback) {
  5. player.addEvent('ready', function() {
  6. player.addEvent('finish', function(data) {
  7. callback();
  8. });
  9. });
  10. }
  11.  
  12. $(document).ready(function() {
  13. var player = $f($('.video-container iframe')[0]);
  14. afterVideoFinished(player, function() {
  15. // this will happen once the video has finished
  16. });
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement