Advertisement
Guest User

Untitled

a guest
May 28th, 2012
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var vimeo='<iframe id="vimeo" src="http://player.vimeo.com/video/........
  2.  
  3.  
  4. // Add video
  5. $("body").html( $("body").html() + vimeo);
  6.  
  7. $("#vimeo").ready(onVimeoLoaded);
  8.  
  9. function onVimeoLoaded(player_id)
  10. {
  11.     Froogaloop.init;
  12.    
  13.     var iframe = $('#vimeo').get(0),
  14.         player = $f(iframe);
  15.    
  16.     console.log('ready');
  17.    
  18.     player.addEvent('pause', onPause);
  19.     player.addEvent('finish', onFinish);
  20.     player.addEvent('playProgress', onPlayProgress);
  21. }
  22.  
  23. function onPause(id) {
  24.    console.log('paused');
  25. }
  26.  
  27. function onFinish(id) {
  28.     console.log('finished');
  29. }
  30.  
  31. function onPlayProgress(data, id) {
  32.     console.log(data.seconds + 's played');
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement