Reference Address: http://aboutplayer.com
Copy Code code as follows:
var lrc0, Lrc1, LRC2;
Moveflag = false;
var top, Bottom;
var lrcobj;
var lrctop;
PREDLT = 0;
CURDLT = 0;
function Lrcclass (TT)
{
THIS.INR = [];
This.otime = 0;
This.dts =-1;
This.dte =-1;
THIS.DLT =-1;
THIS.DDH;
THIS.FJH;
if (/\[offset\:(\-?\d+) \]/i.test (TT))
This.otime = regexp.$1/1000;
tt = Tt.replace (/\[\:\][^$\n]* (\n|$)/g, "$");
tt = Tt.replace (/\[[^\[\]\:]*\]/g, "");
tt = Tt.replace (/\[[^\[\]]*[^\[\]\d]+[^\[\]]*\:[^\[\]]*\]/g, "");
tt = Tt.replace (/\[[^\[\]]*\:[^\[\]]*[^\[\]\d\.] +[^\[\]]*\]/g, "");
tt = Tt.replace (/<[^<>]*[^<>\d]+[^<>]*\:[^<>]*>/g, "");
tt = Tt.replace (/<[^<>]*\:[^<>]*[^<>\d\.] +[^<>]*>/g, "");
while (/\[[^\[\]]+\:[^\[\]]+\]/.test (TT))
{
tt = Tt.replace (/((\[[^\[\]]+\:[^\[\]]+\)) +[^\[\r\n]*) [^\[]*/, "\ n");
var zzzt = regexp.$1;
/^ (. +\]) ([^\]]*) $/.exec (ZZZT);
var ltxt = regexp.$2;
var eft = Regexp.$1.slice (1,-1). Split ("[");
for (var ii=0; ii<eft.length; ii++)
{
var sf = eft[ii].split (":");
var tse = parseint (sf[0],10) * + parsefloat (sf[1));
var SSO = {t:[], w:[], n:ltxt}
Sso.t[0] = Math.Round ((tse-this.otime) *1000)/1000;
This.inr[this.inr.length] = SSO;
}
}
THIS.INR = This.inr.sort (function (a,b) {return a.t[0]-b.t[0];});
for (var ii=0; ii<this.inr.length; ii++)
{
while (/<[^<>]+\:[^<>]+>/.test (THIS.INR[II].N))
{
THIS.INR[II].N = This.inr[ii].n.replace (/< (\d+) \:([\d\.] +) >/, "%=%");
var tse = parseint (regexp.$1,10) * + parsefloat (regexp.$2);
This.inr[ii].t[this.inr[ii].t.length] = Math.Round ((tse-this.otime) *1000)/1000;
}
lrcbc1.innerhtml = "<font>" + this.inr[ii].n.replace (/&/g, "&"). Replace (/</g, "<"). Replace (/> /g, ">"). Replace (/%=%/g, "</font><font>") + "</font>";
var fall = lrcbc1.getelementsbytagname ("Font");
for (var wi=0; wi<fall.length; wi++)
This.inr[ii].w[this.inr[ii].w.length] = fall[wi].offsetwidth;
THIS.INR[II].N = Lrcbc1.innertext;
}
This.overtop = function ()
{
VAR II;
For (ii=this.inr.length-1 ii>0 && this.inr[ii].t[0]>ffbb; ii--) {}
top = II;
}
This.run = function (TME)
{
if (Tme<this.dts | | tme>=this.dte)
{
VAR II;
For (ii=this.inr.length-1 ii>=0 && this.inr[ii].t[0]>tme; ii--) {}
if (ii<0) return;
THIS.DDH = this.inr[ii].t;
THIS.FJH = THIS.INR[II].W;
This.dts = this.inr[ii].t[0];
This.dte = (ii<this.inr.length-1)? this.inr[ii+1].t[0]:aboutplayer.currentmedia.duration;
if (!movable)
{
Lrctop = 140;
Lrcoll.style.pixelTop = 140;
Lowlight (Lrcbox1);
This.overtop ();
Overbottom ();
for (var wi=1; wi<=this.inr.length; wi++)
{
Eval ("Lrcbox" +wi). innertext = THIS.INR[WI-1].N;
Eval ("LRCBC" +wi). innertext = THIS.INR[WI-1].N;
}
movable = true;
}
if (this.dlt>0) Lowcolor (eval ("LRCBC" +THIS.DLT));
Cleartimeout (LRC2);
if (this.dlt==ii-1)
{
PREDLT = this.dlt+1;
if (!ptms && predlt>0)
{
Eval ("LRCBC" +predlt). filters.alpha.opacity = 100;
Eval ("LRCBC" +predlt). Style.width = "100%";
Highcolor (0,this.dte-this.dts);
}
Toposition (1,this.dte-this.dts);
}
if (ii-this.dlt>1 | | ii-this.dlt<=-1)
{
if (this.dlt>=0) Lowcolor (eval ("LRCBC" + (this.dlt+1));
if (This.dlt==-1 | | ii==0)
{
Jumpto (ii-this.dlt-1);
Toposition (1,this.dte-this.dts);
}
Else
Jumpto (II-THIS.DLT);
}
if (this.dlt>=0) lowlight (eval ("Lrcbox" + (this.dlt+1));
THIS.DLT = II;
CURDLT = II;
if (!DRDC) Highlight (eval ("Lrcbox" + (this.dlt+1));
if (DRDC)
{
Curlowcolor (eval ("LRCBC" + (this.dlt+1));
Curhighcolor (0,this.dte-this.dts);
}
}
if (Klok)
{
var BBW = 0;
var Ki;
for (ki=0; ki<this.ddh.length && this.ddh[ki]<=tme; ki++)
BBW + = This.fjh[ki];
var kt = ki-1;
var sc = ((ki<this.ddh.length) this.ddh[ki]:this.dte)-this.ddh[kt];
var TC = tme-this.ddh[kt];
BBW-= this.fjh[kt]-tc/sc * THIS.FJH[KT];
if (Bbw>eval ("Lrcbox" + (this.dlt+1)). offsetwidth)
BBW = eval ("Lrcbox" + (this.dlt+1)). offsetwidth;
Eval ("LRCBC" + (this.dlt+1)). Style.width = Math.Round (BBW);
}
}
Lrcbox1.innertext = "www.aboutplayer.com";
}
function Overbottom ()
{
if (aboutplayer.currentmedia.duration>0)
{
VAR II;
For (ii=lrcobj.inr.length-1 ii>0 && lrcobj.inr[ii].t[0]-ffbb>=aboutplayer.currentmedia.duration;) ii--) {}
bottom = II;
}
Else
SetTimeout ("Overbottom ()", 10);
}
function Jumpto (nline)
{
Lrctop-= 20*nline;
Lrcoll.style.top = Lrctop;
}
function Toposition (Step,dur)
{
if (Moveflag) return;
Lrcoll.style.top = lrctop--;
if (step<20)
{
step++;
settimeout ("Toposition" ("+step+", "+dur+"); ", dur*50);
}
}
function Highcolor (Step,dur)
{
if (Moveflag) return;
Eval ("LRCBC" +predlt). Filters.alpha.opacity = 100-(step++) *10;
if (step<10)
Lrc1 = settimeout ("Highcolor" ("+step+", "+dur+"); ", dur*100);
}
function Curhighcolor (Step,dur)
{
if (Moveflag) return;
Eval ("LRCBC" + (curdlt+1)). Filters.alpha.opacity = (step++) *10;
if (step<10)
LRC2 = settimeout ("Curhighcolor" ("+step+", "+dur+"); ", dur*100);
}
function Highlight (LID)
{
Lid.style.color = "#00FF00";
}
function Lowcolor (LID)
{
Cleartimeout (LRC1);
lid.style.width = 0;
lid.filters.alpha.opacity = 100;
}
function Curlowcolor (LID)
{
lid.filters.alpha.opacity = 0;
Lid.style.width = "100%";
}
function lowlight (LID)
{
Lid.style.color = "#0080C0";
}
function Lrcrun (m)
{
Lrcobj = new Lrcclass (m);
LRC0 = SetInterval ("try {Lrcobj.run (ABOUTPLAYER.CONTROLS.CURRENTPOSITION+FFBB)} catch (hh) {}", 10);
}
Makemovable (Lrcollbox);
function makemovable (Element)
{
Element.attachevent ("onmousedown", onmousedown);
Element.attachevent ("onmouseup", onmouseup);
Element.attachevent ("OnMouseMove", onmousemove);
Flagmove = false;
var s_y, O_y;
Curpot = 0;
function onmousedown ()
{
if (event.button!=1 | | moveflag | |!movable | |!type | | bottom==0) {flagmove = true; return;}
Cleartimeout (LRC0);
if (curdlt>0) Lowcolor (eval ("LRCBC" +CURDLT));
Lowcolor (eval ("LRCBC" + (curdlt+1));
Lowlight (eval ("Lrcbox" + (curdlt+1));
if (lrcoll.style.pixeltop>120-top*20) lrcoll.style.top = 120-top*20;
if (lrcoll.style.pixeltop<120-bottom*20) lrcoll.style.top = 120-bottom*20;
s_y = Event.clienty;
O_y = Lrcoll.style.pixelTop;
Element.style.cursor = "N-resize";
Element.setcapture ();
Moveflag = true;
}
function onmousemove ()
{
if (event.button!=1 | |!moveflag | | flagmove) return;
var offy = event.clienty-s_y;
if (o_y+offy<=120-top*20 && o_y+offy>=120-bottom*20) lrcoll.style.top = O_y+offy;
if (o_y+offy>120-top*20) lrcoll.style.top = 120-top*20;
if (o_y+offy<120-bottom*20) lrcoll.style.top = 120-bottom*20;
var pot = Math.floor ((lrcoll.style.pixeltop-120)/-20);
if (Pot!=curpot)
{
Lowlight (eval ("Lrcbox" + (curpot+1));
Curpot = pot;
Highlight (eval ("Lrcbox" + (curpot+1));
}
}
function onmouseup ()
{
if (!moveflag | | flagmove) {flagmove = false; return;}
if (aboutplayer.playstate==3)
{
if (lrcoll.style.pixeltop<=120-top*20 && lrcoll.style.pixeltop>100-top*20)
Lrcobj.dte =-1;
Else
Lrcobj.dte = Lrcobj.inr[math.floor ((lrcoll.style.pixeltop-120)/-20) -1].t[0];
if (Lrcobj.inr[math.floor (lrcoll.style.pixeltop-120)/-20)].t[0]-ffbb<0)
aboutplayer.controls.currentPosition = 0;
Else
Aboutplayer.controls.currentPosition = Lrcobj.inr[math.floor (lrcoll.style.pixeltop-120)/-20)].t[0]-ffbb;
LRCOBJ.DLT = Math.floor ((lrcoll.style.pixeltop-120)/-20);
Lrctop = Lrcoll.style.pixelTop;
}
Else
{
Lowlight (eval ("Lrcbox" + (curpot+1));
Highlight (eval ("Lrcbox" + (curdlt+1));
Lrcoll.style.top = o_y;
}
LRC0 = SetInterval ("try {Lrcobj.run (ABOUTPLAYER.CONTROLS.CURRENTPOSITION+FFBB)} catch (hh) {}", 10);
Element.releasecapture ();
Element.style.cursor = "Hand";
Moveflag = false;
}
}