飞飞影视系统2.x整合jwplayer
编辑 /Lib/Conf/config.php
文件,找到
'play_player' =>array (
在最后一行插入:
'jwplayer'=> array('01','jwplayer')
然后在 /Public/player2.9
目录下新建 jwplayer.js
内容如下:
function $Showhtml(){
return '<iframe width="100%" height="'+Player.Height+'" src="/Public/player2.9/jwplayer.html" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>';
}
Player.Show();
if(Player.Second){
$('buffer').style.height = Player.Height-28;
$("buffer").style.display = "block";
setTimeout("Player.BufferHide();",Player.Second*1000);
}
在同目录下新建 jwplayer.html
内容如下:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>jwplayer</title>
<script type="text/javascript" src="https://www.2dan.cc/jwplayer/jwplayer.js"></script>
</head>
<body>
<div id="myElement">Loading the player...</div>
<script type="text/javascript">
var url = encodeURI(window.parent.frames.Player.Url);
var h = window.parent.frames.Player.Height;
jwplayer("myElement").setup({
flashplayer: "https://www.2dan.cc/jwplayer/jwplayer.flash.swf",
file: url,
width: "100%",
height: h,
screencolor: "#BBBBBB",
autostart: true,
provider: "http",
streamer: "start",
stretching: "uniform",
startparam: "start",
primary: "html5",
});
</script>
</body>
</html>
不错的启发。