为什么嵌入式ogg视频可以在localhost上运行,而不能在Web服务器上运行呢? [英] Why does an embedded ogg video work on localhost, but not on the web server?

查看:187
本文介绍了为什么嵌入式ogg视频可以在localhost上运行,而不能在Web服务器上运行呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ogg视频,当我在Chrome或Firefox中的localhost上运行该视频时,使用video标签可以正常工作.但是,当我尝试在服务器上运行页面时,会显示视频播放器控件,而不显示视频.

I have an ogg video which works just fine using the video tag when I run it on localhost in either Chrome or Firefox. However, when I try running the page on the server, the video player controls show up, but not the video.

我知道视频在服务器上,因为我有一个下载链接,该链接具有相同的确切路径.

I know the video is up on the server, because I have a download link that works which has the same exact path.. I'm at a loss.

<video width="800" controls preload>
   <source src="../VIDEOS/AddUser.ogg" type="video/ogg" />
   <object width="800" type="video/ogg" data="../VIDEOS/AddUser.ogg">
     <object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="player" width="800" height="550"><param name="url" value="../VIDEOS/AddUser.wmv" /><param name="src" value="../VIDEOS/AddUser.wmv" /><param name="showcontrols" value="true" /><param name="autostart" value="true" />
        There was an error embedding the video. Please download the video to view.<br>
     </object>
   </object>
</video>

在摆弄了一段时间之后,我发现根据浏览器,该视频根本不存在.当我检查服务器时,文件已启动.但是,当我直接在浏览器中导航到文件时,出现找不到文件"错误.

After fiddling around with it for a while, I've discovered that, according to the browser, the video simply isn't there. when I check the server, the file is up. However, when I navigate directly to the file within the browser, I get a file not found error.

这是我的虚拟主机的问题,还是还有其他可能的原因?

Could this be an issue with my web host, or is there some other possible cause?

推荐答案

您的主机可能需要将OGG MIME类型添加到服务器.

It's likely that your host needs to add the OGG MIME type to the server.

可以在 http://xiph.org 上找到MIME类型的详细信息. 设置说明会根据服务器是Apache还是IIS而有所不同

The MIME type details can be found on http://xiph.org The set up instructions will differ depending on whether the server is Apache or IIS

这篇关于为什么嵌入式ogg视频可以在localhost上运行,而不能在Web服务器上运行呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆