Hi folks,

after more hours than i'd care to admit searching for a problem, I've created a very simple fix for an issue I encountered using lightbox2 and the Video module.

The problem:

Using http://drupal.org/project/video to import & convert files to .flv format, I was unable to get the resulting file to play using lightbox2's lightvideo tag.

The solution:

It turns out that the video module *appends* the extension to converted files. ie: "video.wmv" becomes "video.wmv.flv". The lightbox_video.js when determining file type uses the regular expression href.match(/\.filetype/i)) to establish how to handle the video. the results in returning a false positive when encountering files with more than one viable extension.

To correct this, I've modified the expression to href.match(/\.filetype$/i)), so it now looks to the end of the string for the extension type.

I'm attaching a patch for anyone else who may find this useful!

CommentFileSizeAuthor
lightbox_video_regex.patch2.69 KBjbenjamin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stella’s picture

Status: Patch (to be ported) » Fixed

I committed the regular expression changes, but not the other changes included within the patch, just fyi. Thanks for the fix!

Cheers,
Stella

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.