带有播放列表的流播放器,无需自动播放



是否有人有一个例子,或者可以说是否有可能使用 Flowplayer 拥有一个具有以下功能的播放列表:

  • 单击缩略图时不自动播放
  • 单独的初始屏幕

自动播放:假"似乎对此不起作用。

在 Flowplayer API 中似乎没有一种简单的方法可以做到这一点。 我认为最好的方法是处理缩略图上的单击事件,更改启动图像并卸载播放器。

var api = flowplayer();
$('.thumbnails').click(function (e) {
    e.preventDefault();
    // Store the splash image url in a data attribute.
    var splashUrl = $(this).data('splash');
   //Replace the splash image.
   $('#player').css('background-image', 'url(' + splashUrl + ')');
   //Unload the player.
   api.unload();
});

当用户单击播放器时,使用api.load()加载新视频

最新更新