添加jplayer播放列表插件

This commit is contained in:
Li Jianxuan 2013-03-22 08:08:57 +00:00
parent d780492922
commit cf66b417aa
1 changed files with 62 additions and 37 deletions

View File

@ -6,6 +6,7 @@ $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css'); $this->headLink()->appendStylesheet('/css/water.css');
$this->theme->AppendPlus($this,'jquery'); $this->theme->AppendPlus($this,'jquery');
$this->theme->AppendPlus($this,'jplayer'); $this->theme->AppendPlus($this,'jplayer');
$this->headScript()->appendFile("/js/lib/jplayer/add-on/jplayer.playlist.min.js");
$this->headLink()->appendStylesheet('/js/lib/jplayer/skin/blue.monday/jplayer.blue.monday.css'); $this->headLink()->appendStylesheet('/js/lib/jplayer/skin/blue.monday/jplayer.blue.monday.css');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/qzr/">青藏铁路</a>'); $this->breadcrumb('<a href="/qzr/">青藏铁路</a>');
@ -26,30 +27,44 @@ if(!empty($this->infos['keyword'])) $keyword = $this->infos['keyword']; else $ke
//<![CDATA[ //<![CDATA[
$(document).ready(function(){ $(document).ready(function(){
$("#jquery_jplayer_1").jPlayer({ new jPlayerPlaylist(
ready: function () { {
$(this).jPlayer("setMedia", { jPlayer: "#jquery_jplayer_1",
flv: "<?= 'http://'.$_SERVER['SERVER_NAME'] ?>/images/National Geographic Megastructures Extreme Railway.flv", cssSelectorAncestor: "#jp_container_1"
//poster: "http://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png"
});
}, },
swfPath: "/js/lib/jplayer/", [
supplied: "flv", {
size: { title:"青藏铁路",
width: "640px", artist:"Blender Foundation",
height: "360px", free:true,
cssClass: "jp-video-360p" flv: "<?= 'http://'.$_SERVER['SERVER_NAME'] ?>/images/National Geographic Megastructures Extreme Railway.flv",
},
{
title:"青藏铁路",
artist:"Blender Foundation",
flv: "<?= 'http://'.$_SERVER['SERVER_NAME'] ?>/images/National Geographic Megastructures Extreme Railway.flv",
}
],
{
swfPath: "<?= 'http://'.$_SERVER['SERVER_NAME'] ?>/js/lib/jplayer/",
supplied: "flv",
size: {
width: "640px",
height: "360px",
cssClass: "jp-video-360p"
}
} }
}); );
}); });
//]]> //]]>
</script> </script>
<div id="jp_container_1" class="jp-video jp-video-360p"> <div id="jp_container_1" class="jp-video jp-video-270p">
<div class="jp-type-single"> <div class="jp-type-playlist">
<div id="jquery_jplayer_1" class="jp-jplayer"></div> <div id="jquery_jplayer_1" class="jp-jplayer"></div>
<div class="jp-gui"> <div class="jp-gui">
<div class="jp-video-play"> <div class="jp-video-play">
<a href="javascript:;" class="jp-video-play-icon" tabindex="2">play</a> <a href="javascript:;" class="jp-video-play-icon" tabindex="1">play</a>
</div> </div>
<div class="jp-interface"> <div class="jp-interface">
<div class="jp-progress"> <div class="jp-progress">
@ -59,33 +74,42 @@ $(document).ready(function(){
</div> </div>
<div class="jp-current-time"></div> <div class="jp-current-time"></div>
<div class="jp-duration"></div> <div class="jp-duration"></div>
<div class="jp-title">
<ul>
<li>National Geographic Megastructures Extreme Railway</li>
</ul>
</div>
<div class="jp-controls-holder"> <div class="jp-controls-holder">
<ul class="jp-controls"> <ul class="jp-controls">
<li><a href="javascript:;" class="jp-play" tabindex="2">play</a></li> <li><a href="javascript:;" class="jp-previous" tabindex="1">previous</a></li>
<li><a href="javascript:;" class="jp-pause" tabindex="2">pause</a></li> <li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
<li><a href="javascript:;" class="jp-stop" tabindex="2">stop</a></li> <li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
<li><a href="javascript:;" class="jp-mute" tabindex="2" title="mute">mute</a></li> <li><a href="javascript:;" class="jp-next" tabindex="1">next</a></li>
<li><a href="javascript:;" class="jp-unmute" tabindex="2" title="unmute">unmute</a></li> <li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
<li><a href="javascript:;" class="jp-volume-max" tabindex="2" title="max volume">max volume</a></li> <li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
<li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
<li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
</ul> </ul>
<div class="jp-volume-bar"> <div class="jp-volume-bar">
<div class="jp-volume-bar-value"></div> <div class="jp-volume-bar-value"></div>
</div> </div>
<ul class="jp-toggles"> <ul class="jp-toggles">
<li><a href="javascript:;" class="jp-full-screen" tabindex="2" title="full screen">full screen</a></li> <li><a href="javascript:;" class="jp-full-screen" tabindex="1" title="full screen">full screen</a></li>
<li><a href="javascript:;" class="jp-restore-screen" tabindex="2" title="restore screen">restore screen</a></li> <li><a href="javascript:;" class="jp-restore-screen" tabindex="1" title="restore screen">restore screen</a></li>
<li><a href="javascript:;" class="jp-repeat" tabindex="2" title="repeat">repeat</a></li> <li><a href="javascript:;" class="jp-shuffle" tabindex="1" title="shuffle">shuffle</a></li>
<li><a href="javascript:;" class="jp-repeat-off" tabindex="2" title="repeat off">repeat off</a></li> <li><a href="javascript:;" class="jp-shuffle-off" tabindex="1" title="shuffle off">shuffle off</a></li>
<li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
<li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
</ul>
</div>
<div class="jp-title">
<ul>
<li></li>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
<div class="jp-playlist">
<ul>
<!-- The method Playlist.displayPlaylist() uses this unordered list -->
<li></li>
</ul>
</div>
<div class="jp-no-solution"> <div class="jp-no-solution">
<span>Update Required</span> <span>Update Required</span>
To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>. To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
@ -93,6 +117,7 @@ $(document).ready(function(){
</div> </div>
</div> </div>
<p><a href="/images/National Geographic Megastructures Extreme Railway.avi">AVI版本下载</a></p> <p><a href="/images/National Geographic Megastructures Extreme Railway.avi">AVI版本下载</a></p>
<p> <p>
<?php echo $this->infos['body'];?> <?php echo $this->infos['body'];?>
</p> </p>