feat: 后端全量更新 - 含所有本次需求
- Contract.php: 返回合约账户余额(balance_contract) - My.php: 地址管理增加BTC/ETH - AppContract.php: 一键平仓(closeall) - AppProxy.php: 代理专属注册链接 + 分级权限(L1/L2) - site.php: 手续费减半(0.018→0.009) - agent_permission_setup.sql: 代理权限SQL - crypto_news_crawler.py: 新闻自动采集脚本
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
class jPlayerPlugin extends PluginBase{
|
||||
function __construct(){
|
||||
parent::__construct();
|
||||
}
|
||||
public function regiest(){
|
||||
$this->hookRegiest(array(
|
||||
'user.commonJs.insert' => 'jPlayerPlugin.echoJs',
|
||||
));
|
||||
}
|
||||
public function echoJs($st,$act){
|
||||
if($this->isFileExtence($st,$act)){
|
||||
$this->echoFile('static/main.js');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"id":"jPlayer",
|
||||
"name":"jPlayer",
|
||||
"title":"jPlayer",
|
||||
"version":"1.35",
|
||||
"source":{
|
||||
"icon":"{{pluginHost}}static/images/icon.png",
|
||||
"screenshoot":[
|
||||
"https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/file-player.png"
|
||||
]
|
||||
},
|
||||
"category":"media,file",
|
||||
"description":"jPlayer mediafile player;",
|
||||
"keywords":"",
|
||||
"auther":{
|
||||
"copyright":"kodcloud.",
|
||||
"homePage":"http://www.kodcloud.com",
|
||||
},
|
||||
"configItem":{
|
||||
"pluginAuth":{
|
||||
"type":"userSelect",
|
||||
"value":"all:1",
|
||||
"display":"{{LNG.Plugin.config.auth}}",
|
||||
"desc":"{{LNG.Plugin.config.authDesc}}",
|
||||
"require":1
|
||||
},
|
||||
|
||||
"fileExt":{
|
||||
"type":"tags",
|
||||
"display":"{{LNG.Plugin.Config.fileExt}}",
|
||||
"desc":"{{LNG.Plugin.Config.fileExtDesc}}",
|
||||
"value":"mp3,wav,m4a,aac,oga,ogg,webma,mp4,m4v,flv,mov,f4v,ogv,webm,webmv,m3u8a,m3ua,flac,fla,rtmp,rtmpa",
|
||||
},
|
||||
"fileSort":{
|
||||
"type":"number",
|
||||
"display":"{{LNG.Plugin.Config.fileSort}}",
|
||||
"desc":"{{LNG.Plugin.Config.fileSortDesc}}",
|
||||
"value":10,
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Vendored
Executable
+3
File diff suppressed because one or more lines are too long
BIN
Binary file not shown.
+223
@@ -0,0 +1,223 @@
|
||||
var jPlayerConfigInit = function($player,config){
|
||||
var playerConfig = {
|
||||
supplied: "flv,webma,webmv,oga,ogv,m4v,mp3,wav,rtmpa,rtmpv",
|
||||
solution: "html,flash",
|
||||
wmode:"transparent",
|
||||
volume:0.8,
|
||||
autoBlur: true,
|
||||
autohide:{
|
||||
restored:true,// false true autohide
|
||||
full:true,
|
||||
fadeIn:400,
|
||||
fadeOut:1000,
|
||||
hold:2500
|
||||
},
|
||||
smoothPlayBar: false,
|
||||
keyEnabled: true,
|
||||
remainingDuration: false,
|
||||
toggleDuration: false,
|
||||
errorAlerts: false,
|
||||
warningAlerts: false,
|
||||
size: {
|
||||
width: "100%",
|
||||
height: "auto"
|
||||
},
|
||||
cssSelectorAncestor: "#"+$($player).attr('id'),
|
||||
cssSelector: {
|
||||
videoPlay: ".video-play",
|
||||
play: ".play",
|
||||
pause: ".pause",
|
||||
seekBar: ".seekBar",
|
||||
playBar: ".playBar",
|
||||
mute: ".right-volume .mute",
|
||||
unmute: ".right-volume .unmute",
|
||||
volumeBar: ".volume-control",
|
||||
volumeBarValue: ".volume-control .volume-value",
|
||||
currentTime: ".timer.current",
|
||||
duration: ".timer.duration",
|
||||
fullScreen: ".fullscreen",
|
||||
restoreScreen: ".smallscreen",
|
||||
gui: ".controls",
|
||||
noSolution: ".noSolution"
|
||||
},
|
||||
ready: function(current) {
|
||||
$($player).find(".controls .progress-block").css({margin: "0 10px 0 45px"});
|
||||
var media = $(this).data('jPlayer').option.media;
|
||||
if(media){
|
||||
$(this).jPlayer('setMedia',media);
|
||||
}
|
||||
},
|
||||
loadedmetadata:function(){//载入后重置窗口大小
|
||||
try{
|
||||
$player.data('player_resize','0');
|
||||
setTimeout(function(){
|
||||
jPlayerResizeVedio($player);
|
||||
},200);
|
||||
}catch(e){};
|
||||
},
|
||||
error: function(current) {
|
||||
if( current.jPlayer.error.type == 'e_no_solution' &&
|
||||
current.jPlayer.error.context.indexOf("solution:'flash'") === 1){
|
||||
$(".jPlayer-container").css({"text-align": "center"});
|
||||
$(".jPlayer-container").html('Flash插件被屏蔽,请在运行后播放');
|
||||
return;
|
||||
}
|
||||
if(current.jPlayer.error.type != $.jPlayer.error.FLASH){
|
||||
//Tips.tips(LNG.unknow_file_tips+'('+current.jPlayer.error.type+')',false);
|
||||
}
|
||||
var $that = $(this);
|
||||
var $jPlayer = $($player).find(".jPlayer-container");
|
||||
if($that.data('errorNum') == undefined){
|
||||
$that.data('errorNum',1);
|
||||
}
|
||||
//flash未加载完成
|
||||
if( current.jPlayer.error.type == $.jPlayer.error.FLASH &&
|
||||
$jPlayer.data('jPlayer') &&
|
||||
$that.data('errorNum') < 100 &&
|
||||
$jPlayer.data('jPlayer').status){
|
||||
setTimeout(function(){
|
||||
$that.data('errorNum',$that.data('errorNum')+1);
|
||||
var data = $jPlayer.data('jPlayer');
|
||||
if(data && data.status){
|
||||
$jPlayer.jPlayer('setMedia',data.status.media).jPlayer('play');
|
||||
}
|
||||
},200);
|
||||
}
|
||||
if(current.jPlayer.error.type === $.jPlayer.error.URL_NOT_SET){
|
||||
}
|
||||
},
|
||||
waiting:function(){
|
||||
$($player).find('.video-play-loading').show();
|
||||
},
|
||||
playing:function(){
|
||||
$($player).find('.video-play-loading').hide();
|
||||
if($player.data('player_resize') != '1'){
|
||||
$player.data('player_resize','1');
|
||||
jPlayerResizeVedio($($player));
|
||||
}
|
||||
},
|
||||
play: function() {
|
||||
$($player).find('.video-play').stop(true, true).fadeOut(150);
|
||||
},
|
||||
pause: function() {
|
||||
$($player).find('.video-play').stop(true, true).fadeIn(150);
|
||||
},
|
||||
ended: function() {
|
||||
var $next = $($player).find('.play-forward');
|
||||
if($next.length ==1){
|
||||
$next.click();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$.extend(playerConfig,config);
|
||||
return playerConfig;
|
||||
}
|
||||
|
||||
var jPlayerResizeVedio = function($player){
|
||||
var name = $player.parents('.dialog-simple').find('.aui-title-bar').attr('id');
|
||||
var dialog = $.artDialog.list[name];
|
||||
var $vedio = $player.find('video');
|
||||
if(name != 'movie-player-dialog' || $vedio.length == 0){
|
||||
return;
|
||||
}
|
||||
var vWidth = $vedio.width(),
|
||||
vHeight = $vedio.height(),
|
||||
winWidth = $(window).width(),
|
||||
winHeight = $(window).height(),
|
||||
r = vWidth/vHeight;
|
||||
|
||||
if(vHeight >= winHeight*0.8){
|
||||
vHeight = winHeight*0.8;
|
||||
vWidth = vHeight*r;
|
||||
}
|
||||
if(vWidth >= winWidth*0.8){
|
||||
vWidth = winWidth*0.8;
|
||||
vHeight = vWidth/r;
|
||||
}
|
||||
dialog.size(vWidth,vHeight);
|
||||
}
|
||||
|
||||
var jPlayerBindControl = function($player){
|
||||
var $jPlayer = $player.find(".jPlayer-container");
|
||||
$player.find('.playerScreen').unbind('dblclick').dblclick(function(event) {
|
||||
if(!$player.hasClass('jp-state-full-screen')){
|
||||
$player.find('.fullscreen').click();
|
||||
}else{//退出全屏
|
||||
$player.find('.smallscreen').click();
|
||||
}
|
||||
}).unbind('click').click(function(event) {
|
||||
var $buttonPlay = $player.find('.video-play');
|
||||
if($buttonPlay.css('display') == "none"){
|
||||
$jPlayer.jPlayer("pause");
|
||||
$buttonPlay.stop(true, true).fadeIn(150);
|
||||
}else{
|
||||
$jPlayer.jPlayer("play");
|
||||
$buttonPlay.stop(true, true).fadeOut(350);
|
||||
}
|
||||
stopPP(event);
|
||||
return false;
|
||||
}).unbind('mousemove').mousemove(function(event) {
|
||||
var $gui = $player.find('.controls');
|
||||
$gui.fadeIn(100, function() {
|
||||
clearTimeout($gui.data('auto_timer'));
|
||||
var timer = setTimeout( function() {
|
||||
$gui.fadeOut(300);
|
||||
},2000);
|
||||
$gui.data('auto_timer',timer);
|
||||
});
|
||||
});
|
||||
|
||||
$player.find(".volumeblock").unbind('mousedown').mousedown(function() {
|
||||
var $that = $(this);
|
||||
var isDrag = true;
|
||||
$that.mousemove(function(e) {
|
||||
if(!isDrag) return;
|
||||
var percent = (e.pageX - $that.offset().left-5) / $that.find(".volume-control").width();
|
||||
percent = percent <= 0 ? 0 : percent;
|
||||
percent = percent >= 1 ? 1 : percent;
|
||||
|
||||
$that.find(".volume-value").css('width',(percent*100)+'%');
|
||||
$player.find(".jPlayer-container").jPlayer("option", "muted", false);
|
||||
$player.find(".jPlayer-container").jPlayer("option", "volume",percent);
|
||||
return false;
|
||||
}).mouseup(function(e){
|
||||
isDrag = false;
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$player.find(".progress").unbind('mousedown').mousedown(function() {
|
||||
var $that = $(this);
|
||||
var isDrag = true;
|
||||
var resetHead = function(e){
|
||||
var width = $that.find(".seekBar").width();
|
||||
var percent = (e.pageX - $that.offset().left) / width * 100;
|
||||
$that.find(".playBar").css({
|
||||
width: percent + "%"
|
||||
});
|
||||
$player.find(".jPlayer-container").jPlayer("playHead",percent);
|
||||
$player.find(".jPlayer-container").jPlayer('play');
|
||||
};
|
||||
$(this).mousemove(function(e) {
|
||||
if(!isDrag) return;
|
||||
resetHead(e);
|
||||
return false;
|
||||
}).mouseup(function(e){
|
||||
resetHead(e);
|
||||
isDrag = false;
|
||||
});
|
||||
return false;
|
||||
}).unbind('mouseenter').bind('mouseenter',function(){
|
||||
$player.find('.current-time-tips').fadeIn();
|
||||
}).unbind('mouseleave').bind('mouseleave',function(){
|
||||
$player.find('.current-time-tips').fadeOut();
|
||||
}).unbind('mousemove').bind('mousemove',function(e){
|
||||
var playerData = $player.find(".jPlayer-container").data('jPlayer');
|
||||
if(!playerData) return;
|
||||
var $that = $(this);
|
||||
var percent = (e.pageX - $that.offset().left) / $that.width();
|
||||
var display = $.jPlayer.convertTime(playerData.status.duration * percent);
|
||||
var left = e.pageX - $($player).offset().left;
|
||||
$player.find('.current-time-tips').css('left',left).text(display);
|
||||
});
|
||||
}
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
+713
@@ -0,0 +1,713 @@
|
||||
|
||||
.dialog-simple.movie-player-dialog,
|
||||
.dialog-simple.movie-player-dialog .aui-outer,
|
||||
.dialog-simple.movie-player-dialog .aui-border {overflow: visible;}
|
||||
div.dialog-simple.my-jPlayer.movie-player-dialog .aui-header{}
|
||||
div.dialog-simple.my-jPlayer.movie-player-dialog .aui-title{
|
||||
background:#666;filter: alpha(opacity=50);opacity:0.5;
|
||||
border-radius: 0;opacity:1;
|
||||
}
|
||||
|
||||
/*div.dialog-simple.my-jPlayer.movie-player-dialog .aui-header {top: -31px;background:#444;background:rgba(0,0,0,0.01);}*/
|
||||
/*div.dialog-simple.my-jPlayer.movie-player-dialog.dialog-max .aui-header {top:0px;background:transparent;}*/
|
||||
/*div.dialog-simple.my-jPlayer.movie-player-dialog .jPlayer-movie .controls{bottom: -33px;}*/
|
||||
|
||||
div.dialog-simple.my-jPlayer.movie-player-dialog .aui-header {top:0px;background:#000;background:rgba(0,0,0,0.01);}
|
||||
div.dialog-simple.my-jPlayer.movie-player-dialog.dialog-max .aui-header {top:0px;background:transparent;}
|
||||
div.dialog-simple.my-jPlayer.movie-player-dialog .aui-title{background:#000;filter: alpha(opacity=50);opacity:0.5;}
|
||||
div.dialog-simple.my-jPlayer.movie-player-dialog .jPlayer-movie .controls{bottom:0px;}
|
||||
|
||||
|
||||
/*div.dialog-simple.my-jPlayer.movie-player-dialog .dialog-mouse-in .jPlayer-movie .controls{display:block !important;}*/
|
||||
.jPlayer-movie {
|
||||
display:block;
|
||||
/*overflow:hidden;*/
|
||||
color:#f9f9f9;
|
||||
box-shadow: 0 2px 30px rgba(50,50,50,0.5);
|
||||
margin:0;
|
||||
height: 100%;width: 100%;
|
||||
background: #000;
|
||||
position: relative;
|
||||
}
|
||||
.jPlayer-movie a {
|
||||
color:#f9f9f9;
|
||||
text-decoration:none;
|
||||
outline-style:none;
|
||||
outline-width:0
|
||||
}
|
||||
.jPlayer-movie * {
|
||||
box-sizing:content-box;
|
||||
-moz-box-sizing:content-box;
|
||||
-webkit-box-sizing:content-box
|
||||
}
|
||||
.jPlayer-movie.flashPlayer .jPlayer-container,
|
||||
.jPlayer-movie.flashPlayer .jPlayer-container object{
|
||||
width:100% !important;
|
||||
height:100% !important;
|
||||
}
|
||||
.jPlayer-movie a.smooth {
|
||||
transition:all 0.1s linear;
|
||||
-webkit-transition:all 0.1s linear;
|
||||
-moz-transition:all 0.1s linear;
|
||||
-o-transition:all 0.1s linear
|
||||
}
|
||||
.jPlayer-movie .jPlayer-container {
|
||||
margin:0;
|
||||
padding:0;
|
||||
line-height:0;
|
||||
}
|
||||
.jPlayer-movie .jPlayerMask,
|
||||
.jPlayer-movie.jp-video-full .jPlayerMask{
|
||||
position: absolute;
|
||||
top: 0;bottom:0px;left: 0px;right: 0px;
|
||||
cursor:pointer;
|
||||
z-index: 99;
|
||||
z-index:999\9;
|
||||
background:#000;
|
||||
filter: alpha(opacity=1);opacity:0.01;
|
||||
}
|
||||
|
||||
|
||||
.jPlayer-movie object{width:100%;height:100%;}
|
||||
|
||||
.jPlayer-movie.jp-video-full,.dialog-max .jPlayer{
|
||||
width:100% !important;
|
||||
height:100% !important;
|
||||
}
|
||||
.jPlayer-movie.jp-video-full>.controls {
|
||||
position:absolute;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
z-index:1000
|
||||
}
|
||||
.jPlayer-movie.jp-video-full, .jPlayer-movie.jp-video-full object, .jPlayer-movie.jp-video-full video {
|
||||
position:fixed;
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
display:block;
|
||||
border-width:0px;
|
||||
z-index:999
|
||||
}
|
||||
.jPlayer-movie.jp-video-full .playerScreen {
|
||||
position:static;
|
||||
}
|
||||
.jPlayer-movie.jp-video-full .playerScreen .video-play {
|
||||
z-index:1000
|
||||
}
|
||||
.jPlayer-movie .playerScreen {
|
||||
cursor:pointer;
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
|
||||
display: flex;display: -webkit-flex;
|
||||
align-items: center;-webkit-align-items: center;
|
||||
justify-content: center;-webkit-justify-content: center;
|
||||
|
||||
position: absolute;overflow: hidden;
|
||||
}
|
||||
.jPlayer-movie .current-time-tips{
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 35px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
width: 40px;
|
||||
margin-left: -20px;
|
||||
height: 25px;
|
||||
background-color: #444;
|
||||
color: #fff;
|
||||
z-index: 99;
|
||||
text-align: center;
|
||||
line-height: 25px;
|
||||
background-color: rgba(50,50,50,0.7);
|
||||
}
|
||||
.jPlayer-movie .playerScreen .video-play{
|
||||
display:block;
|
||||
position:absolute;
|
||||
z-index:100;
|
||||
width:100%;
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
background:rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.jPlayer-movie .playerScreen .video-play-loading{
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
background: none;
|
||||
opacity: 0.6;
|
||||
}
|
||||
.jPlayer-movie .playerScreen .video-play-loading .play-icon{
|
||||
display: block;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
width:100px;
|
||||
height:100px;
|
||||
font-size:80px;
|
||||
text-align:center;
|
||||
line-height:100px;
|
||||
color: #fff;
|
||||
margin:-50px 0 0 -50px;
|
||||
}
|
||||
.jPlayer-movie .playerScreen .video-play .play-icon{
|
||||
position:absolute;
|
||||
top:50%;
|
||||
left:50%;
|
||||
color: #fff;
|
||||
color: rgba(255,255,255,0.7);
|
||||
margin:-60px 0 0 -60px;
|
||||
display:block;
|
||||
width:120px;
|
||||
height:120px;
|
||||
font-size:6em;
|
||||
text-align:center;
|
||||
line-height:140px;
|
||||
}
|
||||
.jPlayer-movie .controls {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 0px;
|
||||
font-size:12px;
|
||||
height:32px;
|
||||
line-height:32px !important;
|
||||
background:#232323;
|
||||
border-top: 1px solid #333;
|
||||
|
||||
z-index:10;
|
||||
background-color:rgba(30,30,30,0.5);
|
||||
border-color:rgba(0,0,0,0.1);
|
||||
opacity: 0.9;
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
.jPlayer-movie .controls .progress-block {
|
||||
display:block;
|
||||
width:auto;
|
||||
margin:0 185px 0 45px !important;
|
||||
}
|
||||
.jPlayer-movie .controls .progress-block .timer {
|
||||
text-align:center
|
||||
}
|
||||
.jPlayer-movie .controls .progress-block .timer.current {
|
||||
float:left;
|
||||
width:40px
|
||||
}
|
||||
.jPlayer-movie .controls .progress-block .timer.duration {
|
||||
float:right;
|
||||
width:40px
|
||||
}
|
||||
.jPlayer-movie .controls .progress-block .progress {
|
||||
display:block;
|
||||
width:auto;
|
||||
margin:0 45px 0 45px;
|
||||
background: none;filter: none;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
height:6px;
|
||||
padding:13px 0;
|
||||
z-index:9
|
||||
}
|
||||
.jPlayer-movie .controls .progress-block .progress .fullBar {
|
||||
width: 100%;
|
||||
background: #2f2f2f;
|
||||
background: rgba(150,150,150,0.3);
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
height: 6px;
|
||||
border-radius:6px;
|
||||
-webkit-border-radius:6px;
|
||||
z-index: -1;
|
||||
}
|
||||
.jPlayer-movie .controls .progress-block .progress .seekBar {
|
||||
position:relative;
|
||||
display:block;
|
||||
cursor:pointer;
|
||||
padding:0;
|
||||
margin:0;
|
||||
height:100%;
|
||||
background:#3d3d3d;
|
||||
background-color: rgba(170,170,170,0.55);
|
||||
border-radius:6px;
|
||||
-webkit-border-radius:6px;
|
||||
}
|
||||
|
||||
.jPlayer-movie .controls .progress-block .progress .seekBar .playBar {
|
||||
display:block;
|
||||
position:relative;
|
||||
height:100%;
|
||||
padding:0;
|
||||
background:#0082B2;
|
||||
border-radius:2px;
|
||||
-webkit-border-radius:2px;
|
||||
overflow: visible !important;
|
||||
}
|
||||
.jPlayer-movie .controls .progress-block .progress .seekBar .playBar:after,
|
||||
.jPlayer-movie .controls .volumeblock .volume-control .volume-value:after{
|
||||
content: " ";
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
position: absolute;
|
||||
background: #03A9F4;
|
||||
border-radius: 50%;
|
||||
right: -8px;
|
||||
top: -5px;
|
||||
transition: box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.jPlayer-movie .controls .progress-block .progress .seekBar:hover .playBar:after,
|
||||
.jPlayer-movie .controls .volumeblock .volume-control:hover .volume-value:after{
|
||||
box-shadow: 0 0 0 5px rgba(81, 201, 255, 0.32);
|
||||
background: #90ddff;
|
||||
transition: box-shadow 0.2s;
|
||||
}
|
||||
.jPlayer-movie .controls .volumeblock {
|
||||
display:block;
|
||||
position:absolute;
|
||||
right:40px;
|
||||
top:0;
|
||||
width:80px;
|
||||
margin:0 10px;
|
||||
height:32px;
|
||||
font-size:0
|
||||
}
|
||||
.jPlayer-movie .controls .volumeblock .volume-control {
|
||||
display:inline-block;
|
||||
height:5px;
|
||||
width:100%;
|
||||
cursor:pointer;
|
||||
background:#3d3d3d;
|
||||
background-color: rgba(150,150,150,0.5);
|
||||
border-radius:6px;
|
||||
-webkit-border-radius:6px;
|
||||
vertical-align:middle;
|
||||
}
|
||||
.jPlayer-movie .controls .volumeblock .volume-control .volume-value {
|
||||
display:block;
|
||||
width:20%;
|
||||
height:100%;
|
||||
background:#0082B2;
|
||||
border-radius:6px;
|
||||
position: relative;
|
||||
-webkit-border-radius:6px;
|
||||
}
|
||||
.jPlayer-movie .controls .controlset {
|
||||
display:block;
|
||||
position:absolute;
|
||||
text-align:center;
|
||||
top:0
|
||||
}
|
||||
.jPlayer-movie .controls .controlset.left {left:0;}
|
||||
.jPlayer-movie .controls .controlset.right {right:0;}
|
||||
.jPlayer-movie .controls .controlset.right-volume {right:140px}
|
||||
.jPlayer-movie .controls .controlset .play, .jPlayer-movie .controls .controlset .pause, .jPlayer-movie .controls .controlset .fullscreen, .jPlayer-movie .controls .controlset .smallscreen, .jPlayer-movie .controls .controlset .mute, .jPlayer-movie .controls .controlset .unmute {
|
||||
display:inline-block;
|
||||
width:38px;
|
||||
height:32px;
|
||||
font-size:1.4444444444em;
|
||||
background:transparent
|
||||
}
|
||||
.jPlayer-movie .controls .controlset .play:hover, .jPlayer-movie .controls .controlset .pause:hover, .jPlayer-movie .controls .controlset .fullscreen:hover, .jPlayer-movie .controls .controlset .smallscreen:hover, .jPlayer-movie .controls .controlset .mute:hover, .jPlayer-movie .controls .controlset .unmute:hover {
|
||||
background:#3d3d3d;
|
||||
background: rgba(255,255,255,0.4);
|
||||
}
|
||||
.jPlayer-movie.audioPlayer .playerScreen .video-play {
|
||||
display:none !important
|
||||
}
|
||||
.jPlayer-movie.audioPlayer .controls .controlset.right {
|
||||
display:none
|
||||
}
|
||||
.jPlayer-movie.audioPlayer .controls .controlset.right-volume {
|
||||
right:100px
|
||||
}
|
||||
.jPlayer-movie.audioPlayer .controls .progress-block {
|
||||
margin:0 140px 0 40px;
|
||||
}
|
||||
.jPlayer-movie.audioPlayer .controls .volumeblock {
|
||||
right:5px
|
||||
}
|
||||
.jPlayer-movie.light {
|
||||
color:#000
|
||||
}
|
||||
.jPlayer-movie.light a {
|
||||
color:#000
|
||||
}
|
||||
.jPlayer-movie.light .playerScreen .video-play {
|
||||
background:rgba(204, 204, 204, 0.4)
|
||||
}
|
||||
.jPlayer-movie.light .controls {
|
||||
background:#F4F4F4;
|
||||
border:1px solid #e7e7e7
|
||||
}
|
||||
.jPlayer-movie.light .controls .play:hover, .jPlayer-movie.light .controls .pause:hover, .jPlayer-movie.light .controls .fullscreen:hover, .jPlayer-movie.light .controls .smallscreen:hover, .jPlayer-movie.light .controls .mute:hover, .jPlayer-movie.light .controls .unmute:hover {
|
||||
background:#dbdbdb
|
||||
}
|
||||
.jPlayer-movie.light .controls .volumeblock .volume-control, .jPlayer-movie.light .controls .progress-block .progress .seekBar {
|
||||
background:#dbdbdb
|
||||
}
|
||||
.jPlayer-movie.light .controls .volumeblock .volume-control .volume-value, .jPlayer-movie.light .controls .progress-block .progress .seekBar .playBar {
|
||||
background:#0082B2
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
.jPlayer-movie .controls .progress-block {
|
||||
margin:0 40px 0 40px !important;
|
||||
}
|
||||
.jPlayer-movie.audioPlayer .controls .progress-block {
|
||||
margin:0 5px 0 40px !important;
|
||||
}
|
||||
.jPlayer-movie .controls .volumeblock {
|
||||
display:none
|
||||
}
|
||||
.jPlayer-movie .controls .controlset.right-volume {
|
||||
display:none
|
||||
}
|
||||
.jPlayer-movie .playerScreen .video-play .play-icon {
|
||||
font-size:3.5em;
|
||||
margin:-35px 0 0 -35px;
|
||||
width:70px;
|
||||
height:70px;
|
||||
line-height:70px
|
||||
}
|
||||
}
|
||||
|
||||
/*=========================*/
|
||||
|
||||
div.dialog-simple.my-jPlayer .aui-header{
|
||||
position: absolute;
|
||||
left: 0px;right: 0px;
|
||||
width: 100%;height: 40px;
|
||||
}
|
||||
div.dialog-simple.my-jPlayer .aui-title-bar{z-index: 100;}
|
||||
div.dialog-simple.my-jPlayer .aui-title{background:none;opacity: 0;}
|
||||
body div.dialog-simple.my-jPlayer .aui-outer .aui-min,
|
||||
body div.dialog-simple.my-jPlayer .aui-outer .aui-max,
|
||||
body div.dialog-simple.my-jPlayer .aui-outer .aui-close{
|
||||
border-radius: 50%;
|
||||
background-image: none;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
body div.dialog-simple.my-jPlayer .aui-outer .aui-min:hover{background: #ffeb3b;color: #8e810d;}
|
||||
body div.dialog-simple.my-jPlayer .aui-outer .aui-max:hover{background: #4CAF50;color: #19581c;}
|
||||
body div.dialog-simple.my-jPlayer .aui-outer .aui-close:hover{background:#f30;color:#751717;}
|
||||
body div.dialog-simple.my-jPlayer .aui-outer .aui-close{right:6px;}
|
||||
body div.dialog-simple.my-jPlayer .aui-outer .aui-max{right: 28px;}
|
||||
body div.dialog-simple.my-jPlayer .aui-outer .aui-min{right: 50px;}
|
||||
body div.dialog-simple.my-jPlayer .aui-outer .aui-close:before{content: "\f00d";}
|
||||
body div.dialog-simple.my-jPlayer .aui-outer .aui-max:before{content: "\f065";}
|
||||
body div.dialog-simple.my-jPlayer .aui-outer .aui-min:before{content: "\f068";}
|
||||
|
||||
div.dialog-simple.music-player-dialog.my-jPlayer .aui-header{
|
||||
opacity: 1 !important;filter: alpha(opacity=100) !important;overflow: hidden;
|
||||
}
|
||||
div.dialog-simple.music-player-dialog.my-jPlayer .aui-title-bar{width:100%;height:80%;overflow: hidden;}
|
||||
div.dialog-simple.music-player-dialog.my-jPlayer .aui-title{
|
||||
font-size:0px;height:100%;width:100%;padding:0;
|
||||
background:#1a9aff;opacity: 0.01 !important;filter: alpha(opacity=1) !important;
|
||||
}
|
||||
div.dialog-simple.music-player-dialog.my-jPlayer .aui-main{min-height: 400px;}
|
||||
.jPlayer-music{
|
||||
width: 100%;height: 100%;
|
||||
min-width: 280px;
|
||||
min-height: 400px;
|
||||
box-shadow: 0 0 30px rgba(0,0,0,.35);
|
||||
color: #fff;text-shadow: 0 0 1px #fff;
|
||||
}
|
||||
.jPlayer-music .player-bg{
|
||||
position:absolute;
|
||||
border-radius: 4px;
|
||||
opacity: 0.9;
|
||||
top:0;left:0;right:0;bottom:0;
|
||||
transition: all .3s ease;-webkit-transition: all .3s ease;
|
||||
|
||||
background: #1a9aff;
|
||||
background-image: -webkit-linear-gradient(160deg, #3f2536, #bc6e07);
|
||||
background-image: -moz-linear-gradient(160deg, #3f2536, #bc6e07);
|
||||
background-image: -o-linear-gradient(160deg, #3f2536, #bc6e07);
|
||||
background-image: -ms-linear-gradient(160deg, #3f2536, #bc6e07);
|
||||
background-image: linear-gradient(160deg, #5fa716, #2196F3);
|
||||
}
|
||||
|
||||
.jPlayer-music .playerScreen{width:0px;height:0px;}
|
||||
.jPlayer-music .video-play{display:none !important;}
|
||||
.jPlayer-music .top-banner {
|
||||
position: relative;
|
||||
padding: 15px 15px 5px 15px;
|
||||
background:#03a9f4;
|
||||
background: rgba(3, 169, 244, 0.4);
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.jPlayer-music .top-banner .item-title{
|
||||
position: absolute;width: 70%;margin-top: -8px;
|
||||
overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.jPlayer-music .current-time-tips{
|
||||
position: absolute;
|
||||
display: none;
|
||||
background: #2984cc;
|
||||
background: rgba(200, 200, 200, 0.2);
|
||||
border-radius: 3px;
|
||||
padding: 2px 5px;
|
||||
margin-top: -7px;
|
||||
margin-left: -20px;
|
||||
}
|
||||
|
||||
.jPlayer-music .play-tools{
|
||||
padding: 0px 0 6px;
|
||||
position: absolute;
|
||||
right: 0px;left: 0px;
|
||||
background: #03a9f4;
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.jPlayer-music .play-tools .time{float: left;margin-left: 15px;}
|
||||
.jPlayer-music .play-tools .right{float: right;margin-right: 10px;}
|
||||
.jPlayer-music .play-tools .right span{
|
||||
padding-left: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
.jPlayer-music .play-tools span.show-list,
|
||||
.jPlayer-music .play-tools span.change-loop,
|
||||
.jPlayer-music .right-volume a{
|
||||
display:inline-block;
|
||||
width:20px;
|
||||
text-align: right;
|
||||
}
|
||||
.jPlayer-music .right-volume a{text-align: center;}
|
||||
.jPlayer-music .play-tools span.show-list:hover,
|
||||
.jPlayer-music .play-tools span.change-loop:hover,
|
||||
.jPlayer-music .right-volume a:hover {
|
||||
text-shadow: 0 0 2px #fff,0 0 5px #fff,0 0 20px #fff;
|
||||
}
|
||||
.jPlayer-music .play-tools i.loop-one:after {
|
||||
content: "1";
|
||||
position: absolute;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
font-family: monospace;
|
||||
margin-left: 0px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
.jPlayer-music .right-volume{
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
width: 90px;
|
||||
height: 20px;
|
||||
top:60px;
|
||||
}
|
||||
.jPlayer-music .right-volume a{
|
||||
color: #fff;
|
||||
font-size: 15px;
|
||||
line-height: 15px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.jPlayer-music .top-banner .progress {
|
||||
width: auto;
|
||||
margin: 0;
|
||||
margin-top:8px;
|
||||
background: none;filter: none;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
box-shadow: none;
|
||||
cursor: pointer;
|
||||
height: auto;
|
||||
height:20px;
|
||||
padding: 0;
|
||||
z-index: 9;
|
||||
}
|
||||
.jPlayer-music .top-banner .progress .fullBar {
|
||||
width: 100%;
|
||||
background: #28bcff;
|
||||
background: rgba(255,255,255,0.2);
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 10px;
|
||||
height:2px;
|
||||
border-radius: 6px;
|
||||
-webkit-border-radius: 6px;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.jPlayer-music .top-banner .volumeblock {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 7px;
|
||||
width:65px;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.jPlayer-music .top-banner .progress .seekBar .playBar,
|
||||
.jPlayer-music .top-banner .volumeblock .volume-control .volume-value {
|
||||
display:block;
|
||||
width:20%;
|
||||
height:100%;
|
||||
background: #fff;
|
||||
background:rgba(255, 255, 255, 0.8);
|
||||
border-radius:6px;
|
||||
position: relative;
|
||||
-webkit-border-radius:6px;
|
||||
}
|
||||
.jPlayer-music .top-banner .progress .seekBar,
|
||||
.jPlayer-music .top-banner .volumeblock .volume-control {
|
||||
display:inline-block;
|
||||
height:2px;
|
||||
width:100%;
|
||||
cursor:pointer;
|
||||
background: #5db7ff;
|
||||
background-color: rgba(255,255,255,0.2);
|
||||
border-radius:6px;
|
||||
-webkit-border-radius:6px;
|
||||
vertical-align:middle;
|
||||
}
|
||||
.jPlayer-music .top-banner .progress .seekBar .playBar:after,
|
||||
.jPlayer-music .top-banner .volumeblock .volume-control .volume-value:after{
|
||||
content:"";
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
position: absolute;
|
||||
background: #bce1ff;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border-radius: 50%;
|
||||
right: -10px;
|
||||
top: -5px;
|
||||
}
|
||||
|
||||
.jPlayer-music .progress i.video-play-loading {
|
||||
position: absolute;
|
||||
margin-top: -5px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
right: -10px;
|
||||
color: rgba(33, 33, 33, 0.4);
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.jPlayer-music .top-banner .progress .seekBar:hover .playBar:after,
|
||||
.jPlayer-music .top-banner .volumeblock .volume-control:hover .volume-value:after{
|
||||
box-shadow: 0 0 0 5px rgba(192, 236, 255, 0.32);
|
||||
}
|
||||
|
||||
.jPlayer-music .control-actions{padding-top: 10px;padding-top: 28px;}
|
||||
.jPlayer-music .control-actions a{
|
||||
width: 50px;height: 50px;line-height: 50px;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
display: inline-block;
|
||||
|
||||
border:2px solid rgba(255,255,255,0.7);
|
||||
border-radius: 50%;
|
||||
font-size: 20px;
|
||||
opacity: .8;
|
||||
cursor: pointer;
|
||||
text-shadow: 0 1px 1px rgba(0,0,0,.2);
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,.2);
|
||||
background: rgba(0,0,0,.2);
|
||||
-webkit-transition: all .1s ease;
|
||||
transition: all .1s ease;
|
||||
color: #fff;
|
||||
}
|
||||
.jPlayer-music .control-actions a:hover{
|
||||
color:#fff; background: rgba(255,255,255,0.3);
|
||||
}
|
||||
.jPlayer-music .control-actions a i.icon-backward{margin-left:-5px;}
|
||||
.jPlayer-music .control-actions a i.icon-play{margin-left: 4px;}
|
||||
.jPlayer-music .control-actions a i.icon-play{margin-left: 4px;}
|
||||
.jPlayer-music .control-actions a i.icon-forward{margin-left:3px;}
|
||||
.jPlayer-music .control-actions a.play-backward,
|
||||
.jPlayer-music .control-actions a.play-forward{
|
||||
height: 30px;margin-top:10px;
|
||||
width: 30px;
|
||||
line-height: 30px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
/*播放列表*/
|
||||
.jPlayer-music .play-list{
|
||||
overflow-y: auto;
|
||||
height: auto;
|
||||
top: 154px;
|
||||
bottom: 0px;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
background: #3b94dc;
|
||||
background: rgba(100, 100, 100, 0.3);
|
||||
}
|
||||
.jPlayer-music .play-list ul{list-style: none; padding: 0;}
|
||||
.jPlayer-music .play-list .item{
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
height:35px;
|
||||
line-height: 35px;
|
||||
padding-left:10px;
|
||||
border-color: 1px solid #237cc1;
|
||||
border-bottom: 1px solid rgba(160, 160, 160, 0.1);
|
||||
transition: background-color .2s ease;
|
||||
-webkit-transition: background-color .2s ease;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.jPlayer-music .play-list .item .name{
|
||||
padding-left: 10px;border-left: 4px solid transparent;
|
||||
display: inline-block;width: 80%;
|
||||
white-space: nowrap;text-overflow: ellipsis; overflow: hidden;
|
||||
height: 25px;line-height: 25px;margin-top: 5px;
|
||||
}
|
||||
.jPlayer-music .play-list .item:hover,
|
||||
.jPlayer-music .play-list .item.this{
|
||||
background: #237cc1;
|
||||
background: rgba(202, 200, 200, 0.2);
|
||||
border-color:transparent;
|
||||
}
|
||||
.jPlayer-music.jp-state-playing .play-list .item.this:hover{background-image: none;}
|
||||
.jPlayer-music .play-list .item.this .name{
|
||||
border-left: 4px solid rgba(255,255,255,0.6);
|
||||
}
|
||||
.jPlayer-music .play-list .item .action-right {
|
||||
float: right;display:none;
|
||||
transition: all .2s ease;-webkit-transition: all .2s ease;
|
||||
position: absolute;right: 0;margin-top: -43px;
|
||||
}
|
||||
.jPlayer-music .play-list .item:hover .action-right{display:block;}
|
||||
.jPlayer-music .play-list .item .action-right .download,
|
||||
.jPlayer-music .play-list .item .action-right .remove{
|
||||
display: inline-block;text-align: center;
|
||||
transition: all .2s ease;-webkit-transition: all .2s ease;
|
||||
width: 36px;height: 36px;background: rgba(255,255,255,0.1);margin-left: -4px;
|
||||
}
|
||||
.jPlayer-music .play-list .item .action-right .download:hover,
|
||||
.jPlayer-music .play-list .item .action-right .remove:hover{
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
transition: all .2s ease;-webkit-transition: all .2s ease;
|
||||
}
|
||||
|
||||
|
||||
/*播放中 列表*/
|
||||
.jPlayer-music.jp-state-playing .play-list .item.this{
|
||||
background-image: url(./images/sound-playing.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 95% 13px;
|
||||
}
|
||||
/*隐藏列表*/
|
||||
.hide-play-list .aui-main{height:155px !important;}
|
||||
.hide-play-list .jPlayer-music{min-height:inherit;}
|
||||
.hide-play-list .jPlayer-music .play-list{display:none;}
|
||||
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
var jplayerTemplateMovie =
|
||||
'<div class="jPlayer jPlayer-movie">\
|
||||
<div class="playerScreen">\
|
||||
<div class="jPlayer-container"></div>\
|
||||
<div class="jPlayerMask"></div>\
|
||||
<a href="javascript:void(0);" class="video-play disable-ripple"><i class="play-icon icon-play-sign"></i></a>\
|
||||
<a href="javascript:void(0);" class="video-play-loading disable-ripple"><i class="play-icon icon-spinner moveCircleRight"></i></a>\
|
||||
</div>\
|
||||
<div class="current-time-tips"><span>00:00</span></div>\
|
||||
<div class="controls">\
|
||||
<div class="controlset left">\
|
||||
<a href="javascript:void(0);" class="play smooth disable-ripple"><i class="icon-play"></i></a>\
|
||||
<a href="javascript:void(0);" class="pause smooth"><i class="icon-pause"></i></a>\
|
||||
</div>\
|
||||
<div class="controlset right-volume">\
|
||||
<a href="javascript:void(0);" class="mute smooth"><i class="icon-volume-up"></i></a>\
|
||||
<a href="javascript:void(0);" class="unmute smooth"><i class="icon-volume-off"></i></a>\
|
||||
</div>\
|
||||
<div class="volumeblock">\
|
||||
<div class="volume-control">\
|
||||
<div class="volume-value"></div>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="controlset right">\
|
||||
<a href="javascript:void(0);" class="fullscreen smooth"><i class="icon-fullscreen"></i></a>\
|
||||
<a href="javascript:void(0);" class="smallscreen smooth"><i class=" icon-resize-small"></i></a>\
|
||||
</div>\
|
||||
<div class="progress-block">\
|
||||
<div class="timer current"></div>\
|
||||
<div class="timer duration"></div>\
|
||||
<div class="progress">\
|
||||
<div class="fullBar"></div>\
|
||||
<div class="seekBar">\
|
||||
<div class="playBar"></div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="wmp-player"></div>\
|
||||
</div>';
|
||||
|
||||
var jplayerTemplateMusic =
|
||||
'<div class="jPlayer jPlayer-music">\
|
||||
<div class="player-bg"></div>\
|
||||
<div class="playerScreen">\
|
||||
<div class="jPlayer-container"></div>\
|
||||
<div class="jPlayerMask"></div>\
|
||||
</div>\
|
||||
<div class="top-banner">\
|
||||
<div class="item-title">--</div>\
|
||||
<div class="control-actions">\
|
||||
<a href="javascript:void(0);" class="play-backward smooth"><i class="icon-backward"></i></a>\
|
||||
<a href="javascript:void(0);" class="play smooth"><i class="icon-play"></i></a>\
|
||||
<a href="javascript:void(0);" class="pause smooth"><i class="icon-pause"></i></a>\
|
||||
<a href="javascript:void(0);" class="play-forward smooth"><i class="icon-forward"></i></a>\
|
||||
<div class="clear"></div>\
|
||||
</div>\
|
||||
<div class="current-time-tips"><span>00:00</span></div>\
|
||||
<!-- volume -->\
|
||||
<div class="controlset right-volume">\
|
||||
<a href="javascript:void(0);" class="mute smooth"><i class="icon-volume-up"></i></a>\
|
||||
<a href="javascript:void(0);" class="unmute smooth"><i class="icon-volume-off"></i></a>\
|
||||
<div class="volumeblock">\
|
||||
<div class="volume-control">\
|
||||
<div class="volume-value"></div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
<!-- progress -->\
|
||||
<div class="progress">\
|
||||
<div class="fullBar"></div>\
|
||||
<div class="seekBar">\
|
||||
<div class="playBar"><i class="video-play-loading icon-refresh moveCircleRight"></i></div>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
<!-- info -->\
|
||||
<div class="play-tools">\
|
||||
<span class="time">\
|
||||
<span class="timer current"></span> / <span class="timer duration"></span>\
|
||||
</span>\
|
||||
<span class="right">\
|
||||
<span class="change-loop" data-loop="0"><i class="icon-retweet"></i> </span>\
|
||||
<span class="show-list"><i class="icon-reorder"></i> </span>\
|
||||
</span>\
|
||||
<div class="clear"></div>\
|
||||
</div>\
|
||||
<div class="play-list">\
|
||||
<ul class="content"></ul>\
|
||||
</div>\
|
||||
<div class="wmp-player"></div>\
|
||||
</div>';
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
kodReady.push(function(){
|
||||
var playerSupport = function(){
|
||||
var support = {
|
||||
wap:{//移动端
|
||||
music:['mp3','m4a','aac'],
|
||||
movie:['mp4','m4v','mov']
|
||||
},
|
||||
ie:{
|
||||
music:['mp3','m4a','aac'],
|
||||
movie:['mp4','m4v','mov' , 'flv','f4v']
|
||||
},
|
||||
chrome:{//default chrome,firefox,edge
|
||||
music:['mp3','wav','aac', 'm4a','oga','ogg','webma','flac'],
|
||||
movie:['mp4','m4v','mov', 'f4v','flv','ogv','webm','webmv']
|
||||
}
|
||||
//safari 已经禁用了flash
|
||||
};
|
||||
var res = support.chrome;
|
||||
if(isWap()){
|
||||
res = support.wap;
|
||||
}else if(!!window.ActiveXObject || "ActiveXObject" in window){
|
||||
res = support.ie;
|
||||
}
|
||||
return res.music.join(',') + ',' + res.movie.join(',');
|
||||
}
|
||||
//'mp3,wav,m4a,aac,oga,ogg,webma,mp4,m4v,flv,mov,f4v,ogv,webm,webmv'
|
||||
|
||||
var myPlayer;
|
||||
var loadMyPlayer = function(callback){
|
||||
var appStatic = "{{pluginHost}}static/";
|
||||
var appStaticDefault = "{{pluginHostDefault}}static/";
|
||||
if(myPlayer){
|
||||
callback(myPlayer);
|
||||
}else{
|
||||
var top = ShareData.frameTop();
|
||||
top.require.async(appStatic+'page.js',function(app){
|
||||
if(!myPlayer){
|
||||
myPlayer = app;
|
||||
myPlayer.init(appStatic,appStaticDefault);
|
||||
}
|
||||
callback(myPlayer);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
kodApp.add({
|
||||
name:"jPlayer",
|
||||
title:LNG['Plugin.default.jPlayer'],
|
||||
ext:playerSupport(),
|
||||
//ext:"{{config.fileExt}}",
|
||||
sort:"{{config.fileSort}}",
|
||||
icon:'{{pluginHost}}static/images/icon.png',
|
||||
callback:function(path,ext){
|
||||
var music = ['mp3','wav','aac','m4a','oga','ogg','webma','m3u8a','m3ua','flac'];
|
||||
if(isWap() && $.inArray(ext, music) == -1 && G.ACT != 'file' ){ //移动端,非视频文件分享页面用跳转方式打开
|
||||
return window.open(core.path2url(path));
|
||||
}
|
||||
var list = [{
|
||||
url:core.path2url(path),
|
||||
name:urlDecode(core.pathThis(path)),//zip内文件播放
|
||||
ext:ext
|
||||
}];
|
||||
|
||||
if(isWap() && !window.jplayerInit){
|
||||
window.jplayerInit = true;
|
||||
$(".jPlayer-music .play-list .remove").trigger("click");
|
||||
$.addStyle('.music-player-dialog{visibility:visible;}');
|
||||
}
|
||||
loadMyPlayer(function(player){
|
||||
player.play(list);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 移动端安卓首次打开播放器不自动播放问题处理;
|
||||
if(isWap()){
|
||||
$.addStyle('.music-player-dialog{visibility:hidden;}');
|
||||
// loadMyPlayer(function(player){
|
||||
// player.play([{url:"",name:"",ext:"mp3"}]);
|
||||
// });
|
||||
}
|
||||
|
||||
//音效播放绑定
|
||||
Hook.bind('playSound',function(url){
|
||||
loadMyPlayer(function(player){
|
||||
player.playSound(url);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//多选含有音乐右键菜单
|
||||
var menuOpt = {
|
||||
'play-media':{
|
||||
name:LNG.add_to_play,
|
||||
className:"play-media hidden",
|
||||
icon:"x-item-file x-mp3",
|
||||
accesskey: "p",
|
||||
callback:function(action,option){
|
||||
if (ui.fileLight.fileListSelect().length <1) return;
|
||||
var list = [];//选中单个&多个都可以播放
|
||||
ui.fileLight.fileListSelect().each(function(index){
|
||||
var ext = ui.fileLight.type($(this));
|
||||
if ( kodApp.appSupportCheck('jPlayer',ext) ) {
|
||||
var path = ui.fileLight.path($(this));
|
||||
var url = core.path2url(path,false);
|
||||
list.push({
|
||||
url:url,
|
||||
name:core.pathThis(path),
|
||||
ext:ext
|
||||
});
|
||||
}
|
||||
});
|
||||
loadMyPlayer(function(player){
|
||||
player.play(list);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
$.contextMenu.menuAdd(menuOpt,'.menu-more',false,'.clone');
|
||||
|
||||
|
||||
//多选含有音乐检测;添加到音乐列表
|
||||
Hook.bind('rightMenu.show.menu-more',function($menuAt,$theMenu){
|
||||
var needMenu = 0;
|
||||
var hideClass = 'hidden';
|
||||
ui.fileLight.fileListSelect().each(function(){
|
||||
var ext = core.pathExt(ui.fileLight.name($(this)));
|
||||
if ( kodApp.appSupportCheck('jPlayer',ext) ){
|
||||
needMenu +=1;
|
||||
}
|
||||
});
|
||||
if(needMenu == 0){
|
||||
$theMenu.find('.play-media').addClass(hideClass);
|
||||
}else{
|
||||
$theMenu.find('.play-media').removeClass(hideClass);
|
||||
}
|
||||
});
|
||||
});
|
||||
+384
@@ -0,0 +1,384 @@
|
||||
define(function(require, exports) {
|
||||
var movieTemplate = '';
|
||||
var musicTemplate = '';
|
||||
var MUSIC = 'music-player';
|
||||
var MOVIE = 'movie-player';
|
||||
var appStatic,appStaticDefault;
|
||||
|
||||
var create = function(playerType){
|
||||
var ico = playerType == MUSIC?'mp3':'mp4';
|
||||
var selector = '.'+playerType+'-dialog';
|
||||
var template = movieTemplate;
|
||||
var size = {width:'70%',height:'60%'};
|
||||
if(playerType == MUSIC){
|
||||
template = musicTemplate;
|
||||
size = {width:'320px',height:'420px'};
|
||||
}
|
||||
var dialog = $.dialog({
|
||||
id:playerType+'-dialog',
|
||||
simple:true,
|
||||
ico:core.icon(ico),
|
||||
title:'player',
|
||||
// top:'25%',
|
||||
disableTab:true,
|
||||
width:size.width,
|
||||
height:size.height,
|
||||
content:template,
|
||||
resize:true,
|
||||
padding:0,
|
||||
fixed:true,
|
||||
close:function(){
|
||||
var player = getPlayer(playerType);
|
||||
player.jPlayer("destroy");//.jPlayer("pause");
|
||||
}
|
||||
});
|
||||
dialog.DOM.wrap.addClass('my-jPlayer');
|
||||
return $(selector).find(".jPlayer-container");
|
||||
};
|
||||
|
||||
var getPlayerType = function(ext){
|
||||
if (ext =='music' ) return MUSIC;
|
||||
if (ext == undefined) ext = 'mp3';
|
||||
if (inArray(['mp3','wav','aac', 'm4a','oga','ogg','webma','m3u8a','m3ua','flac'],ext)) {
|
||||
return MUSIC;
|
||||
}else {
|
||||
return MOVIE;
|
||||
}
|
||||
};
|
||||
var getPlayer = function(playerType){
|
||||
var selector = '.'+playerType+'-dialog';
|
||||
var dialog = $(selector);
|
||||
if(dialog.length == 0){
|
||||
return false;
|
||||
}
|
||||
return dialog.find(".jPlayer-container");
|
||||
}
|
||||
|
||||
/*
|
||||
html5:mp3,webma,oga,ogg,wav | webmv,ogv,m4v,mp4,mov
|
||||
flash:mp3,m4a,m4v,mov,mp4,flv
|
||||
|
||||
Safari:mp3,m4a | mp4,m4v,mov
|
||||
Chrome,Firefox: mp3,m4a,webma,oga,wav | webmv,ogv,m4v,mp4,mov
|
||||
|
||||
IE9:mp3,m4a | m4v,mp4
|
||||
*/
|
||||
|
||||
var getMedia = function(item){
|
||||
var typeArr = {
|
||||
'mp4' : 'm4v',
|
||||
'm4v' : 'm4v',
|
||||
'mov' : 'm4v',
|
||||
'ogv' : 'ogv',
|
||||
'webm': 'webmv',
|
||||
'webmv':'webmv',
|
||||
'flv' : 'flv',
|
||||
'fla' : 'flv',
|
||||
'f4v' : 'flv',
|
||||
|
||||
'f4a' : 'flv',
|
||||
'mp3' : 'mp3',
|
||||
'wav' : 'wav',
|
||||
'm4a' : 'mp3',
|
||||
'aac' : 'mp3',
|
||||
'ogg' : 'oga',
|
||||
'oga' : 'oga',
|
||||
'webma':'webma'
|
||||
};
|
||||
var ext = item['ext'];
|
||||
var key = typeArr[ext];
|
||||
var media = {
|
||||
'extType':key,
|
||||
'title':item['name'],
|
||||
'url':item['url'],
|
||||
'solution' : (ext=='flv' || ext == 'f4v') ? "flash" : "html,flash"
|
||||
}
|
||||
media[key] = item['url'];
|
||||
return media;
|
||||
}
|
||||
|
||||
var playStart = function(player,media){
|
||||
if(!media) return;
|
||||
var $playerBox = player.parents('.jPlayer');
|
||||
var config = {
|
||||
solution:media.solution,
|
||||
//solution:'flash',
|
||||
swfPath: appStatic+"jPlayer/jquery.jplayer.swf"
|
||||
}
|
||||
|
||||
$playerBox.attr('id',UUID());
|
||||
player.jPlayer("destroy");
|
||||
player.find(".jPlayer-container").children().remove();
|
||||
player.jPlayer(jPlayerConfigInit($playerBox,config));
|
||||
if(player.find('object').length > 0){
|
||||
$playerBox.addClass('flashPlayer');
|
||||
}else{
|
||||
$playerBox.removeClass('flashPlayer');
|
||||
}
|
||||
|
||||
//delay start play;
|
||||
player.jPlayer("setMedia",media).jPlayer("play");;
|
||||
jPlayerBindControl($playerBox);
|
||||
setTimeout(function(){
|
||||
var name = $playerBox.parents('.dialog-simple').find('.aui-title-bar').attr('id');
|
||||
var dialog = $.dialog.list[name];
|
||||
if(dialog){
|
||||
dialog.title(media.title);
|
||||
}
|
||||
},100);
|
||||
}
|
||||
|
||||
var play = function(list){
|
||||
var ext = list[0]['ext'];
|
||||
var playerType = getPlayerType(ext);
|
||||
var player = getPlayer(playerType);
|
||||
var media = getMedia(list[0]);
|
||||
if(!player){
|
||||
player = create(playerType);
|
||||
if(playerType == MUSIC){
|
||||
musicPlayer.init();
|
||||
}
|
||||
}
|
||||
if(playerType == MUSIC){
|
||||
media = musicPlayer.insert(player,list,ext);
|
||||
}
|
||||
playStart(player,media);
|
||||
try{
|
||||
$.dialog.list[playerType+'-dialog'].display(true);
|
||||
}catch(e){};
|
||||
}
|
||||
|
||||
var musicPlayer = (function(){
|
||||
var playList = [];
|
||||
var playCurrent = 0;
|
||||
var player = null;
|
||||
var loopType = 'circle';//circle,rand
|
||||
|
||||
var insert = function(thePlayer,list){
|
||||
player = thePlayer;
|
||||
var oldLength = playList.length;
|
||||
for (var i = 0; i < list.length; i++) {//插入后默认播放列表的最后一个
|
||||
var exists = false;
|
||||
var find = 0;
|
||||
for (find = 0; find < playList.length; find++) {
|
||||
if(playList[find]['url'] == list[i]['url']){
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 已存在则不插入
|
||||
// 插入后默认播放列表的最后一个;最后一个已存在则不做处理
|
||||
if(exists){
|
||||
if(i == list.length - 1){
|
||||
if(playCurrent != find){
|
||||
playIndex(find);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
playList.push( getMedia(list[i]));
|
||||
}
|
||||
if(playList.length == oldLength){
|
||||
return false;//有重复对应处理
|
||||
}
|
||||
playCurrent = playList.length-1;
|
||||
updateView(true);
|
||||
return playList[playCurrent];
|
||||
}
|
||||
var playIndex = function(index){
|
||||
index = index <= 0 ? 0 : index;
|
||||
index = index >= playList.length-1 ? playList.length-1 : index;
|
||||
playCurrent = index;
|
||||
var media = playList[index];
|
||||
playStart(player,media);
|
||||
updateView(false);
|
||||
}
|
||||
var playAt = function(type){
|
||||
switch(loopType){
|
||||
case 'circle':
|
||||
if(type == 'next'){
|
||||
if(playCurrent < playList.length-1){
|
||||
playIndex(playCurrent+1);
|
||||
}else{
|
||||
playIndex(0);
|
||||
}
|
||||
}else{//prev
|
||||
if(playCurrent-1 < 0){
|
||||
playIndex(playList.length-1);
|
||||
}else{
|
||||
playIndex(playCurrent-1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'rand':playIndex(roundFromTo(0,playList.length)-1);break;
|
||||
case 'one':playIndex(playCurrent);break;
|
||||
default:break;
|
||||
}
|
||||
}
|
||||
var remove = function(index){
|
||||
playList.splice(index,1);
|
||||
playIndex(index);
|
||||
updateView(true);
|
||||
}
|
||||
var download = function(index){
|
||||
var media = playList[index];
|
||||
var url = media.url+'&download=1';
|
||||
kodApp.download(url);
|
||||
}
|
||||
var init = function(player){
|
||||
playCurrent = 0;
|
||||
playList = [];
|
||||
loopType = 'circle';
|
||||
var $playBox = $('.jPlayer-music');
|
||||
var arr = [
|
||||
{icon:"icon-retweet",loop:'circle'},
|
||||
{icon:"icon-random",loop:'rand'},
|
||||
{icon:"icon-refresh loop-one",loop:'one'},
|
||||
];
|
||||
$playBox.find('.change-loop').unbind('click').bind('click',function(){
|
||||
var index = parseInt($(this).attr('data-loop')) + 1;
|
||||
index = index < 0 ? 0 : index;
|
||||
index = index >= arr.length ? 0 : index;
|
||||
var cell = arr[index];
|
||||
$(this).attr('data-loop',index).find('i').attr('class',cell.icon);
|
||||
loopType = cell.loop;
|
||||
});
|
||||
$playBox.find('.play-backward').unbind('click').bind('click',function(){
|
||||
playAt('prev');
|
||||
});
|
||||
$playBox.find('.play-forward').unbind('click').bind('click',function(){
|
||||
playAt('next');
|
||||
});
|
||||
$playBox.find('.show-list').unbind('click').bind('click',function(e){
|
||||
$playBox.parents('.music-player-dialog').toggleClass('hide-play-list');
|
||||
stopPP(e);
|
||||
});
|
||||
$playBox.find('.play-list .item').die('click').live('click',function(e){
|
||||
var index = $(this).index();
|
||||
playIndex(index);
|
||||
stopPP(e);
|
||||
});
|
||||
|
||||
$playBox.find('.play-list .remove').die('click').live('click',function(e){
|
||||
var $item = $(this).parents('.item');
|
||||
var index = $item.index();
|
||||
$item.remove();
|
||||
remove(index);
|
||||
stopPP(e);
|
||||
return false;
|
||||
});
|
||||
$playBox.find('.play-list .download').die('click').live('click',function(e){
|
||||
var index = $(this).parents('.item').index();
|
||||
download(index);
|
||||
stopPP(e);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
var updateView = function(resetList){
|
||||
var $playBox = $(player).parents('.jPlayer');
|
||||
if(resetList){
|
||||
var html = '';
|
||||
$.each(playList,function(i,val){
|
||||
html +=
|
||||
'<li class="item">\
|
||||
<span class="name">'+val.title+'</span>\
|
||||
<div class="action-right">\
|
||||
<span class="download"><i class="icon-download-alt"></i></span>\
|
||||
<span class="remove"><i class="icon-remove"></i></span>\
|
||||
</div>\
|
||||
</li>';
|
||||
});
|
||||
$playBox.find('.play-list .content').html(html);
|
||||
}
|
||||
if(playList.length == 0 || !playList[playCurrent]){
|
||||
playCurrent = 0;
|
||||
$playBox.find('.item-title').html(" ");
|
||||
player.jPlayer("destroy");
|
||||
player.find(".jPlayer-container").children().remove();
|
||||
return;
|
||||
}
|
||||
$playBox.find('.item-title').html(playList[playCurrent].title);
|
||||
$playBox.find('.item').removeClass('this');
|
||||
$playBox.find('.item:eq('+playCurrent+')').addClass('this');
|
||||
colorful($playBox.find('.player-bg'));
|
||||
}
|
||||
var colorful = function($dom){
|
||||
var from = randomColor();
|
||||
var to = randomColor();
|
||||
var rotate = '160deg';
|
||||
var css =
|
||||
"background-image: -webkit-linear-gradient("+rotate+", "+from+", "+to+");\
|
||||
background-image: -moz-linear-gradient("+rotate+", "+from+", "+to+");\
|
||||
background-image: -o-linear-gradient("+rotate+", "+from+", "+to+");\
|
||||
background-image: -ms-linear-gradient("+rotate+", "+from+", "+to+");\
|
||||
background-image: linear-gradient("+rotate+", "+from+", "+to+");"
|
||||
$dom.attr('style',css);
|
||||
}
|
||||
var randomColor = function(r,g,b){
|
||||
return '#'+(Math.random()*0xffffff<<0).toString(16);
|
||||
}
|
||||
return {
|
||||
insert:insert,
|
||||
init:init
|
||||
};
|
||||
})();
|
||||
|
||||
var readyPlay = function(list){
|
||||
if( !$.isArray(list) || list.length == 0){
|
||||
Tips.tips(LNG.error,false);
|
||||
}
|
||||
var playerType = getPlayerType(list[0]['ext']);
|
||||
if(playerType == MOVIE){
|
||||
require.async([
|
||||
appStatic+'jPlayer/kod.flat/template.js',
|
||||
appStatic+'jPlayer/jquery.jplayer.min.js',
|
||||
appStatic+'jPlayer/kod.flat/control.js',
|
||||
appStatic+'jPlayer/kod.flat/style.css'
|
||||
],function(){
|
||||
movieTemplate = jplayerTemplateMovie;
|
||||
play(list);
|
||||
});
|
||||
}else{
|
||||
require.async([
|
||||
appStatic+'jPlayer/kod.flat/template.js',
|
||||
appStatic+'jPlayer/jquery.jplayer.min.js',
|
||||
appStatic+'jPlayer/kod.flat/control.js',
|
||||
appStatic+'jPlayer/kod.flat/style.css'
|
||||
],function(a){
|
||||
musicTemplate = jplayerTemplateMusic;
|
||||
play(list);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//后台播放声音;
|
||||
var playSound = function(sound){//mp3
|
||||
var playerKey = 'x-play-sound';
|
||||
if($('.'+playerKey).length == 0){
|
||||
$('<div style="width:0px;height:0px;" class="'+playerKey+'"></div>').appendTo('body');
|
||||
}
|
||||
var $dom = $('.'+playerKey);
|
||||
require.async(appStatic+'jPlayer/jquery.jplayer.min.js',function(a){
|
||||
var config = {
|
||||
solution:'html',//'html,flash'
|
||||
swfPath: appStatic+'jPlayer/jquery.jplayer.swf',
|
||||
media:{title: "",mp3:sound},
|
||||
ready:function(){
|
||||
$dom.jPlayer("setMedia",config.media).jPlayer("play");
|
||||
}
|
||||
}
|
||||
$dom.jPlayer("destroy").children().remove();
|
||||
$dom.jPlayer(config);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
init:function(staticPath,staticDefault){
|
||||
appStatic = staticPath;
|
||||
appStaticDefault = staticDefault;
|
||||
},
|
||||
playSound:playSound,
|
||||
play:readyPlay
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user