0

I am unable to get Fancybox to load videos into the lightbox when I upload it to a server. It works perfectly when I test it locally. I have done what I believe is a vanilla install of it and it still doesn't work. I have tried using different hosts and both Firefox and Safari.

Here is an install http://zentube.tv/test2.html.

And here is my code:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>

<!-- jQuery library -->
<script type="text/javascript" src="includes/jquery-1.6.1.min.js"></script>
</script>

<!-- fancybox -->
<link href="includes/fancyBox2/source/helpers/jquery.fancybox-thumbs.css" media="screen" rel="stylesheet" type="text/css">
<link href="includes/fancyBox2/source/jquery.fancybox.css" media="screen" rel="stylesheet" type="text/css"></link>
<link href="includes/fancyBox2/source/helpers/jquery.fancybox-buttons.css" media="screen" rel="stylesheet" type="text/css"></link>
<script type="text/javascript" src="includes/fancyBox2/lib/jquery.mousewheel-3.0.6.pack.js"></script>
<script type="text/javascript" src="includes/fancyBox2/source/jquery.fancybox.pack.js"></script>
<script type="text/javascript" src="includes/fancyBox2/source/helpers/jquery.fancybox-buttons.js"></script>
<script type="text/javascript" src="includes/fancyBox2/source/helpers/jquery.fancybox-media.js"></script>

<!--**Quicktime not supported in Fancybox when using Internet Explorer-->

<script type="text/javascript">
<!-- to play quicktime MUST HAVE class="fancybox-qt"   -->
$(".fancybox-qt").fancybox({
    width : 640,
    height : 340,
    beforeLoad : function() {
        var href = this.href,
            width = this.width,
            height = this.height;

        // Check if quictime movie and change content
        if (href.indexOf('.mov') != -1) {
            this.content    = '<object width="' + width + '" height="'+ height + '" pluginspage="http://www.apple.com/quicktime/download" data="'+ href + '" type="video/quicktime"><param name="autoplay" value="true"><param name="scale" value="tofit"><param name="controller" value="true"><param name="enablejavascript" value="true"><param name="src" value="' + href + '"><param name="loop" value="false"></object>';
            this.type       = 'html';
        }
    }
});
</script>

<!-- to play media MUST HAVE class="various fancybox.iframe"   -->
<script type="text/javascript">
         $(document).ready(function() {
    $(".various").fancybox({
     maxWidth : 800,
     maxHeight : 600,
     width  : '90%',
     height  : '90%',
     openEffect : 'fade',
     closeEffect : 'fade'
    });
   });
  </script>



</head>

<body>

<!--example of relative URL quicktime video -->
<a class="fancybox-qt" title="Suwappu" href="video/birds_eye.mov" ><img src="video/cycling_large.jpg" width="200" height="115"></a>




</body>
</html>

I have looked at quite a few similar questions on Stackoverflow, but none seem to have the same problem as this.

Any help would be appreciated.

4

1 回答 1

0

我找到了它的底部 - 一个损坏的 js 文件,它似乎只会在服务器上引起问题。用新文件替换所有内容可以解决问题。

于 2013-06-23T13:13:16.673 回答