title: mediaElementjs: how to get instance of the player
body: <p>I'm stuck with a little problem with MediaElement.js player.</p>
  
  <p>To get the instance of the player, I do this (works with html5 compatible browser):</p>
  
  <pre><code>    // Get player
  this.playerId = $('div#shotlist-player video').attr('id');
  this.player = window[this.playerId];
  </code></pre>
  
  <p>But it's not working as soon as it fallback in flash. In fact, it's not working because I'm not calling an instance of MediaElement itself. But I don't see how I can call it.</p>
  
  <p>The player is created with</p>
  
  <pre><code>$('video').mediaelementplayer({....});
  </code></pre>
  
  <p>How can I get the mediaelement object?</p>
  
  <p>------------EDIT----------------</p>
  
  <p>Ok I finally found how to make it works:</p>
  
  <pre><code>    // Get player
  mePlayer = $('div#shotlist-player video.video-js')[0];
  this.player = new MediaElementPlayer(mePlayer);
  </code></pre>
  
  <p>Now I can user mediaElement instance correctly.</p>