Tip: Click lines to highlight, hold ctrl/cmd to multi-select

http://codedumper.com/awuni (12-Jul @ 12:28)

yansky

Syntax Highlighted Code

  1.        pll_win.setTimeout(function(){
  2.             let st_vid=this.VLCFoxPlaya_vid;
  3.             //VLCFoxPlaya.console('setTimeout');
  4.  
  5.             /*let totalProgressPercent = parseInt((st_vid.OPC.aCurTotalProgress/st_vid.OPC.aMaxTotalProgress)*100,10);
  6.             VLCFoxPlaya.console('totalProgressPercent');
  7.             VLCFoxPlaya.console(totalProgressPercent);
  8.  
  9.             let timeLUnderL = parseInt( ( (st_vid.vidPlayWidth-45-45-80-80-10)*totalProgressPercent ) /100, 10 );
  10.             //VLCFoxPlaya.console('timeLUnderL');
  11.             //VLCFoxPlaya.console(timeLUnderL);                    
  12.  
  13.             //pL_vid.playerControlEles.controls.timeLine.timeLineLoadedSection1.width=timeLUnderL;    
  14.             st_vid.playerControlEles.controls.timeLine.timeLineLoadedSection1.setAttribute('width',timeLUnderL);    */        
  15.            
  16.             VLCFoxPlaya.playerControlFuncs.time.change(st_vid);
  17.             /*VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.state);
  18.             VLCFoxPlaya.console(st_vid.isPlaying);
  19.             if(st_vid.isPlaying && st_vid.unWrappedvidEl.input.state===6){
  20.                 VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(st_vid);
  21.             }*/
  22.             //if(st_vid.unWrappedvidEl.input.state ===6 && st_vid.vidDetails.videoLength===st_vid.unWrappedvidEl.input.length){
  23.                         /*VLCFoxPlaya.console('st_vid.unWrappedvidEl.input.state');
  24.             VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.state);*/
  25.  
  26. //VLCFoxPlaya.console('setTimeout st_vid.isPlaying');
  27. //VLCFoxPlaya.console(st_vid.isPlaying);
  28.             //if( st_vid.isPlaying){
  29.                
  30.                 let svgPCF=st_vid.playerControlEles.controls;
  31.                 let plSt = st_vid.unWrappedvidEl.input.state;
  32.                
  33.                 /*******************
  34.                 IDLE=0, OPENING=1, BUFFERING=2, PLAYING=3,
  35.                 PAUSED=4, STOPPING=5, ENDED=6, ERROR=7
  36.                 *******************/
  37.                
  38.                 if(plSt===4 && st_vid.isPlaying){
  39.                     st_vid.isPlaying=false;
  40.                     VLCFoxPlaya.console('if(plSt===4 && st_vid.isPlaying){');
  41.                     VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(this);
  42.                 }
  43.                 else if(plSt ===3){
  44.                     if(!st_vid.isPlaying){
  45.                     VLCFoxPlaya.console('else if(plSt ===3){');
  46.                         st_vid.isPlaying=true;
  47.                         VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(this);
  48.                     }
  49.                     //VLCFoxPlaya.console('st_vid.unWrappedvidEl.input.state');
  50.                 //VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.state);                
  51.                     /********
  52.                     get percentage of time gone by in the video that is playing
  53.                     ********/                    
  54.                     let vidPercLen = parseInt((st_vid.unWrappedvidEl.input.time/st_vid.vidDetails.videoLength)*100,10);
  55.                     //VLCFoxPlaya.console('vidPercLen');
  56.                     //VLCFoxPlaya.console(vidPercLen);
  57.                     /********
  58.                     use that percentage to find the new x axis number
  59.                     -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
  60.                     -14 to take away the width of timeLinePosRect
  61.                     ********/                        
  62.                     let timeLwL = parseInt(((st_vid.vidPlayWidth-45-45-80-80-10)*vidPercLen)/100,10);
  63.                     //VLCFoxPlaya.console('timeLwL');
  64.                     //VLCFoxPlaya.console(timeLwL);                    
  65.                     /********
  66.                     assign timeLineGroup the new transform x axis number
  67.                     ********/
  68.                     /*let newMatrix = svgPCF.master.createSVGPoint().matrixTransform(gtF2Elem);
  69.                     newMatrix.x=timeLwL;                    
  70.                     svgPCF.timeLine.timeLineGroup.timeLineSliderGroupTranslateStartVal
  71.                     svgPCF.timeLine.timeLineGroup.*/
  72.                    
  73.                     //svgPCF.timeLine.timeLinePosRect.x=timeLwL;    
  74.                     /*let tsvgc=svgPCF.master.createSVGTransform();
  75.                     tsvgc.setTranslate(timeLwL,8);                    
  76.                     svgPCF.timeLine.timeLinePosRect.translate.baseVal.appendItem(tsvgc);*/
  77.                    
  78.                    
  79.                     svgPCF.timeLine.timeLinePosRect.setAttribute('x',timeLwL);    
  80.                     //VLCFoxPlaya.console('svgPCF.timeLine.timeLinePosRect.x');
  81.                     //VLCFoxPlaya.console(svgPCF.timeLine.timeLinePosRect.x);                        
  82.                    
  83.                 }            
  84.                 else if(plSt ===6){
  85.                     //VLCFoxPlaya.console('st_vid.unWrappedvidEl.input.state');
  86.                 //VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.state);        
  87.                
  88.            
  89.                     if(st_vid.finishedDownloading && st_vid.isPlaying){
  90.  
  91.                         VLCFoxPlaya.console('finished!!');
  92.                         //VLCFoxPlaya.console(!st_vid.nsWBPersist);
  93.                         //st_vid.isPlaying=false;
  94.                         VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(this);
  95.                         //VLCFoxPlaya.console('st_vid.vidDetails.videoLength');
  96.                         //VLCFoxPlaya.console(st_vid.vidDetails.videoLength);
  97.                         //VLCFoxPlaya.console(st_vid.unWrappedvidEl.input.length);
  98.                         st_vid.isPlaying=false;
  99.                         //VLCFoxPlaya.playerControlFuncs.playPause.toggleButton(this);
  100.                         st_vid.vidDetails.imgPlaceHolder.style.zIndex='0';
  101.                         st_vid.vidEl.style.zIndex='-1';        
  102.                     }
  103.                     else if(!st_vid.finishedDownloading && st_vid.fileVLCBufferFull){
  104.                         st_vid.isPlaying=false;
  105.                         VLCFoxPlaya.console('***** buffer is empty  ****');
  106.                         VLCFoxPlaya.console('!st_vid.finishedDownloading');                    
  107.                         VLCFoxPlaya.console(!st_vid.finishedDownloading);                    
  108.                         /*************
  109.                         still playing; buffer is empty
  110.                         *************/
  111.                         st_vid.bufferAmount=st_vid.bufferAmount+st_vid.OPC.aCurTotalProgress;
  112.                         st_vid.fileVLCBufferFull=false;
  113.                         st_vid.forceStart=true;
  114.                     }                    
  115.                 }
  116.             //}
  117.            
  118.             VLCFoxPlaya.amyPoller(this, this.document);        //https://developer.mozilla.org/en/DOM/window.setInterval#Dangerous_usage
  119.         }, 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);

Codedump Run

Permalink: http://codedumper.com/awuni