Video.JS skip forward, seek backward, play/pause, change screen sizes, do it all!

by soljohnston777

HTML

<body> 
<div style="text-align:center"> 
  <button onclick="playPause()">Play/Pause</button>  
  <button onclick="makeBig()">Big</button>
  <button onclick="makeSmall()">Small</button>
  <button onclick="makeNormal()">Normal</button>
  <button onclick="restart();">Restart</button> 
  <button onclick="skip(-10)">Rewind</button>
  <button onclick="skip(10)">Fastforward</button>
  
  <br><br>
  <video id="video1" width="420">
    <source src="http://vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
    Your browser does not support HTML5 video.
  </video>
</div> 
</body>

JavaScript

var myVideo = document.getElementById("video1"); 

function playPause() { 
    if (myVideo.paused) 
        myVideo.play(); 
    else 
        myVideo.pause(); 
} 

function makeBig() { 
    myVideo.width = 560; 
} 

function makeSmall() { 
    myVideo.width = 320; 
} 

function makeNormal() { 
    myVideo.width = 420; 
} 

 function skip(value) {
        var video = document.getElementById("video1");
        video.currentTime += value;
 }    
 
 function restart() {
        var video = document.getElementById("video1");
        video.currentTime = 0;
    }