JW Player 空格控制播放暂停

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jw</title>
<script type="text/javascript" src="/jw/jwplayer.js"></script>

</head>

<body onKeyDown="KeyOn_Space(event);">

<p id="container1">Please install the Flash Plugin</p>
<script type="text/javascript">
jwplayer('container1').setup({
	'skin': "/jw/glow.zip",
	'flashplayer': '/jw/player.swf',
	'file': '/jw/3.mp4',
	'controlbar': 'bottom',
	'width': '470',
	'height': '320',
	'allowfullscreen':'true'
});
 
function KeyOn_Space(ev){
	ev = ev || window.event;  
    var code = (ev.keyCode || ev.which); 
	if(code == 32) {
		jwplayer('container1').pause();
	}
}

</script>
</body>
</html>


另附jwplayer去水印版本

点此下载


你可能感兴趣的:(html,XHTML,function,File,Flash)