html - JW Player 仅 HTML5 模式

标签 html mp4 jwplayer

我正在尝试将 JW Player 设置为仅在 HTML5 模式下播放。 显然它不起作用,我只能看到 Flash 回退。

我的设置:

<div id='videoContainer'>This text will be replaced</div>
  <script type='text/javascript'>
    jwplayer('videoContainer').setup({
      'flashplayer': '/jwplayer/player.swf',
      'file': '/videos/clip_01.mp4',
      'image': '/images/preview.jpg',
      'skin': '/jwplayer/skins/lulu.zip',
      'backcolor': 'FFFFFF',
      'frontcolor': '000000',
      'lightcolor': '000000',
      'screencolor': '000000',
      'controlbar': 'bottom',
      'width': '640',
      'height': '480',

      'modes': [
          { type: "html5",
            config: {
              file: "/videos/clip_01.mp4"
            }
          },
          //I commented this line out so it doesn't fallback to flash
          //{ type: "flash", src: "/jwplayer/player.swf" },
          { type: "download" }
      ]
    });
  </script>

我做错了什么或者此功能尚不可用吗?

最佳答案

如果使用不支持 MP4 的浏览器,例如 FirefoxOpera,则默认为 Flash。

– Ian Devlin,2012 年 1 月 23 日 14:11

关于html - JW Player 仅 HTML5 模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8972912/

相关文章:

php - 带有 session 变量的查询语句

html - 其他目录中带有 noscript 的样式表

ios - 尝试在 swift 3 框架中实现 JWPlayer

jquery - JW Player 有多位玩家?

javascript - 一次导入javascript库

javascript - 如何使用 fetch API 来填充 DIV?

merge - 用ffmpeg分割、处理和合并文件

ffmpeg - 如何使用 ffmpeg 自动将所有 MP4 文件转换为 FLV?

ios - 从 ffmpeg 创建的 Mp4 文件可以在模拟器/PC 浏览器上播放,但不能在真实设备中的 iOS 应用程序/safari 上播放

java - 如何以编程方式将视频从android上传到JWplayer服务器