【发布时间】:2012-02-23 03:03:43
【问题描述】:
这是我第一次尝试使用 html5 显示视频。我可以在我的本地机器上观看视频并 wamp,代码没有问题。
但是今天我将视频页面在线加载到我的子域之一,例如 abc.mysite.com 视频完全消失了。我去查了firebugs,代码的源部分是灰色的。
有人可以引导我找到正确的方向以使该视频在线播放吗? cpanel 中有什么东西或者我需要配置什么东西才能使 html5 在线吗?非常感谢。
这里是代码
<div id="item1" class="item">
<div class="content">
<a href="#item2" class="panel">
<video id="my_Video" width="100%" height="100%" preload="auto" autoplay loop>
//below is where greyed out on firebugs!!
<source src="_video/abc12296_Animation.mp4" type="video/mp4" />
<source src="_video/abc12296_Animation.webm" type="video/webm" />
<source src="_video/abc12296_Animation.ogv" type="video/ogg" />
<p>Your browser does not support HTML5 video.</p>
//finished grey out!
</video>
</a>
</div>
</div>
<script>
$("#my_Video").bind("ended", function(){
this.play();
});
</script>
【问题讨论】:
-
确保视频位于具有该 HTML 的文件的子文件夹中(特别是
_video/),并且文件名也准确。 -
你能把你的在线网址贴出来。它可以帮助我们测试吗?
-
也许是区分大小写的事情?
-
感谢您的所有回复。上面的代码是我的索引页,'_video'文件夹和index.php在同一级。问题是代码在我的本地运行良好。奇怪的是代码的源部分在网上变灰了。不幸的是,我不能在 mo 上发布 url,因为它不属于我,但如果需要我可以提供更多代码。 Aletzo 你所说的区分大小写是什么意思,你指的是哪里?谢谢大家。
-
通常,当所有东西都在本地运行而不是在生产服务器(通常是 linux)中运行时,很有可能在脚本中将名为
Filename.sth的文件称为filename.sth。可以在本地工作,但不能在 linux 中工作。
标签: javascript css html html5-video