summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStella Power2010-09-21 17:50:54 (GMT)
committer Stella Power2010-09-21 17:50:54 (GMT)
commitfd6f92af03f36100e8b67f36066e33d6d7707790 (patch)
tree0f95706d160e49490654f1a67f91b1cb045d9f8a
parent821e409c095dc4bbdbb95113611e8465d264480b (diff)
#362039 - fix for swf vs flv files
-rw-r--r--js/lightbox_video.js10
-rw-r--r--lightbox2.admin.inc2
2 files changed, 7 insertions, 5 deletions
diff --git a/js/lightbox_video.js b/js/lightbox_video.js
index 11d06a6..dfdc124 100644
--- a/js/lightbox_video.js
+++ b/js/lightbox_video.js
@@ -25,10 +25,12 @@ var Lightvideo = {
}
else {
Lightbox.videoId = href;
- href = Drupal.settings.basePath + Lightbox.flvPlayer + '?file=' + href;
- variables = '';
- if (Lightbox.flvFlashvars.length) {
- variables = Lightbox.flvFlashvars;
+ if (!href.match(/\.swf$/i)) {
+ href = Drupal.settings.basePath + Lightbox.flvPlayer + '?file=' + href;
+ variables = '';
+ if (Lightbox.flvFlashvars.length) {
+ variables = Lightbox.flvFlashvars;
+ }
}
Lightvideo.createEmbed(href, "flvplayer", "#ffffff", variables);
diff --git a/lightbox2.admin.inc b/lightbox2.admin.inc
index 03ae46e..2ef0b5c 100644
--- a/lightbox2.admin.inc
+++ b/lightbox2.admin.inc
@@ -528,7 +528,7 @@ function lightbox2_general_settings_form_validate($form, &$form_state) {
$slide_down_speed = $form_state['values']['lightbox2_slidedown_speed'];
$flv_player_path = $form_state['values']['lightbox2_flv_player_path'];
- if ($flv_player_path != '' && $form_state['values']['lightbox2_enable_video']) {
+ if (!empty($flv_player_path) && $form_state['values']['lightbox2_enable_video']) {
if (strpos($flv_player_path, base_path()) === 0) {
$flv_player_path = drupal_substr($flv_player_path, drupal_strlen(base_path()));
}