title: Why can't my video play?
body: <p>This is getting pretty frustrating. I make a video and willing to play it in js [with no jquery]. And everytime, it fail. The console said <code>play is not defined</code>. Can you help me please</p>
  
  <pre><code>&lt;video id='video'&gt;
          &lt;source src='http://techslides.com/demos/sample-videos/small.mp4' type='video/mp4'&gt;
          &lt;source src='http://techslides.com/demos/sample-videos/small.ogv' type='video/ogg'&gt;
          &lt;embed src='http://techslides.com/demos/sample-videos/small.flv' type='x-shockwave-flash'&gt;
      &lt;/video&gt;
      &lt;button onclick='play()' &gt;Play/Pause&lt;/button&gt;
  </code></pre>
  
  <p>.</p>
  
  <pre><code>window.onload = function() {
  var video = document.getElementById('video');
  if (video.paused) {
      video.play();
  } else {
      video.pause();
  }
  };
  </code></pre>
  
  <ul>
  <li>thanks</li>
  </ul>