Tip: Click lines to highlight, hold ctrl/cmd to multi-select
http://codedumper.com/awuni (12-Jul @ 12:28)
Syntax Highlighted Code
- pll_win.setTimeout(function(){
- let st_vid=this.VLCFoxPlaya_vid;
- //VLCFoxPlaya.console('setTimeout');
- /*let totalProgressPercent = parseInt((st_vid.OPC.aCurTotalProgress/st_vid.OPC.aMaxTotalProgress)*100,10);
- VLCFoxPlaya.console('totalProgressPercent');
- VLCFoxPlaya.console(totalProgressPercent);
- let timeLUnderL = parseInt( ( (st_vid.vidPlayWidth-45-45-80-80-10)*totalProgressPercent ) /100, 10 );
- //VLCFoxPlaya.console('timeLUnderL');
- //VLCFoxPlaya.console(timeLUnderL);
- //pL_vid.playerControlEles.controls.timeLine.timeLineLoadedSection1.width=timeLUnderL;
- st_vid.playerControlEles.controls.timeLine.timeLineLoadedSection1.setAttribute('width',timeLUnderL); */
- VLCFoxPlaya.playerControlFuncs.time.change(st_vid);
- /*VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.state);
- VLCFoxPlaya.console(st_vid.isPlaying);
- if(st_vid.isPlaying && st_vid.unWrappedvidEl.input.state===6){
- VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(st_vid);
- }*/
- //if(st_vid.unWrappedvidEl.input.state ===6 && st_vid.vidDetails.videoLength===st_vid.unWrappedvidEl.input.length){
- /*VLCFoxPlaya.console('st_vid.unWrappedvidEl.input.state');
- VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.state);*/
- //VLCFoxPlaya.console('setTimeout st_vid.isPlaying');
- //VLCFoxPlaya.console(st_vid.isPlaying);
- //if( st_vid.isPlaying){
- let svgPCF=st_vid.playerControlEles.controls;
- let plSt = st_vid.unWrappedvidEl.input.state;
- /*******************
- IDLE=0, OPENING=1, BUFFERING=2, PLAYING=3,
- PAUSED=4, STOPPING=5, ENDED=6, ERROR=7
- *******************/
- if(plSt===4 && st_vid.isPlaying){
- st_vid.isPlaying=false;
- VLCFoxPlaya.console('if(plSt===4 && st_vid.isPlaying){');
- VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(this);
- }
- else if(plSt ===3){
- if(!st_vid.isPlaying){
- VLCFoxPlaya.console('else if(plSt ===3){');
- st_vid.isPlaying=true;
- VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(this);
- }
- //VLCFoxPlaya.console('st_vid.unWrappedvidEl.input.state');
- //VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.state);
- /********
- get percentage of time gone by in the video that is playing
- ********/
- let vidPercLen = parseInt((st_vid.unWrappedvidEl.input.time/st_vid.vidDetails.videoLength)*100,10);
- //VLCFoxPlaya.console('vidPercLen');
- //VLCFoxPlaya.console(vidPercLen);
- /********
- use that percentage to find the new x axis number
- -45-45-80-80 to take away the widths of all the other buttons. -10 cause the loaded sections are 5pixels in on both sides
- -14 to take away the width of timeLinePosRect
- ********/
- let timeLwL = parseInt(((st_vid.vidPlayWidth-45-45-80-80-10)*vidPercLen)/100,10);
- //VLCFoxPlaya.console('timeLwL');
- //VLCFoxPlaya.console(timeLwL);
- /********
- assign timeLineGroup the new transform x axis number
- ********/
- /*let newMatrix = svgPCF.master.createSVGPoint().matrixTransform(gtF2Elem);
- newMatrix.x=timeLwL;
- svgPCF.timeLine.timeLineGroup.timeLineSliderGroupTranslateStartVal
- svgPCF.timeLine.timeLineGroup.*/
- //svgPCF.timeLine.timeLinePosRect.x=timeLwL;
- /*let tsvgc=svgPCF.master.createSVGTransform();
- tsvgc.setTranslate(timeLwL,8);
- svgPCF.timeLine.timeLinePosRect.translate.baseVal.appendItem(tsvgc);*/
- svgPCF.timeLine.timeLinePosRect.setAttribute('x',timeLwL);
- //VLCFoxPlaya.console('svgPCF.timeLine.timeLinePosRect.x');
- //VLCFoxPlaya.console(svgPCF.timeLine.timeLinePosRect.x);
- }
- else if(plSt ===6){
- //VLCFoxPlaya.console('st_vid.unWrappedvidEl.input.state');
- //VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.state);
- if(st_vid.finishedDownloading && st_vid.isPlaying){
- VLCFoxPlaya.console('finished!!');
- //VLCFoxPlaya.console(!st_vid.nsWBPersist);
- //st_vid.isPlaying=false;
- VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(this);
- //VLCFoxPlaya.console('st_vid.vidDetails.videoLength');
- //VLCFoxPlaya.console(st_vid.vidDetails.videoLength);
- //VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.length);
- st_vid.isPlaying=false;
- //VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(this);
- st_vid.vidDetails.imgPlaceHolder.style.zIndex='0';
- st_vid.vidEl.style.zIndex='-1';
- }
- else if(!st_vid.finishedDownloading && st_vid.fileVLCBufferFull){
- st_vid.isPlaying=false;
- VLCFoxPlaya.console('***** buffer is empty ****');
- VLCFoxPlaya.console('!st_vid.finishedDownloading');
- VLCFoxPlaya.console(!st_vid.finishedDownloading);
- /*************
- still playing; buffer is empty
- *************/
- st_vid.bufferAmount=st_vid.bufferAmount+st_vid.OPC.aCurTotalProgress;
- st_vid.fileVLCBufferFull=false;
- st_vid.forceStart=true;
- }
- }
- //}
- VLCFoxPlaya.amyPoller(this, this.document); //https://developer.mozilla.org/en/DOM/window.setInterval#Dangerous_usage
- }, 500);
Plain Code
pll_win.setTimeout(function(){
let st_vid=this.VLCFoxPlaya_vid;
//VLCFoxPlaya.console('setTimeout');
/*let totalProgressPercent = parseInt((st_vid.OPC.aCurTotalProgress/st_vid.OPC.aMaxTotalProgress)*100,10);
VLCFoxPlaya.console('totalProgressPercent');
VLCFoxPlaya.console(totalProgressPercent);
let timeLUnderL = parseInt( ( (st_vid.vidPlayWidth-45-45-80-80-10)*totalProgressPercent ) /100, 10 );
//VLCFoxPlaya.console('timeLUnderL');
//VLCFoxPlaya.console(timeLUnderL);
//pL_vid.playerControlEles.controls.timeLine.timeLineLoadedSection1.width=timeLUnderL;
st_vid.playerControlEles.controls.timeLine.timeLineLoadedSection1.setAttribute('width',timeLUnderL); */
VLCFoxPlaya.playerControlFuncs.time.change(st_vid);
/*VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.state);
VLCFoxPlaya.console(st_vid.isPlaying);
if(st_vid.isPlaying && st_vid.unWrappedvidEl.input.state===6){
VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(st_vid);
}*/
//if(st_vid.unWrappedvidEl.input.state ===6 && st_vid.vidDetails.videoLength===st_vid.unWrappedvidEl.input.length){
/*VLCFoxPlaya.console('st_vid.unWrappedvidEl.input.state');
VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.state);*/
//VLCFoxPlaya.console('setTimeout st_vid.isPlaying');
//VLCFoxPlaya.console(st_vid.isPlaying);
//if( st_vid.isPlaying){
let svgPCF=st_vid.playerControlEles.controls;
let plSt = st_vid.unWrappedvidEl.input.state;
/*******************
IDLE=0, OPENING=1, BUFFERING=2, PLAYING=3,
PAUSED=4, STOPPING=5, ENDED=6, ERROR=7
*******************/
if(plSt===4 && st_vid.isPlaying){
st_vid.isPlaying=false;
VLCFoxPlaya.console('if(plSt===4 && st_vid.isPlaying){');
VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(this);
}
else if(plSt ===3){
if(!st_vid.isPlaying){
VLCFoxPlaya.console('else if(plSt ===3){');
st_vid.isPlaying=true;
VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(this);
}
//VLCFoxPlaya.console('st_vid.unWrappedvidEl.input.state');
//VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.state);
/********
get percentage of time gone by in the video that is playing
********/
let vidPercLen = parseInt((st_vid.unWrappedvidEl.input.time/st_vid.vidDetails.videoLength)*100,10);
//VLCFoxPlaya.console('vidPercLen');
//VLCFoxPlaya.console(vidPercLen);
/********
use that percentage to find the new x axis number
-45-45-80-80 to take away the widths of all the other buttons. -10 cause the loaded sections are 5pixels in on both sides
-14 to take away the width of timeLinePosRect
********/
let timeLwL = parseInt(((st_vid.vidPlayWidth-45-45-80-80-10)*vidPercLen)/100,10);
//VLCFoxPlaya.console('timeLwL');
//VLCFoxPlaya.console(timeLwL);
/********
assign timeLineGroup the new transform x axis number
********/
/*let newMatrix = svgPCF.master.createSVGPoint().matrixTransform(gtF2Elem);
newMatrix.x=timeLwL;
svgPCF.timeLine.timeLineGroup.timeLineSliderGroupTranslateStartVal
svgPCF.timeLine.timeLineGroup.*/
//svgPCF.timeLine.timeLinePosRect.x=timeLwL;
/*let tsvgc=svgPCF.master.createSVGTransform();
tsvgc.setTranslate(timeLwL,8);
svgPCF.timeLine.timeLinePosRect.translate.baseVal.appendItem(tsvgc);*/
svgPCF.timeLine.timeLinePosRect.setAttribute('x',timeLwL);
//VLCFoxPlaya.console('svgPCF.timeLine.timeLinePosRect.x');
//VLCFoxPlaya.console(svgPCF.timeLine.timeLinePosRect.x);
}
else if(plSt ===6){
//VLCFoxPlaya.console('st_vid.unWrappedvidEl.input.state');
//VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.state);
if(st_vid.finishedDownloading && st_vid.isPlaying){
VLCFoxPlaya.console('finished!!');
//VLCFoxPlaya.console(!st_vid.nsWBPersist);
//st_vid.isPlaying=false;
VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(this);
//VLCFoxPlaya.console('st_vid.vidDetails.videoLength');
//VLCFoxPlaya.console(st_vid.vidDetails.videoLength);
//VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.length);
st_vid.isPlaying=false;
//VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(this);
st_vid.vidDetails.imgPlaceHolder.style.zIndex='0';
st_vid.vidEl.style.zIndex='-1';
}
else if(!st_vid.finishedDownloading && st_vid.fileVLCBufferFull){
st_vid.isPlaying=false;
VLCFoxPlaya.console('***** buffer is empty ****');
VLCFoxPlaya.console('!st_vid.finishedDownloading');
VLCFoxPlaya.console(!st_vid.finishedDownloading);
/*************
still playing; buffer is empty
*************/
st_vid.bufferAmount=st_vid.bufferAmount+st_vid.OPC.aCurTotalProgress;
st_vid.fileVLCBufferFull=false;
st_vid.forceStart=true;
}
}
//}
VLCFoxPlaya.amyPoller(this, this.document); //https://developer.mozilla.org/en/DOM/window.setInterval#Dangerous_usage
}, 500);