当我将Fancybox上传到服务器时,我无法将视频加载到灯箱中。当我在本地测试时,它工作得很好。我做了我认为是香草安装它仍然无法正常工作。我尝试过使用不同的主机以及Firefox和Safari。
这是一个安装http://zentube.tv/test2.html。
这是我的代码:
<!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>
我在Stackoverflow上看了很多类似的问题,但似乎没有一个问题与此相同。
任何帮助都将不胜感激。
答案 0 :(得分:0)
我到底了 - 一个损坏的js文件似乎只会导致服务器出现问题。用新文件替换所有内容解决了问题。