【问题标题】:Putting Video on Webpage将视频放在网页上
【发布时间】:2015-08-10 18:41:04
【问题描述】:

我正在制作一个非常简单的网站,上面应该只有一个名为“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

【问题讨论】:

    标签: html audio video flash


    【解决方案1】:

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

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

    更新:

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

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

    【讨论】:

    • 抱歉 - 代码出错。它不是 starenders.github.io/starenders.swf ,它只是 starenders.swf。
    • @GeorgeOCodes - 无论您使用嵌入式 Flash 对象还是 HTML5 视频标签,此错误都是相同的 - 两者都是有效的方法。
    【解决方案2】:

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

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

    【讨论】:

      【解决方案3】:

      如果浏览器没有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" >
      

      【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-07-16
      • 2011-10-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多