Vimeo Javascript

Recently I needed to be able to control the Vimeo player on a site I was making. While Vimeo makes their best effort to showcase the API I had to dig a bit to figure out how to simply tell the player to play. So here’s a quick step by step to using the Vimeo javascript API. First you’ll need to download the Froogaloop library, and here’s the player API reference

  1. Get the Universal player embed code (the iframe code) for your video
  2. add api=1 to the parameters in the iframe’s src (src=”http://player.vimeo.com/video/734245464?title=0&byline=0&portrait=1&api=1“)
  3. give your iframe tag an id
  4. Add the Javascript
    1.  
    2. <script type="text/javascript"><!–mce:1–></script>
  5. Read the API to see what else you can do!