编程语言
首页 > 编程语言> > php – 预览图像在Jw Player 6中不起作用

php – 预览图像在Jw Player 6中不起作用

作者:互联网

我正在使用以下源代码来使用Jw Player 6显示视频文件.

<script>
        jwplayer('video-front').setup({
          height: 540,
          width: 980,
          image: "<?php echo $base_url; ?>/sites/default/files/video-front/thumbnail-223_0002.png",
          playlist: [{
            sources: [
              { file: "<?php echo $base_url; ?>/sites/default/files/video-front/1380575675.mp4" },
              { file: "<?php echo $base_url; ?>/sites/default/files/video-front/1380575748.webm" },
              { file: "<?php echo $base_url; ?>/sites/default/files/video-front/1380575648.flv" }
            ]
          }]
        });
      </script>

但是我的视频中没有显示图像.只有我能看到黑色背景.这有什么不对?
提前致谢.

解决方法:

请改用:

<script>
        jwplayer('video-front').setup({
          height: 540,
          width: 980,
          playlist: [{
          image: "<?php echo $base_url; ?>/sites/default/files/video-front/thumbnail-223_0002.png",
            sources: [
              { file: "<?php echo $base_url; ?>/sites/default/files/video-front/1380575675.mp4" },
              { file: "<?php echo $base_url; ?>/sites/default/files/video-front/1380575748.webm" },
              { file: "<?php echo $base_url; ?>/sites/default/files/video-front/1380575648.flv" }
            ]
          }]
        });
      </script>

图像需要位于播放列表块内.那应该解决它.

标签:php,image,jwplayer,jwplayer6
来源: https://codeday.me/bug/20190831/1776034.html