<%@page trimDirectiveWhitespaces="true"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="gen" uri="http://help.jspgen.com/taglib/jstl"%>
<!DOCTYPE html>
<html>
<head>
<title>JSPGen Universal Player</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
*{margin:0;padding:0;}
body{position:absolute;left:0;top:0;width:100%;height:100%;background:#000;overflow:hidden;}
.player{width:100%;height:100%;}
</style>
</head>
<body>
<div id="player" class="player"></div>
<gen:if test="${media.exte == 'mp3'}">
<script type="text/javascript" src="${config.statie}player/player6.js"></script>
<script type="text/javascript">
	// 音频
	// 默认在ipad,iphone,ios设备中用html5播放,android,chrome,ie10上没有安装flash的也调用html5
	var support=['iPad','iPhone','ios','android+false','msie10+false'];
	var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always'};
	var flashvars={p:'0', autostart:'yes', soundFile:'${media.url}'};
	CKobject.embedSWF('${config.statie}player/mp3player.swf?bg=0xCDDFF3&leftbg=0x357DCE&lefticon=0xF2F2F2&rightbg=0xF06A51&rightbghover=0xAF2910&righticon=0xF2F2F2&righticonhover=0xFFFFFF&text=0x357DCE&slider=0x357DCE&track=0xCDDFF3&border=0xCDDFF3&loader=0x357DCE','player','mp3player_','100%','100%',flashvars, params);
	var video=['${media.url}'];
	CKobject.embedHTML5('player','mp3player_','100%','100%', video, flashvars, support, true);
</script>
<gen:else />
<script type="text/javascript" src="${config.statie}player/player.js"></script>
<script type="text/javascript">
	var video = {
		container: '#player',	// 容器的ID或className
		variable: 'player',		// 播放函数名称
		autoplay: ${media.autoplay},	// 是否自动播放
		//loop: false,			  // 播放结束是否循环播放
		//flashplayer: true,	// 强制使用flashplayer
		//html5m3u8: false,		// PC平台上是否使用h5播放器播放m3u8
		//mobileCkControls:false, // 移动端h5显示控制栏
		playbackrate: -1,		  // 默认速度编号，只对html5有效,设置成-1则不显示倍速
		live: ${media.live},	// 是否是直播
		poster:'${media.pic}',// 封面图片
		video: '${media.url}'
	};
	var player = new ckplayer(video);
</script>
</gen:if>
</body>
</html>