将视频放在网页上

Putting Video on Webpage

我正在制作一个非常 的简单网站,上面应该只有一个名为"starenders.swf" 的视频。问题是,它不会显示!这是代码:

<HTML>
<HEAD><TITLE>Starenders</TITLE>
<STYLE>
body, td, p {font-size: 12pt; font-family: times new roman, times, serif}
h1 {font-weight: normal; font-size: 26pt; font-family: arial, helvetica, sans-serif}
h2 {font-weight: normal; font-size: 18pt; font-family: arial, helvetica, sans-serif}
h3 {font-weight: normal; font-size: 16pt}
h4 {font-weight: normal; font-size: 14pt}
a {text-decoration: none}
a:hover {text-decoration: underline}
</STYLE>
<META id=skype_v3_tb_marker_id name=SKYPE_PARSING_HAS_FINISHED content=metacontent>
</HEAD>
<BODY style="MARGIN: 10px 10px; BACKGROUND: #ffffff" text=#000000>&nbsp;
<DIV style="BACKGROUND: #000000" align=center><EMBED height=100% type=application/x-shockwave-flash width=100% src=starenders.swf originalWidth="100%" originalHeight="100%" quality="high" allowNetworking="internal" allowScriptAccess="never" allowFullScreen="true" play="true" loop="true" ></DIV></BODY>

当我启动网页时,它不起作用

这是网站: http://starenders.github.io/

谢谢!

George

如果浏览器没有flash player插件,则不会加载swf文件。为此,您只需要安装插件。并检查文件是否正确上传。

<EMBED height="100%" type="application/x-shockwave-flash" width=100% src="http://starenders.github.io/starenders.swf" originalWidth="100%" originalHeight="100%" quality="high" allowNetworking="internal" allowScriptAccess="never" allowFullScreen="true" play="true" loop="true" >

即使在安装了 Flash 的浏览器上,它也不播放的原因是服务器报告找不到该文件 - 请参阅浏览器控制台的屏幕截图:

通常这只是您服务器上的路径问题 - 即文件确实存在,但服务器用于查找视频的路径与视频实际所在的路径不匹配。

更新:

您在上面 link 中提供的网页包含一个 flash 嵌入标记,其 src 设置为 "src=starenders.swf"。浏览器在浏览器控制台中报告的错误表明服务器正在响应一条无法找到此资源的消息。假设文件名正确并且它确实存在于服务器上,那么文件 'starenders.swf' 很可能位于服务器不希望在其中查找视频文件的位置(这取决于您的服务器及其配置)。

顺便说一句,如果您打算使用 HTML5 视频标签,这当然是一个很好的建议,那么您可以考虑使用非 'swf' 视频,这可能会让您接触到更广泛的内容观众 - 有关不同浏览器和设备支持的不同视频格式的信息,请参见此处:

HTML5 提供了一个特殊的视频标签。您可以使用的代码应该是 -

<video type="video/swf" controls >

 <source type="video/swf" src="The source of the video should be here ." />
</video>