fancyapps/fancyBox — pull request #327 by markashleybell (2012-08-02 10:30:18+00:00)
Title: Add support for Vimeo direct embed URLs to media helper

Hi,

I've just been integrating fancyBox with a client's site and come across an unusual use case; the client hosts their videos on Vimeo, but has hidden them from public view on Vimeo itself. This of course means the media helper doesn't work, because it can't find the video using the standard Vimeo url (which will return a 404).

I've tweaked the href regex slightly so that it matches the direct player/embed URLs as well as the standard ones. In the page we just link directly to the player URL and the helper seems to work nicely again.

I thought this might be a simple tweak you could integrate, in case anyone else encounters this use case.

Here are some URLs I used to test the regex, which might come in handy:

http://vimeo.com/40648169
http://vimeopro.com/40648169
http://vimeo.com/40648169/
http://vimeo.com/channels/staffpicks/38843628
http://vimeo.com/groups/surrealism/videos/36516384
http://player.vimeo.com/video/45074303
http://vimeo.com/40648169?test=1&test2=2
http://player.vimeo.com/video/40648169#t=1
http://vimeo.com/channels/staffpicks/38843628?t=1
http://vimeo.com/groups/surrealism/videos/36516384#x=0

Kind regards,
Mark B