Anders Brohäll

Anders Brohäll

We're using javascript to include a movie on the site.
Based on the data-id in div.vimeo we trigger a callback to the API
Example: vimeo.com/api/oembed.json?url=http%3A%2F%2Fvimeo.com%2F47712059&callback=window.view.vimeo.embedVideo&width=958&byline=false&portrait=false&title=false&api=true&wmode=opaque

The response ({video}) triggers a embedVideo method, executing $('.vimeo[data-id="' + video.video_id + '"]').html(window.unescape(video.html));

60% of the time, it works every time.

Every now and then the video isn't loaded. I guess it's one embed out of thousand (or even less often) that doesn't. From what I've understand this is related to somewhat of a overload on your servers or a timeout etc. However, our problem is that the iframe gets loaded, but stays empty, which isn't really desirable.

What would your suggestion be, is there a more reliable way to embed videos dynamically?
The problem doesn't seem to be browser specific.

Link: erasweden.com/

Anders Brohäll

Anders Brohäll

I changed the callback to ?, handling it directly in the $.getJSON() instead.

However, the problem remains, what should i do when the server is overloaded?

This conversation is missing your voice. Please join Vimeo or log in.