You are here
flowplayer轮播与遮罩
星期一, 2015-12-07 08:45 — shiping1
分类:- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>媒体播放</title>
- <script type="text/javascript" src="<c:url value='/flowplayer/flowplayer-3.2.11.min.js'/>"></script>
- <script type="text/javascript">
- var obj = new Array();
-
- function playAgain(){
- var width=$(document).width();
- var height = $(document).height();
- obj.push({url:"<c:url value='/flowplayer/cebbank.flv'/>",autoPlay:true});
- obj.push({url:"<c:url value='/flowplayer/qdh.flv'/>",autoPlay:true});
-
- $f("player", "<c:url value='/flowplayer/flowplayer-3.2.14.swf'/>", {
- clip:{
- autoPlay:true,
- autoBuffering:true
- },
- keyboard: false,
- playlist: obj,
- plugins: {
- controls:{
- url:"<c:url value='/flowplayer/flowplayer.controls-3.2.4-dev.swf'/>",
- playlist:true,
- play:false,
- volume:false,
- stop:false,
- fullscreen:false,
- time:true,
- mute:false
- ,
- scrubber:false
- }
- , //添加一个遮罩,该功能根据自身需要添加.
- //该功能原本只是为了实现屏幕上显示文字,但经修改,一样可以屏蔽播放器的各种点击事件与功能的便捷方式.
- content:{
- url: "<c:url value='/flowplayer/flowplayer.content-3.2.8.swf'/>",
- backgroundColor: '#112233',
- opacity: 0,
- backgroundGradient: [0.1, 0.1, 1.0],
- width:width,
- height:height,
- html: '<p></p>'
- }
- },
- onFinish:function(){
- //实现轮播,如果当前视频索引是最后一个,则调用该方法本身,重新加载列表与播放器
- if($f().getClip().index == obj.length-1){
- playAgain();
- }
- }
- });
- }
-
- </script>
- </head>
- <body class="body_all" onload="playAgain()">
- <table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td>
- <div id="player" style="width:100%;height: 100%;z-index: 0;">
- </div>
- </td>
- </tr>
- </table>
-
-
- </body>
- </html>
-
来自
http://blog.csdn.net/javaloverkehui/article/details/8593763