Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html> 
<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>
  <br /> 
  <video id="video1" controls autoplay> 
    <!-- I have three versions of the video encoded with
         different codecs.  The browser will automatically
         choose the first one it knows it can play. --> 
    <source src=http://html5doctor.com/demos/video-canvas-magic/video.webm type=video/webm> 
    <source src=http://html5doctor.com/demos/video-canvas-magic/video.ogg type=video/ogg> 
    <source src=http://html5doctor.com/demos/video-canvas-magic/video.mp4 type=video/mp4> 
</video> 
</div> 
<script type="text/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; 
} 
</script> 
<p>Variation of http://www.w3schools.com/html5/tryit.asp?filename=tryhtml5_video_js_prop</a>.</p>
</body> 
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers