我正在研究omniture网站催化剂变量,以便为客户端进行视频跟踪。我的问题是当我们点击jwplayer播放按钮时,我想抛出一条警告信息。任何人都可以告诉我如何做到这一点。
答案 0 :(得分:2)
这是一个快速的样本!
<html>
<head>
<title>Test Page</title>
</head>
<body>
<script type="text/javascript" src="http://player.longtailvideo.com/jwplayer.js"></script>
<div id="player"></div>
<script type="text/javascript">
jwplayer("player").setup({
file: "http://www.longtailvideo.com/jw/upload/bunny.mp4",
image: "http://www.longtailvideo.com/jw/upload/bunny.jpg",
flashplayer: "http://player.longtailvideo.com/player.swf",
height: 300,
width: 465,
events:{
onPlay: function(event) {
alert('Playing!');
}
}
});
</script>
</body>
</html>