<!DOCTYPE html>
<html xmlns="/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ckplayer只调用html5播放器</title>
</head>
<body>
<div id="a1"></div>
<script type="text/javascript" src="ckplayer/ckplayer.js" charset="utf-8"></script>
<script type="text/javascript">
var idLoadHandler=false;
var flashvars={
p:0,
e:1,
i:'/static/images/cqdw.jpg',
loaded:'loadHandler'
};
var video=['/asset/Mon_1605/0ec8cc80112a2d6.mp4->video/mp4'];
var support=['all'];
CKobject.embedHTML5('a1','ckplayer_a1',600,400,video,flashvars,support);
function loadHandler(){
idLoadHandler=true;
}
function playorpause(){
if(idLoadHandler){
CKobject.getObjectById('ckplayer_a1').playOrPause();
}
else{
alert('播放器还未加载,不能进行控制');
}
}
</script>
<a href="javascript:;" onClick="playorpause()">播放视频</a>
</body>
</html>
如果觉得《ckplayer播放器控制播放/暂停》对你有帮助,请点赞、收藏,并留下你的观点哦!