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

时间:2013-10-01 01:12:53

标签: php image jwplayer jwplayer6

我正在使用以下源代码使用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>

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

1 个答案:

答案 0 :(得分:5)

请改用:

<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>

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