1. Add Vimeo iframe
<iframe id="vimPlayer" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
2. Load Froogaloop and add some Javascript
var vimID = ""; var playerID = "vimPlayer"; $("#vimPlayer").attr("src", "//player.vimeo.com/video/"+vimID+"?api=1&title=0&byline=0&portrait=0&color=f00010&player_id="+playerID); Froogaloop(jQuery('#'+playerID)[0]).addEvent('ready', ready); function ready(playerID){ Froogaloop(playerID).addEvent('play', play(playerID)); Froogaloop(playerID).addEvent('seek', seek); Froogaloop(playerID).api('play'); } function play(playerID){ alert(playerID + " is playing"); } function seek() { alert('Seeking'); }
This will add a READY event for the player, which allows you to handle other stuff within that function from that point on. Like making the video responsive using fitVid for example :)
Its important that you reference the playerID in the actual iframe source or the ready function will never fire !
BOOKING SOLUTIONS 202x This is my take on a subset of booking, appointment, PMS or… Read More
THE GOAL Create a system cron for WordPress, that is accessible and can be easily… Read More
2024, what's cooking? Slowly getting into the 2024 spirit. 3 projects coming to a close… Read More
Short look back at 2023 This has been a busy and interesting year. I am… Read More
Elementor Pro provides grid containers as an experimental feature. The options provided are limited, when… Read More
Archaeology Travel is an online travel guide for people who enjoy exploring the world’s pasts.… Read More