title: Trying to Extract Audio Metadata Javascript
body: <p>I am very new to JavaScript, and am trying to extract audio metadata from files. To do this, I am trying to implement the audio-metadata library into my code (<a href="https://github.com/tmont/audio-metadata" rel="nofollow noreferrer">https://github.com/tmont/audio-metadata</a>). However, when I try to run the example code, I keep getting the error saying "variable is not defined". </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;
          Kenson's Music Player
      &lt;/title&gt;
      &lt;link rel="stylesheet" href="player.css" type="text/css" /&gt;
      &lt;script type="text/javascript" src="audio-metadata.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;script type="text/javascript"&gt;
      var req = new XMLHttpRequest();
      req.open('GET', 'example.mp3', true);
      req.responseType = 'arraybuffer';
  
      req.onload = function() {
          var metadata = AudioMetaData.id3v2(req.response);
          /*
              {
                  "TIT2": "Foobar",
                  "title": "Foobar",
                  "TPE1": "The Foobars",
                  "artist": "The Foobars",
                  "TALB": "FUBAR",
                  "album": "FUBAR",
                  "year": "2014",
                  "TRCK": "9",
                  "track": "9",
                  "TSSE": "Lavf53.21.1",
                  "encoder": "Lavf53.21.1"
              }
          */
      };
  
      req.send(null);
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>