我已将JW HTML5播放器整合到我的jQuery Cycle滑块中。问题是如果我将视频设置为自动播放,当页面加载时播放,而不是当幻灯片进入视图时 - Flash视频会发生什么情况。有没有办法阻止HTML5视频播放,直到显示幻灯片?滑块中的HTML5视频自动播放问题
这是我使用的代码:
jwplayer("video-'.$video_name.'").setup({
file: "'.$url.'",
image: "'.get_bloginfo('template_directory') .'/lib/scripts/timthumb.php?src='.$image.'&h='.$height.'&w='.$width.'&zc=1",
icons: "'.$icons.'",
autostart: "'.$autostart.'",
stretching: "'.$stretching.'",
controlbar: "'.$controlbar.'",
skin: "'.$skin.'",
screencolor: "white",
height: '.$height.',
width: '.$width.',
players: [';
if($fallback == "flash") {
$out .= '{type: "html5"}, {type: "flash", src: "'.get_bloginfo("template_directory").'/lib/scripts/mediaplayer/player.swf"}';
} elseif($fallback == "html5") {
$out .= '{type: "flash", src: "'.get_bloginfo("template_directory").'/lib/scripts/mediaplayer/player.swf"}, { type: "html5" },';
}
$out .= ']
});
';