video.js techOrder flash - 此视频未找到兼容的来源 [英] video.js techOrder flash - no compatible source was found for this video

查看:4975
本文介绍了video.js techOrder flash - 此视频未找到兼容的来源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试使用运行视频时,data-setup ='{techOrder:[flash]}'仅设置为flash我无法制作它有效。

Whenever I try to run a video with data-setup='{"techOrder": ["flash"]}' set at only flash I can't make it work.

  • Here is a fiddle http://jsfiddle.net/a9uvasrh/5/
  • The fiddle from this other SO Q&A also doesn't load for me Video.js Force Flash Controls Display

在Chrome,Opera,FF和IE上测试过。只有最后2个显示消息此视频未找到兼容的来源;其他人仍然没有反应。

Tested on Chrome, Opera, FF and IE . Only the last 2 show the message "no compatible source was found for this video"; the others remain unresponsive.

编辑:问题出现在本地存储中

The issue is present in local storage as well

<html>
    <head>
        <script src="http://vjs.zencdn.net/c/video-js.css"></script>
        <script src="http://vjs.zencdn.net/c/video.js"></script>
    </head>
    <body>
        <div class="container">
            <video id="example_video_1" class="video-js vjs-default-skin"
              controls preload="auto" width="640" height="264"
              poster="http://video-js.zencoder.com/oceans-clip.png"
              data-setup='{"techOrder": ["flash"]}'>
                 <source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
                 <source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
                 <source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
                 <p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
            </video>
        </div>

    </body>
</html>

以上代码初始化flash播放器(VideoJS Flash组件v3.0出现在下拉菜单中)但它没有运行视频。

The code above initializes the flash player (VideoJS Flash component v3.0 appears in the dropdown menu) but it doesn't run the video.

推荐答案

这是因为jsfiddle现在正在使用 sandbox 属性结果显示在。其效果各不相同:在Chrome中加载了swf但Flash的 ExternalInterface 被阻止,因此无法告诉swf做任何事情。在Firefox中,swf甚至没有被加载。

This is because jsfiddle is now using the sandbox attribute on the iframe the results are shown in. The effect of that varies: In Chrome the swf is loaded but Flash's ExternalInterface is blocked, so the swf can't be told to do anything. In Firefox the swf doesn't even get loaded.

jsbin在编辑模式下也使用带有 sandbox 的iframe,但是在编辑模式下工作正常,因为没有使用iframe。

jsbin's also uses an iframe with sandbox in edit mode, but works fine out of edit mode as no iframe is used.

假设本地存储意味着html正在浏览器中加载 file:// 协议然后问题也是浏览器阻止ExternalInterface脚本访问,但原因不同。这是因为浏览器阻止脚本访问从一个协议加载的swf( http )从另一个加载的页面(文件)。

Assuming that "local storage" means the html is being loaded in the browser with the file:// protocol then the problem is also the browser blocking ExternalInterface script access, but for a different reason. Here it's because browsers block script access to a swf loaded over one protocol (http) from a page loaded over another (file).

这篇关于video.js techOrder flash - 此视频未找到兼容的来源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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