Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Callback for when a video finishes
- */
- function afterVideoFinished(player, callback) {
- player.addEvent('ready', function() {
- player.addEvent('finish', function(data) {
- callback();
- });
- });
- }
- $(document).ready(function() {
- var player = $f($('.video-container iframe')[0]);
- afterVideoFinished(player, function() {
- // this will happen once the video has finished
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement