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!
Comment | File | Size | Author |
---|---|---|---|
lightbox_video_regex.patch | 2.69 KB | jbenjamin |
Comments
Comment #1
stella CreditAttribution: stella commentedI committed the regular expression changes, but not the other changes included within the patch, just fyi. Thanks for the fix!
Cheers,
Stella