title: wavesurfer.js multiple instances on page
body: <p>I'm using <a href="https://github.com/katspaugh/wavesurfer.js" rel="nofollow">wavesurfer.js</a> which works fine when there is only one instance on the page, but I have multiple instances and have no idea (as I am a total javascript novice) how to link the play button to different instances.</p>
  
  <p>I just need some help... this is what I have so far</p>
  
  <pre><code>    &lt;div id="demoOne"&gt;
            &lt;div id="trackOne"&gt;
              &lt;script type="text/javascript"&gt;
              var wavesurfer = Object.create(WaveSurfer);
  
              wavesurfer.init({
                  container: document.querySelector('#trackOne'),
                  waveColor: '#fff',
                  progressColor: '#000',
                  cursorColor: '#333'
              });
              wavesurfer.load('audio/location01.mp3');
              &lt;/script&gt;
            &lt;/div&gt;
            &lt;div class="controls"&gt;
              &lt;button class="btn" data-action="play"&gt;
                  &lt;i class="glyphicon glyphicon-play"&gt;&lt;/i&gt;
              &lt;/button&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div id="demoTwo"&gt;
            &lt;div id="trackTwo"&gt;
              &lt;script type="text/javascript"&gt;
              var wavesurfer = Object.create(WaveSurfer);
  
              wavesurfer.init({
                  container: document.querySelector('#trackTwo'),
                  waveColor: '#fff',
                  progressColor: '#000',
                  cursorColor: '#333'
              });
              wavesurfer.load('audio/location02.mp3');
              &lt;/script&gt;
            &lt;/div&gt;
            &lt;div class="controls"&gt;
              &lt;button class="btn" data-action="play"&gt;
                  &lt;i class="glyphicon glyphicon-play"&gt;&lt;/i&gt;
              &lt;/button&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>I have looked around and imagined something like this</p>
  
  <pre><code>&lt;button onclick="document.getElementById('trackOne').play()"&gt;Play&lt;/button&gt;
  </code></pre>
  
  <p>Can anyone steer me in the right direction?</p>