2013-06-24 33 views
2

我刚开始jwplayer工作,我有几个问题:刚开始jwplayer工作,我有几个问题

  1. 如何连接/显示标题旁边的缩略图(类似YouTube )?我必须自己创建缩略图还是jwplayer会为我做这个?

  2. 播放列表部分看起来很枯燥,它只显示标题。如何显示视频的其他信息?即时间,作者/上传者等。

请指向我的文档,如果有一个,到目前为止我还没有找到它。

我当前的代码:

<script type="text/javascript"> 
    jwplayer("myElement").setup({ 
     playlist: [{ 
      file: "/common/assets/sample_iPod.m4v", 
      title: "Sample Video 1" 
     },{ 
      file: "/common/assets/Wildlife_512kb.mp4", 
      title: "Animals being CUTE!!!" 
     },{ 
      file: "https://s3.amazonaws.com/asteroid.static.www.otcmarkets.com/videos_presentations/OTCM/Wildlife_512kb.mp4", 
      title: "video from S3" 
     },{ 
      file: "https://s3.amazonaws.com/asteroid.static.www.otcmarkets.com/videos_presentations/OTCM/sample_iPod.m4v", 
      title: "ipod help from S3" 
     }], 
     width: 770, 
     height: 360, 
     listbar: { 
      position: 'right', 
      size: 240 
     } 
    }); 
</script> 

enter image description here

回答

1

要做到这些,你会添加图像,以及描述,每个播放列表条目。

参考 - http://www.longtailvideo.com/support/jw-player/29249/playlist-sidebar-component

代码使用:

<div id="myElement"></div> 

<script> 
    jwplayer("myElement").setup({ 
     playlist: [{ 
     file: "/uploads/sintel.mp4", 
     image: "/uploads/sintel.jpg", 
     title: "Sintel Trailer", 
     description: "Sintel is a fantasy CGI movie from the Blender Open Movie Project." 
     },{ 
     file: "/uploads/tears.mp4", 
     image: "/uploads/tears.jpg", 
     title: "Tears of Steel Trailer", 
     description: "A complete open pipeline was used to produce this visual effect film." 
     },{ 
     file: "/uploads/bunny.mp4", 
     image: "/uploads/bunny.jpg", 
     title: "Big Buck Bunny Trailer", 
     description: "This animated film is made using free and open source software." 
     },{ 
     file: "/uploads/elephants.mp4", 
     image: "/uploads/elephants.jpg", 
     title: "Elephants Dream Trailer", 
     description: "This is the worlds first open movie, made entirely with Blender." 
     }], 
     width: 700, 
     height: 240, 
     listbar: { 
     position: "right", 
     size: 280 
     } 
    }); 
</script> 
+0

hmmmm,所以没有办法,我可以显示该那么上传的日期? – iCodeLikeImDrunk

+0

例如,除非您只是将日期放入说明中。 – emaxsaun

+0

我看到了,还有更多的问题,上传截图,注意播放列表的右侧,说明几乎触及边缘,无论如何,我可以将说明向左移动一点,以便描述不会如此接近边缘?最后,由于我不打算自己制作缩略图,是否有可能在播放列表没有标题/描述旁边的大X(盒子),以便播放列表只显示标题/描述/等? – iCodeLikeImDrunk