doub1ejack
doub1ejack

Reputation: 11171

Why can't I get the Vimeo api working?

I should be able to use vimeo's Froogaloop library to interact with the videos, but I'm having trouble getting it going.

I thought that when Froogaloop is loaded it would automatically attach the api() and addEvent() functions to all the iframe elements, but that doesn't seem to be true.

Ultimately, I need to hook into the 'finish' event.

example: http://jsfiddle.net/doub1ejack/xa2Dt/2/

Upvotes: 0

Views: 231

Answers (1)

doub1ejack
doub1ejack

Reputation: 11171

Ok, so there were several things wrong with that code:

  1. Froogaloop does not automatically add the api functions to vimeo iframes when it loads
  2. The iframe must have a source url that specifies a player_id via query string parameter (eg http://player.vimeo.com/video/1325670?api=1&player_id=sb-player
  3. The player_id must be the same as the id of the iframe
  4. And probably some other stuff i'm forgetting right now

I have a thread of jsFiddle attempts documented on the Vimeo Forums. Ultimately, I got the most value out of a simple vimeo api script that i converted into another jsFiddle.

Best of luck. It's kind of messy stuff.

Upvotes: 1

Related Questions