title: Pausing video doesn't stop audio in html5 video tag
body: <p>I'm pausing a video using its <code>pause()</code> method.. the problem is that the audio continues playing... I also tried pausing it from the Javascript Console in Firefox... nothing happens. The video is in .ogg format and is not even playing in Chrome (because I think it's not supported).
  I hosted the video on Amazon S3 and it is streaming perfectly. I'm creating the  element dynamically, loading its info from a JSON request.
  Here is some code:</p>
  
  <pre><code>function showVideo() {
          var video = videodata;
  
          var videobox = $('#videobox').first();
          var videoplayer = document.getElementById('videoplayer');
  
          if (video.Enabled) {
              if ((videoplayer != null &amp;&amp; videoplayer.currentSrc != video.Location) || videoplayer == null) {
                  console.log('Creating video elem');
                  videobox.empty();
                  videobox.append('&lt;video id="videoplayer" preload="auto" src="' +
                    video.Location + '" width="100%" height="100%" autoplay="autoplay" loop="loop" /&gt;');
                  videobox.show();
              }
          } else {
              if (videoplayer != null) {
                  videoplayer.pause();
                  console.log('Pausing video...');
              }
              console.log('Deleting video elem');
              videobox.hide();
              videobox.empty();
          }
      }
  </code></pre>
  
  <p>I already posted a similar question before... but now I'm using other browsers, so I thought I have to create a new question.</p>
  
  <hr>
  
  <p>Here is the working code (thanks to the user <em>heff</em>!)</p>
  
  <pre><code>function showVideo() {
      var video = videodata;
  
      var videobox = $('#videobox').first();
      var videoplayer = document.getElementById('videoplayer');
  
      if (video.Enabled) {
          if ((videoplayer.src != video.Location) || videoplayer.src == '') {
              console.log('Playing video: ' + video.Location);
              videoplayer.src = video.Location;
              videoplayer.load();
              videoplayer.play();
              videobox.show();
          }
      } else {
          if (videoplayer.src != '') {
              console.log('Pausing video...');
              videoplayer.pause();
              videoplayer.src = '';
              videobox.hide();
          }
      }
  }
  </code></pre>