daily pastebin goal
71%
SHARE
TWEET

ytpitchscriptv2

a guest Jan 19th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const video = document.getElementsByTagName('video')[0]
  2. const stepsize = 0.0005;
  3. document.addEventListener('keydown',(evt) => {
  4.     if(evt.key === ']') video.playbackRate += stepsize;
  5.     if(evt.key === '[') video.playbackRate -= stepsize;
  6.     if(evt.key === '0') video.playbackRate = 1;
  7.  
  8.     if(video.playbackRate < 0.92) video.playbackRate = 0.92;
  9.     if(video.playbackRate > 1.08) video.playbackRate = 1.08;
  10.     console.log("PITCH = ",video.playbackRate);
  11. },false);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top