title: Triggering an HTML5 audio track to play whenever it has loaded
body: <p>I'm trying to play an HTML5 audio track a few seconds after the page has loaded using the .play() JavaScript function.</p>
  
  <p>Sometimes, when the audio loads slowly, and .play() is triggered when the player looks like this:
  <img src="https://i.stack.imgur.com/HTs2N.gif" alt="enter image description here"></p>
  
  <p>The audio does not play when it is buffered.</p>
  
  <p>Sometimes, when the audio loads quickly and the player looks like this, .play() works fine.</p>
  
  <p><img src="https://i.stack.imgur.com/3wbtr.gif" alt="enter image description here"></p>
  
  <p>What is the quickest way around this issue? (Using a listener? I holding out for a 'play when loaded' function).</p>