gpt4 book ai didi

javascript - Flowplayer 具有不自动播放的播放列表

转载 作者:行者123 更新时间:2023-11-28 08:36:19 25 4
gpt4 key购买 nike

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

  • 点击缩略图时不会自动播放
  • 独立的启动画面

autoPlay: false"似乎对此不起作用。

最佳答案

在 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()加载新视频

关于javascript - Flowplayer 具有不自动播放的播放列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21124307/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com