Animation Flowplayer控件:自动隐藏和自动播放
我无法让我的播放器自动启动或控件自动隐藏。我相信我的设置是正确的,但它只是不起作用。这是我的整个脚本标记:Animation Flowplayer控件:自动隐藏和自动播放,animation,flowplayer,autostart,Animation,Flowplayer,Autostart,我无法让我的播放器自动启动或控件自动隐藏。我相信我的设置是正确的,但它只是不起作用。这是我的整个脚本标记: <script type="text/javascript"> // wait for the DOM to load using jQuery $(function() { // setup player normally $f("videoPlayer", "videos/flowplayer-3.2.7.swf", {
<script type="text/javascript">
// wait for the DOM to load using jQuery
$(function() {
// setup player normally
$f("videoPlayer", "videos/flowplayer-3.2.7.swf", {
// clip properties common to all playlist entries
clip: {
autoPlay: false,
autoBuffering: true,
baseUrl: 'http://thepartysource.com/videos/',
subTitle: '',
time: ''
},
// our playlist
playlist: [
{
url: 'DRINK DIFFERENTLY - 480x272.m4v',
autoPlay: true
},
{
url: 'DRINK DIFFERENTLY - 480x272.m4v'
}
],
// show playlist buttons in controlbar
plugins: {
controls: {
playlist: true,
// display properties such as size, location and opacity
top: 20,
left: 0,
bottom: 0,
opacity: 0.95,
// styling properties (will be applied to all plugins)
background: '#000', // url(/my/custom/controls.png) no-repeat 3px 6px',
backgroundGradient: 'low',
// controlbar specific settings
timeColor: '#980118',
all: false,
play: false,
scrubber: true,
fullscreen: true,
// tooltips (since 3.1)
tooltips: {
buttons: false,
//fullscreen: 'Enter fullscreen mode'
},
autoHide: {
enabled: true,
// always enable
fullsccreenOnly: false,
// make it hide faster
hideDelay: 1000,
mouseOutDelay: 500
}
}
}
});
/*
here comes the magic plugin. It uses first div.clips element as the
root for as playlist entries. loop parameter makes clips play
from the beginning to the end.
*/
$f("videoPlayer").playlist("div.clips:first", {loop:true});
});
</script>
//等待使用jQuery加载DOM
$(函数(){
//正常设置播放器
$f(“视频播放器”、“视频/flowplayer-3.2.7.swf”{
//所有播放列表条目共有的剪辑属性
剪辑:{
自动播放:错误,
自动缓冲:是的,
baseUrl:'http://thepartysource.com/videos/',
副标题:“”,
时间:“”
},
//我们的播放列表
播放列表:[
{
url:“以不同的方式喝酒-480x272.m4v”,
自动播放:对
},
{
url:“以不同的方式饮酒-480x272.m4v”
}
],
//在控制栏中显示播放列表按钮
插件:{
控制:{
播放列表:对,
//显示属性,如大小、位置和不透明度
前20名,
左:0,,
底部:0,
不透明度:0.95,
//样式属性(将应用于所有插件)
背景:“#000”,//url(/my/custom/controls.png)不重复3px 6px”,
背景梯度:“低”,
//控制栏特定设置
timeColor:“#980118”,
所有人:错,
剧本:错,
洗涤器:是的,
全屏:对,
//工具提示(从3.1开始)
工具提示:{
按钮:错误,
//全屏:“进入全屏模式”
},
自动隐藏:{
启用:对,
//始终启用
完全信任:错误,
//让它藏得更快
希德雷:1000,
鼠标移动时间:500
}
}
}
});
/*
这是一个神奇的插件,它使用第一个div.clips元素作为
作为播放列表项的根目录。循环参数使剪辑播放
从头到尾。
*/
$f(“视频播放器”)。播放列表(“div.clips:first”,{loop:true});
});
以下是HTML区域:
<div class="box-movie">
<!-- the player using splash image -->
<a class="player plain" id="videoPlayer">
<img src="images/play_text_large.png" />
</a>
<div class="clips" style="margin-top:15px;">
<!-- single playlist entry as an "template" -->
<a href="${url}">
<!--${title}--> <!--<span>${subTitle}</span>-->
<!--<em>${time}</em>-->
</a>
</div>
<!-- let rest of the page float normally -->
<br clear="all"/>
</div>
编辑
我真的找到了问题所在。加载时,它几乎只是一个飞溅图像,而不是实际的玩家。您可以在上查看此内容。如果我将第二个剪辑设置为自动播放,它会在第一个剪辑完成后自动播放。我必须将div.clips标记更改为:
<!-- the player using splash image -->
<a href="videos/flowplayer-3.2.7.swf" class="player plain" id="videoPlayer">
</a>
指定要开始的flowplayer的href。这让播放器在页面加载时加载,自动播放开始工作