SHARE
TWEET

Untitled

a guest May 30th, 2012 297 Never
  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. var iframe = $('#vimeo').get(0),
  8. player = $f(iframe);
  9.  
  10. player.addEvent("ready", onVimeoLoaded);
  11.  
  12. function onVimeoLoaded(player_id)
  13. {
  14.         Froogaloop.init;
  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. }
RAW Paste Data
Top