当 SWF 存储在本地 PC 上时,无法加载 SWF

发布于 2024-11-04 18:15:08 字数 2573 浏览 4 评论 0原文

我有一个 HTML 文件,其中包含 Flash .FLV 播放器;然后加载给定的 FLV 视频并播放它。我们的想法是,作为应用程序安装的一部分,所有这些文件都存储在本地 PC 上,我们使用 HTML/flash 作为帮助/手册。

在我的电脑上它工作正常,但在用户的电脑上没有任何显示。但是,如果我在线托管完全相同的文件结构并给他们 URL,它就可以完美运行。

我猜这是某种安全问题,但不知道如何解决。使用的浏览器实际上是一个 XULRunner 应用程序,即它是 FireFox 3 引擎,但实际上不是 FF。由于我的电脑是开发人员电脑,因此完全有可能我过去在另一个项目上做了一些事情使其正常工作,而不是我的电脑在某种程度上很特别。

作为参考,HTML 中包含以下内容 - 这是从某些第 3 方应用程序生成的:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="723" height="445" id="FLVPlayer">
  <param name="movie" value="FLVPlayer_Progressive.swf" />
  <param name="quality" value="high" />
  <param name="wmode" value="opaque" />
  <param name="scale" value="noscale" />
  <param name="salign" value="lt" />
  <param name="FlashVars" value="&amp;MM_ComponentVersion=1&amp;skinName=Halo_Skin_2&amp;streamName=../../videos&amp;autoPlay=true&amp;autoRewind=false" />
  <param name="swfversion" value="8,0,0,0" />
  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
  <param name="expressinstall" value="Scripts/expressInstall.swf" />
  <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
  <!--[if !IE]>-->
  <object type="application/x-shockwave-flash" data="FLVPlayer_Progressive.swf" width="723" height="445">
    <!--<![endif]-->
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="scale" value="noscale" />
    <param name="salign" value="lt" />
    <param name="FlashVars" value="&amp;MM_ComponentVersion=1&amp;skinName=Halo_Skin_2&amp;streamName=../../videos&amp;autoPlay=true&amp;autoRewind=false" />
    <param name="swfversion" value="8,0,0,0" />
    <param name="expressinstall" value="Scripts/expressInstall.swf" />
    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
      <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
      <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
    </div>
    <!--[if !IE]>-->
  </object>
  <!--<![endif]-->
</object>

I have an HTML file which contains a Flash .FLV player; which then loads a given FLV video and plays it. The idea is all these files are stored locally on the PC as part of an application install, we use HTML/flash for the help/manual.

On my PC it works fine but on a user's PC nothing is displayed. However if I host the exact same file-structure online and give them the URL, it works perfectly.

I am guessing this is a security issue of some sort but have no idea how to address it. The browser being used is actually a XULRunner app, i.e it's the FireFox 3 engine but not actually FF. Since my PC isa developer PC it's entirely possible I've done something in the past on another project that makes it work, rather than my PC being special in some way.

For reference the HTML has the following in it - this is generated from some 3rd-party app:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="723" height="445" id="FLVPlayer">
  <param name="movie" value="FLVPlayer_Progressive.swf" />
  <param name="quality" value="high" />
  <param name="wmode" value="opaque" />
  <param name="scale" value="noscale" />
  <param name="salign" value="lt" />
  <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Halo_Skin_2&streamName=../../videos&autoPlay=true&autoRewind=false" />
  <param name="swfversion" value="8,0,0,0" />
  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
  <param name="expressinstall" value="Scripts/expressInstall.swf" />
  <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
  <!--[if !IE]>-->
  <object type="application/x-shockwave-flash" data="FLVPlayer_Progressive.swf" width="723" height="445">
    <!--<![endif]-->
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="scale" value="noscale" />
    <param name="salign" value="lt" />
    <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Halo_Skin_2&streamName=../../videos&autoPlay=true&autoRewind=false" />
    <param name="swfversion" value="8,0,0,0" />
    <param name="expressinstall" value="Scripts/expressInstall.swf" />
    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
      <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
      <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
    </div>
    <!--[if !IE]>-->
  </object>
  <!--<![endif]-->
</object>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蝶舞 2024-11-11 18:15:08

这肯定是一个安全问题,浏览器无法访问本地文件。
它可以在您的系统上运行,因为您位于沙箱中。
您可以做两件事。
第一个 - 在线托管 FLV 并以这种方式访问​​它。就像其他所有玩家一样。
第二个 - 创建一个 Air 应用程序。

It sure is a security issue browsers do not have access to local files.
It worked on your system because you were in your sandbox.
Two things you can do.
First one - Host the FLVs online and access it that way. Like every other player out there.
Second one - Create an Air app.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文