Advertisement
onexiv

Untitled

Sep 8th, 2022
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 1.63 KB | Source Code | 0 0
  1.  
  2.     function easy (mediaPlayer, ms) {
  3.         xy = mediaPlayer.mp.getBoundingClientRect();
  4.         t = { x: getMousePos(onmousemove).x, y: getMousePos(onmousemove).y };
  5.         var jog_r = mediaPlayer.mp.duration;
  6.         if (ms.sec != mediaPlayer.mp.currentTime) {
  7.             mediaPlayer.mp.currentTime = parseFloat(new String(ms.sec));
  8.             console.log(mediaPlayer.mp.currentTime);
  9.         }
  10.  
  11.         console.log(mediaPlayer.mp.currentTime + "*" + ms.sec);
  12.         if (flags == true || (ms.sec < -0.2 || ms.sec > jog_r))
  13.         {
  14.             ms.sec = 0;
  15.             return;
  16.         }
  17.         console.log(mediaPlayer.mp.currentTime + "&" + mediaPlayer.mp.duration);
  18.         flag();
  19.  
  20.         mediaPlayer.mp.pause();
  21.         while ((callbackRight() && ms.sec < jog_r) || (callbackLeft() && ms.sec > 0))
  22.         {
  23.             if (callbackLeft() && mediaPlayer.mp.currentTime > 0) {
  24.                 medp = new String(parseFloat(mediaPlayer.mp.currentTime - 10));
  25.                 mediaPlayer.mp.currentTime = (`${medp}`);
  26.                 //mediaPlayer.mp.play();
  27.                 console.log(mediaPlayer.mp.currentTime);
  28.             }
  29.             else if (callbackRight() && mediaPlayer.mp.currentTime < jog_r) {
  30.                 console.log(mediaPlayer.mp.currentTime + " " + mediaPlayer.mp.duration);
  31.                 medp = new String(parseFloat(mediaPlayer.mp.currentTime + 10));
  32.                 mediaPlayer.mp.currentTime = (`${medp}`);
  33.                 //mediaPlayer.mp.play();
  34.                
  35.             }
  36.         }
  37.         //mediaPlayer.mp.play();
  38.         unflag();
  39.         m_seek = ms;
  40.         return m_seek;
  41.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement