Embed Vimeo Videos Automatically (or “I’m Not Really a Nerd”)

Apr 15 2009

I’ve always wanted to automatically embed my most recent Vimeo upload without ever having to update the embed code. I’ve tried doing this with their widget builder, but the best I could get was a thumbnail with a link or a flash application that did a lot more than a simple embed of a video. Sadly, this could not be achieved.

This evening I decided to play around with a little script to do this for me in php. It worked just fine, but when I showed my roommates they told me I should sell it. I don’t really want to sell it, however, I do want to make it available for others with the same problem. so here it is.

copy this into your page:

<script type=”text/javascript” src=”http://kyleellman.com/experiments/vimeoembed.php?user=kyleellman&max=4″></script>

You’ll want to change “kyleellman” to your own username and the “max” value will max out at 20 (it’s all that Vimeo will allow) or you can completely leave off the “max=4″ and it will default to 20.

And for those of you who would like to style it with a little CSS magic, it outputs <div class=”vimeo_video”>[the embedded video]</div>.

I’d like to add more features in the future involving control over height, width, and possibly color, name, and other things the vimeo embed tool allows, but for now I’m pretty happy with it. If in the future this gains a lot of users, I’ll try to find a more permanent home for it.

Example:

2 responses so far

  1. Thanks, man! I’ve been trying to find a solution for this for a while. I’m excited to try this.

  2. are you making the PHP scrip available?

Leave a Reply