#362039 - fix for swf vs flv files
authorStella Power
Tue, 21 Sep 2010 17:52:30 +0000 (17:52 +0000)
committerStella Power
Tue, 21 Sep 2010 17:52:30 +0000 (17:52 +0000)
js/lightbox_video.js

index fa2dd58..516790a 100644 (file)
@@ -25,10 +25,13 @@ var Lightvideo = {
     }
     else {
       Lightbox.videoId = href;
-      href = Lightbox.flvPlayer + '?file=' + href;
-      if (Lightbox.flvFlashvars.length) {
-        variables = Lightbox.flvFlashvars;
-        href = href + '&' + Lightbox.flvFlashvars;
+      variables = '';
+      if (!href.match(/\.swf$/i)) {
+        href = Lightbox.flvPlayer + '?file=' + href;
+        if (Lightbox.flvFlashvars.length) {
+          variables = Lightbox.flvFlashvars;
+          href = href + '&' + Lightbox.flvFlashvars;
+        }
       }
 
       Lightvideo.createEmbed(href, "flvplayer", "#ffffff", variables);